Transport Documents error codes
Every public API error code emitted by Transport Documents, with its HTTP status, its type and a page per code.
Error codes emitted by Transport Documents. Each code links to its own page with the cause and the action to take.
| Code | Type | HTTP | Description |
|---|---|---|---|
delivery_note_cancelled | invalid_request_error | 422 | One of the delivery notes sent to pre-fill the transport document is cancelled, and a cancelled delivery note cannot be the source of a shipment. Nothing was created. |
invalid_cargo_measure | invalid_request_error | 422 | The declared measure of a shipment is not valid: its type is not weight or other, the weight or value is missing or not greater than zero, or the free unit is not between 1 and 30 characters. |
invalid_transport_tax_id | invalid_request_error | 422 | The tax ID of a party is not valid: a Spanish NIF, NIE or CIF with a wrong control character, or a foreign identifier outside 2 to 20 alphanumeric characters. |
invalid_vehicle_plate | invalid_request_error | 422 | A vehicle plate does not match a Spanish format (current, old provincial, trailer R, special E or historic H; Spanish plates have no vowels) nor a foreign plate of 2 to 12 alphanumeric characters with its country. |
transport_date_in_past | invalid_request_error | 422 | A transport control document must be issued before the transport starts, and one of the transport dates is earlier than today (Europe/Madrid). A draft admits any date; issuing does not. |
transport_document_cannot_be_cancelled | invalid_request_error | 422 | Only an issued transport document in progress can be cancelled; a draft is deleted instead, and a closed, cancelled or superseded one cannot be cancelled. |
transport_document_cannot_be_closed | invalid_request_error | 422 | Only an issued transport document can be closed; this one is a draft, already closed, cancelled or superseded. |
transport_document_cannot_be_deleted | invalid_request_error | 422 | Only a draft can be deleted: an issued transport document is kept as legal evidence for its whole retention period. |
transport_document_cannot_be_edited | invalid_request_error | 422 | Only a draft transport document can be edited or partially updated; this one is already issued, closed, cancelled or superseded. |
transport_document_cannot_be_modified | invalid_request_error | 422 | Only an issued transport document can be modified, and the modification must leave it with every mandatory datum and at least one shipment. |
transport_document_cannot_be_reopened | invalid_request_error | 422 | Only a manually closed transport document can be reopened, and only before its automatic-close deadline; after an automatic close it stays closed. |
transport_document_cannot_be_superseded | invalid_request_error | 422 | Only an issued transport document in progress can be marked as superseded by the carrier document. |
transport_document_file_unavailable | not_found_error | 410 | The PDF files of this transport document were purged when its retention period ended (one year after closing, cancelling or superseding it, and only because the account is closed). The document and its data are kept. |
transport_document_no_changes | invalid_request_error | 422 | The modification carries exactly the same data as the current version, so there is no new version to publish. |
transport_document_not_found | not_found_error | 404 | The identifier does not resolve to any transport control document of the authenticated company, or the public token does not exist. |
transport_document_not_issuable | invalid_request_error | 422 | The document cannot be issued: it is not a draft, or it lacks mandatory data of art. 6 of Orden FOM/2861/2012 (parties, tax IDs, shipper address, shipments with origin, destination, goods and declared measure, tractor plate or transport date). |
transport_document_not_sendable | invalid_request_error | 422 | The document cannot be emailed: it is not issued or closed, there is no recipient (no to and the carrier contact has no email), or to, cc and bcc add up to more than 5 addresses. |
transport_document_parties_immutable | invalid_request_error | 422 | After issuing, the contractual shipper and the effective carrier are fixed: the regulation does not allow changing them in a modification. |
transport_document_pdf_too_large | invalid_request_error | 422 | The PDF of the version would exceed the 5 MB (5,000,000 bytes) allowed by the regulation because of the amount of data in the document: shipments, goods lines, descriptions or notes. Nothing was saved. |
transport_document_version_limit_reached | invalid_request_error | 422 | A transport control document holds at most 50 versions and the last one is reserved for cancelling or superseding it, so it accepts no more modifications. Nothing was saved. |
transport_document_version_not_found | not_found_error | 404 | The transport document exists, but it has no version with the number requested in version: its versions go from 1 to the current one (current_version). |
transport_outside_spain | invalid_request_error | 422 | The control document only covers domestic transport, and a shipment starts or ends outside Spain. International transport is documented with the CMR consignment note. |
Related
Error codes by category
Find an error by the category that emits it.
Full reference table
All codes, HTTP statuses, types and descriptions in one reference.
Error model
Interpret the error envelope and handle errors by code.