Responses¶
The methods that return JSON use the same envelope:
{
"result": true,
"entities": [
{ "shippingId": 8800061, "totalValue": 11.00 }
],
"messages": [
"Record created successfully",
"Time execution:1564 ms."
],
"notificationType": 3
}
| Field | Type | Meaning |
|---|---|---|
result |
boolean | true when the request was processed |
entities |
array | The data returned by the method. Its content is described on each method's page |
messages |
array of text | Errors, warnings and information about the request |
notificationType |
number | Outcome of the request (see the table below) |
notificationType¶
| Value | Meaning | What to do |
|---|---|---|
1 |
Error | The request was not completed. Read messages, correct the data and try again |
2 |
Completed with warnings | The request was completed. Read messages: something may need your attention |
3 |
Successful | The request was completed |
4 |
Information | The request was processed. Read messages |
Always check notificationType and messages
An HTTP 200 response does not mean the request was completed. Check notificationType in every response
and store messages in your logs: they are the first thing our support team will ask for.
HTTP status codes¶
| Code | When |
|---|---|
200 |
The request reached the method. Check notificationType |
400 |
A parameter is missing or invalid. The body lists each field in errors (see below) |
401 |
The token is missing, invalid or expired. See Authentication |
403 |
The token is valid but does not have access to that method or that information |
Validation errors¶
When a required parameter is missing or a value is out of range, the API answers 400 with this body instead
of the envelope above:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"UserId": [ "UserId is required" ]
}
}