Errors
The error object of the DMS API and the codes that say what went wrong.
On this page
An error is an HTTP status and a JSON object whose code never changes its meaning.
The error object
| Field | Meaning |
|---|---|
code | A stable code for the cause. Act on this. |
message | A sentence to read in your logs. It can change, so do not show it to the people who use your software and do not match on it. |
fields | On a 400, each field that is wrong and why. Absent otherwise. |
requestId | The identifier of this request. Quote it when you ask us for help. |
Every answer, an error or not, carries the header X-RDC-Request-Id with the same value as requestId.
Codes every product shares
| Status | Code | Meaning | Retry |
|---|---|---|---|
400 | invalid_request | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | No. Fix the request. |
401 | unauthorized | The token is missing, expired or not ours. | After you get a new token. |
403 | forbidden | The token does not give access to this company or operation. | No. |
404 | <thing>_not_found | The record does not exist for this company. | No. |
409 | revision_conflict | expectedRevision is older than the record. | Read the record again, then send a new operation. |
409 | operation_reused | This operationId was sent before with another body. | No. |
422 | A code of the product, such as blocked_by_checks | The request is well formed and a rule of the product refuses it. | No. The code says what to change. |
429 | rate_limited | Too many requests. Retry-After gives the seconds. | Yes, after the pause. |
503 | unavailable | The service cannot answer now. | Yes, with the same operationId. |
Codes of DMS
| Status | Code | Meaning |
|---|---|---|
404 | document_not_found | The document does not exist for this company. |
404 | person_not_found | The person is not a person of your account. |
404 | counterparty_not_found | The counterparty is not a customer, a supplier or a carrier of your account. |
404 | recipient_not_found | The person is not one who can be asked to sign this document: the signatory of your company or a contact named at its counterparty. |
404 | field_not_found | The name is not one of the extracted values of an invoice. |
404 | extraction_not_found | The document was not read: only an invoice created with extract has an extraction. |
404 | signature_request_not_found | No request for signature was sent for this document. |
404 | operation_not_found | No change was recorded under this operationId. |
404 | event_not_found | The event does not exist, or it has not been delivered to a subscription yet. |
404 | subscription_not_found | The subscription does not exist. |
409 | document_archived | The document is archived. Nothing changes on an archived document. |
409 | document_not_draft | Only a draft can be changed, revised or submitted. |
409 | revision_required | The approver returned the document. Revise it, then submit it again. |
409 | document_not_in_review | Only a document in review can be approved or rejected. |
409 | not_your_turn | The approvers decide in order. The approver you named comes after one who has not decided. |
409 | already_decided | The approver you named has already approved this document. |
409 | document_not_approved | A request for signature is sent for an approved document. |
409 | already_signed | Every recipient has signed. Archive the document. |
409 | signature_request_open | The document has a request for signature that has not ended: every recipient has not signed yet and none has declined. |
409 | signature_required | A contract or an offer is archived after it is signed. |
409 | document_not_final | Only an approved invoice or report, or a signed contract or offer, can be archived. |
409 | value_already_accepted | The extracted value is already accepted. |
409 | value_differs | The extracted value differs from the record of the partner and cannot be accepted. Correct it to the value of the record. |
409 | extraction_closed | The extracted values cannot be changed after the invoice was submitted. |
422 | class_not_valid | The class is not one of contract, invoice, offer or report. |
422 | name_required | The name is empty, or longer than 280 characters. |
422 | date_not_valid | The date is not a real day in the form YYYY-MM-DD. |
422 | amount_not_valid | The amount is not a decimal string greater than zero, with at most two decimals. |
422 | amount_required | A document of this class is routed by its amount, so it needs one before it is submitted. |
422 | nothing_to_change | Every value in the request is the value the record already has. |
422 | value_required | The corrected value is empty, or longer than 120 characters. |
422 | account_not_valid | The corrected value is not shaped like an IBAN: two letters, two digits, then 10 to 30 letters or digits. |
422 | totals_do_not_add | The extracted gross is not the extracted net plus the extracted VAT. Correct the value that is wrong. |
422 | extraction_unresolved | An invoice is submitted when every extracted value is accepted. The fields of the error name the ones that are not. |
422 | reason_required | A rejection needs a reason of at most 280 characters. |
422 | not_an_approver | The person is not on the route of the document: the route comes from its class and its amount. |
422 | owner_is_approver | The owner of the document is on its route, so it cannot be submitted. Nobody approves what they own. |
422 | class_not_signed | Only a contract or an offer is sent for signature. |
422 | recipients_required | The list of recipients is empty. |
422 | recipient_duplicated | The same person appears twice in recipients. |
The full rule: Developer guide