APIs & Integrations

Not applicable

DEAL PROPERTY - Exists?

How to check whether particular DEAL PROPERTY exists or not?
For example, I have deal property called APPLE with checkbox type and option values like iPhone 6, iPhone 7 etc.
Now, I want to identify whether this property already exists in HUBPortal or not Also I want to check whether related options (iPhone 6 etc…) already exists or not?

Can anyone help me to identify which API I need to use in order to check whether HUBPortal already has the DEAL Property and related Option value?

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

DEAL PROPERTY - Exists?

Hi @Shalin_Shah,

You can use the Get a deal property endpoint to try and get the details for the apple deal property. If the property doesn’t exist in a particular portal, you’ll receive the following response:

"status":"error","message":"Couldn't find a Property with the given name 'apple'"

If the property does exist, you’ll receive a JSON object representing the definition for a given deal property. Check out the following document for more details on this endpoint:

Get a deal property | Deal Properties API

GET /properties/v1/deals/properties/named/:property_name - Returns a JSON object representing the definition for a given deal property.

0 Upvotes