Errors
A REST error has an HTTP status and a JSON body in the RFC 7807 problem format:
{ "status": 422, "title": "An error occurred", "detail": "reference: Another customer already has this reference.", "violations": [ { "propertyPath": "reference", "message": "Another customer already has this reference." } ]}| Status | Meaning | What to do |
|---|---|---|
400 |
The body is not valid JSON, or a value has the wrong type. | Fix the request. |
401 |
No valid API key. | See Authentication. |
403 |
The key may not do this. | Use a read_write key, or a key of a member with a higher role. |
404 |
The record does not exist in this workspace. | Check the id. |
409 |
The record changed after you read it. | Read it again and retry. |
422 |
The request breaks a rule, for example a duplicate reference or a finalized invoice that you try to change. | Read violations or detail. |
429 |
Too many requests. | See Rate limits. |
5xx |
An error on our side. | Retry later with backoff. |
violations is present only for a validation error. Each item names the field (propertyPath) and the message.
GraphQL
Section titled “GraphQL”A GraphQL request answers with status 200, also when it fails. The errors are in the errors list:
{ "errors": [ { "message": "Access Denied.", "path": ["createNote"] } ], "data": { "createNote": null }}Always check errors first. A query can return a part of the data and errors for the other part.