APIs & Integrations

kimnguyen
Mitwirkender/Mitwirkende | Diamond Partner
Mitwirkender/Mitwirkende | Diamond Partner

Product (CRM Object) Property not appearing in Product API

lösung

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 Upvotes
1 Akzeptierte Lösung
WendyGoh
Lösung
HubSpot Employee
HubSpot Employee

Product (CRM Object) Property not appearing in Product API

lösung

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. 

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
1 Antwort
WendyGoh
Lösung
HubSpot Employee
HubSpot Employee

Product (CRM Object) Property not appearing in Product API

lösung

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 Upvotes