When I use the example body for the Create Deal Property Group endpoint (http://developers.hubspot.com/docs/methods/deals/create_deal_property_group) to create a new Deal Group, the properties I specify don’t seem to attach to the Deal Group object correctly. Here’s what I use to create the object:
> {
> “name”: “invoicing”,
> “displayName”: “Invoicing”,
> “displayOrder”: 6,
> “properties”: [
> {
> “description”: “A company’s shipping address”,
> “label”: “Shipping Address”,
> “fieldType”: “text”,
> “formField”: True,
> “type”: “string”,
> “options”: [],
> “displayOrder”: 0,
> “name”: “shippingaddress”
> }
> ]
> }
But when I get that group back from the server, with the “show options” option enabled (http://api.hubapi.com/deals/v1/groups/named/invoicing2?hapikey=demo&includeProperties=true), the properties I specified are nowhere to be found:
That endpoint also doesn’t take a properties parameter so I’ll have to get the docs updated.
You’ll need to use the create/update deal properties endpoints to insert new properties. If you want to insert them into a specific group just reference it in the groupName param in your payload.
Here is an example POST to deals/v1/properties to create a brand new property
Looks like the docs are incorrect, you cannot create properties at the same time you create the group. You’ll need to make two separate requests. I’ll get the docs updated.