Mar 16, 2022 8:53 AM - edited Mar 16, 2022 10:41 AM
I'd like to know the properties of the companies that get error in the creation process to save they in logs registration, but seeing the JSON response of http code 207 I didn't understand where I can get these informations.
Mar 17, 2022 10:35 AM
Hi @MSilva51 ,
Did you log the response of that call?
Whats in the repsonse body?
You can also check the request in you App portal; Maybe you can get there more information about your call.
https://legacydocs.hubspot.com/docs/faq/api-request-monitoring
Regards Ronald
Mar 17, 2022 11:09 AM
It's not a especific response, but the response when you got 207 HTTP response. The V3 of the API shows in https://developers.hubspot.com/docs/api/crm/companies in the "Create a batch of companies" part the following JSON as response in 207 HTTP status code:
{
"status": "PENDING",
"results": [
{
"id": "512",
"properties": {
"city": "Cambridge",
"createdate": "2019-10-30T03:30:17.883Z",
"domain": "biglytics.net",
"hs_lastmodifieddate": "2019-12-07T16:50:06.678Z",
"industry": "Technology",
"name": "Biglytics",
"phone": "(877) 929-0687",
"state": "Massachusetts"
},
"createdAt": "2019-10-30T03:30:17.883Z",
"updatedAt": "2019-12-07T16:50:06.678Z",
"archived": false
}
],
"numErrors": 0,
"errors": [
{
"status": "string",
"id": "string",
"category": {
"httpStatus": "CONTINUE",
"name": "string"
},
"subCategory": {},
"message": "string",
"errors": [
{
"message": "string",
"in": "string",
"code": "string",
"subCategory": "string",
"context": {
"missingScopes": [
"scope1",
"scope2"
]
}
}
],
"context": {
"additionalProp1": [
"string"
],
"additionalProp2": [
"string"
],
"additionalProp3": [
"string"
]
},
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
],
"requestedAt": "2022-03-17T14:07:54.050Z",
"startedAt": "2022-03-17T14:07:54.050Z",
"completedAt": "2022-03-17T14:07:54.050Z",
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
You can see the erros, but in this exaple that the documentation gives to us thre's not explanation about what these informations means. Eg.: What is this missingScope? I'd like to know what each part of this JSON means.
Mar 17, 2022 10:31 AM
@RMones , do you have some advice on this?