I want to create a new association label between Contact (0-1) and Company (0-2). So I sent the following request:
POST https://api.hubapi.com/crm/v4/associations/0-1/0-2/labels HTTP/1.1....{ "label": "Referred By", "name": "referredby"}
And received this response:
HTTP/1.1 200 OK...{ "results": [ { "category": "USER_DEFINED", "typeId": 1, "label": "Referred By" }, { "category": "USER_DEFINED", "typeId": 2, "label": "Referred By" } ]}
Then, I sent a request to retrieve all association labels between Contact and Company:
GET https://api.hubapi.com/crm/v4/associations/0-1/0-2/labels HTTP/1.1
And got the following response:
HTTP/1.1 200 OK.....{ "results": [ { "category": "USER_DEFINED", "typeId": 1, "label": "Referred By" }, { "category": "HUBSPOT_DEFINED", "typeId": 931, "label": "Billing Contact" }, { "category": "HUBSPOT_DEFINED", "typeId": 279, "label": null }, { "category": "HUBSPOT_DEFINED", "typeId": 1, "label": "Primary" } ]}
Question:
Why is the typeId value 1 used for both my custom association label (“Referred By”) and a built-in one (“Primary”)?
Shouldn’t typeId values be unique across all labels?