I am having an issue using the endpoint:
https://api.hubapi.com/crm/v3/objects/companies/batch/read
My problem is that using this simple JSON request:
{ “properties”: [ “domain” ], “idProperty”: “domain”, “inputs”: [ { “id”: “aspencot.co.uk” } ] }
I always seem to get this response…
{ “status”: “COMPLETE”, “results”: [], “numErrors”: 1, “errors”: [ { “status”: “error”, “category”: “OBJECT_NOT_FOUND”, “message”: “Could not get some COMPANY objects, they may be deleted or not exist. Check that ids are valid.”, “context”: { “ids”: [ “aspencot.co.uk” ] } } ], “startedAt”: “2024-02-26T18:49:55.761Z”, “completedAt”: “2024-02-26T18:49:55.790Z” }
Now I checked the “hasUniqueValue” property of the domain property of the customer and it is presently set to false. Reading a different post here on the forums, it appears that in order for me to use this endpoint with that ‘idProperty’ within the JSON request that this attribute needs to be set to true. (I checked the object using the properties API).
HOWEVER, I can successfully use the same batch read contact API endpoint below with the email id property where the “hasUniqueValue” is false and get a successful response when passing the email address in the inputs array.
[https://api.hubapi.com/crm/v3/objects/contact/batch/read]
Is there something else here I am missing in a configuration with HubSpot to turn on the ability to search a company object by domain and/or name?(https://api.hubapi.com/crm/v3/objects/contact/batch/read)
If my only possible way of doing this is to set the ‘hasUniqueValue’ attribute to true, what are the existing rammifications to my data already captured in the 60K company records I have in HubSpot?
Any guidance here is greatly appreciated.