APIs & Integrations

brodi
Participant

Adding custom property value with deals

SOLVE

We are syncing our sales orders from our e-commerce system to HubSpot. We added four properties of product's related information in Deals. However, we couldn't find any information on deals API that how can we add customer property value through API. Is there any way to add these properties value?

 

image_2020_03_18T00_18_44_461Z.png

0 Upvotes
1 Accepted solution
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Adding custom property value with deals

SOLVE

Hey @brodi,

 

To clarify, are you looking to create deals via HubSpot Create a deal API and is looking at a way to pass value into properties - Product Name, Product Size&Color, Product Sku# and Quantity? 

 

If so, when looking to set property via API, we would need to first get the property's internal value. You can do so by going to your properties settings in-app (Click on the 'Settings' icon at the top right corner > At the left side panel, click on 'Properties' > Change the 'Filter by' dropdown to 'Deal properties') > search for property e.g. Product Name > Hover over, click 'Edit' > Beside the name, click '</>' and you see the internal name.

 

You can learn more here: Manage your properties.

 

Once you obtain the internal value e.g. in your case, property 'Product Name' == 'product_sold', you can use this as the property name in the POST body when creating deal. E.g. of the POST body

 

{
  "properties": [
    {
      "value": "this is the value",
      "name": "product_sold"
    }
  ]
}

Hope this helps to shed some lights!

View solution in original post

0 Upvotes
2 Replies 2
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Adding custom property value with deals

SOLVE

Hey @brodi,

 

To clarify, are you looking to create deals via HubSpot Create a deal API and is looking at a way to pass value into properties - Product Name, Product Size&Color, Product Sku# and Quantity? 

 

If so, when looking to set property via API, we would need to first get the property's internal value. You can do so by going to your properties settings in-app (Click on the 'Settings' icon at the top right corner > At the left side panel, click on 'Properties' > Change the 'Filter by' dropdown to 'Deal properties') > search for property e.g. Product Name > Hover over, click 'Edit' > Beside the name, click '</>' and you see the internal name.

 

You can learn more here: Manage your properties.

 

Once you obtain the internal value e.g. in your case, property 'Product Name' == 'product_sold', you can use this as the property name in the POST body when creating deal. E.g. of the POST body

 

{
  "properties": [
    {
      "value": "this is the value",
      "name": "product_sold"
    }
  ]
}

Hope this helps to shed some lights!

0 Upvotes
brodi
Participant

Adding custom property value with deals

SOLVE

Yes, that what we were looking for. Thank you.

0 Upvotes