Hi,
I am exporting my custom object schema using a GET call (ex: https://api.hubapi.com/crm/v3/schemas/2-123456)
and get everything back except all the validation rules that are set on the properties are missing even if I had a bunch defined in the UI.
Any idea what i’m doing wrong?
Hey, @MCarriere
Thanks for your question. Did you get this resolved? If not, I’m happy to run a few tests and try to replicate. And verify if this is a case of works as designed but not like we’re expecting.
One question, have you tried making a request to the Properties API endpoint, GET/crm/v3/properties/{objectType}/{propertyName}, to verify these validation rules are returned there? I’ll set up a property for my custom object with validation rules in my test account.
I ask because I want to set up my test close to how you are doing it. Thanks for the additional details.
Best,
Jaycee
Thanks for the reply!
Here’s an example of the result from a GET in the properties API:
{
"updatedAt": "2023-05-10T20:25:19.945Z",
"createdAt": "2023-05-10T20:25:19.945Z",
"name": "percent_dry",
"label": "Percent Dry",
"type": "number",
"fieldType": "number",
"description": "% in Dry environment",
"groupName": "engineering_services_information_forms_information",
"options": [],
"createdUserId": "10740601",
"updatedUserId": "10740601",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false,
"hidden": false,
"showCurrencySymbol": false,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": false,
"readOnlyValue": false
},
"formField": true
}
and here’s the rules definition for the property in the UI
Has anyone found a way to get the rules?
The app gets them from `hubspot.com/api/property-validation/v1/custom-property-validation/get` but I can’t find any API endpoint that returns the same data, the schema endpoints don’t include it.