Hi, when using the export endpoint, (crm/v3/exports/export/async), it looks like there’s a hidden mapping between object properties and the properties as displayed in the CRM.
{
"exportType": "VIEW",
"format": "CSV",
"exportName": "All companies",
"language": "EN",
"objectType": "COMPANY",
"associatedObjectType": "CONTACT",
"objectProperties": ["City", "state", "Type", "Zip", "Phone", "country"]
}
The above is a functional post body for a call, which eventually returns header values of
"Record ID","City","State/Region","Type","Postal Code","Phone Number","Country/Region","Create Date","Last Modified Date","Associated Contact","Associated Contact IDs"
Noteworthy is that country → country/region, phone → Phone Number and Zip → Postal Code.
Is there any resource that exposes the keys needed to be send in the export request for default objectProperties? If I were to try to send a request with one of the ObjectProperties being “Phone Number” instead of “phone” I would receive a validation error in the response.
Thanks in advance.
---
EDIT: in usual me style, I’ve found _a_ solution about 50 minutes after posting this, but I’m leaving it here because I feel the devX could be vastly improved with better documentation.
The key for properties can be accessed by making a get call to /crm/v3/properties/{object_type} and then parsing through the extensive response to find the “name” field that correlates to the “label” displayed in the CRM. In my case, I queried /v3/properties/companies and looked for label: “Postal Code” and found the name “zip”.
For default settings, I think documenting the default names for object properties would be friendly, or perhaps releasing a client that contains a dicitonary or enumerable of the default object property names for common objects. Thanks!