APIs & Integrations

kimnguyen
投稿者 | Diamond Partner
投稿者 | Diamond Partner

Product (CRM Object) Property not appearing in Product API

解決

Hi all,

I created a Product using the below endpoint:
https://api.hubapi.com/properties/v2/products/properties
with the below JSON input:

{
"name": "hs_tbd",
"label": "To be deleted",
"description": "To be deleted",
"groupName": "productinformation",
"type": "string",
"fieldType": "text",
"displayOrder": -1
}


This was succesfuly done, as this appear in the API when I when to get all Product properties. (using a GET on the same endpoint)

However, when querying separately for Products on the below endpoint:
https://api.hubapi.com/crm-objects/v1/objects/products/paged?hapikey=XXXXX&properties=name&propertie...
The hs_tbd field doesn't appear.

Though it does appear as a filter on Contact Lists.

Could you clarify what I'm doing wrong, and if I'm misunderstanding the difference between both properties?

Many Thanks in advance!!

Kim

0 いいね!
1件の承認済みベストアンサー
WendyGoh
解決策
HubSpot Employee
HubSpot Employee

Product (CRM Object) Property not appearing in Product API

解決

Hey @kimnguyen,

 

Property `hs_tbd` isn't showing up on the response body when you call the Get all products endpoint is likely because there's no product with that property set on it.

 

You would need to create a product - Create a product > And set the hs_tbd on it e.g.

 

[
  {
    "name": "name",
    "value": "feb test"
  },
  {
    "name": "description",
    "value": "A description of this product."
  },
  {
    "name": "price",
    "value": "27.50"
  },
  {
    "name": "hs_tbd",
    "value": "hello value"
  }
]

Once that's done, try calling the Get all products endpoint and property `hs_tbd` should show up on the response body. 

元の投稿で解決策を見る

0 いいね!
1件の返信
WendyGoh
解決策
HubSpot Employee
HubSpot Employee

Product (CRM Object) Property not appearing in Product API

解決

Hey @kimnguyen,

 

Property `hs_tbd` isn't showing up on the response body when you call the Get all products endpoint is likely because there's no product with that property set on it.

 

You would need to create a product - Create a product > And set the hs_tbd on it e.g.

 

[
  {
    "name": "name",
    "value": "feb test"
  },
  {
    "name": "description",
    "value": "A description of this product."
  },
  {
    "name": "price",
    "value": "27.50"
  },
  {
    "name": "hs_tbd",
    "value": "hello value"
  }
]

Once that's done, try calling the Get all products endpoint and property `hs_tbd` should show up on the response body. 

0 いいね!