api v3 associations: are constants defined for "fromObjectType" and "toObjectType"?
SOLVE
I have been searching through the API v3 documentation but have not been able to find a list of valid strings that would satisfy the fromObjectType or toObjectType parameters of the HubSpot CRM Associations API.
GET /crm/v3/objects/companies/{companyId}/associations/{toObjectType}
I am using the Hubspot API library in PHP to query the v3 endpoints, but the PHP library also does not provide a definitions list or set of constants. All of the to_object_type and from_object_type parameters are simply defined as string variables without a closed list of options or reference to allowed constants.
language: PHP
namespace: HubSpot\Client\Crm\Companies\Api
class: AssociationsApi
method: getAll
Could someone point me to where I can find a list of allowed association values? I am unsure of whether to use "deal" or "deals" or "company" or "companies" and would rather not have to guess my way through trial and error to determine which association values are valid.
api v3 associations: are constants defined for "fromObjectType" and "toObjectType"?
SOLVE
Hi ph_alti_trading,
Thanks for pointing out the ObjectType.php file. I tested using both the plural and singular versions of each term (e.g. company/companies, deal/deals) and found that the API was able to treat the singular and plural variants of each entity without distinction. I guess the API designers thought through the possibility that users would provide either term and allowed the API to handle them without error.
Meanwhile, I will use the ObjectType.php file as the source of my constants when I am scripting my association queries: