Sales Orders error codes
Every public API error code emitted by Sales Orders, with its HTTP status, its type and a page per code.
Error codes emitted by Sales Orders. Each code links to its own page with the cause and the action to take.
| Code | Type | HTTP | Description |
|---|---|---|---|
invoice_date_in_future | invalid_request_error | 422 | The issue date asked for the invoice of the sales order is later than today. |
invoice_spans_several_months | invalid_request_error | 422 | The invoice of the sales order would mix goods served in delivery notes of different calendar months, and a summary invoice only groups one calendar month (art. 13.1 RD 1619/2012). |
sales_order_awaiting_payment | invalid_request_error | 422 | The order is a draft from the company's own storefront that is awaiting its payment: it is not confirmed, its lines are not edited and it is not deleted by hand, because the payment itself confirms it. |
sales_order_buyer_tax_id_conflict | invalid_request_error | 422 | The tax id sent to complete the buyer identity differs from the one the sales order already has. |
sales_order_has_invoices | invalid_request_error | 422 | The order has a net invoiced amount (its invoices minus their corrective invoices): an invoiced order cannot be cancelled. |
sales_order_line_already_served | invalid_request_error | 422 | The line already carries served quantity —a delivery note or an invoice was issued for it—, and served quantity cannot be withdrawn or reduced below what already left the warehouse. |
sales_order_not_editable | invalid_request_error | 422 | The order already left the state that admits changes: once it is confirmed, being picked, served, invoiced or cancelled, neither its header nor its lines can be edited. |
sales_order_not_found | not_found_error | 404 | No sales order of the authenticated company matches that identifier. An order belonging to another company answers exactly like one that never existed. |
sales_order_serving_groups_invalid | invalid_request_error | 422 | Serving a sales order from several warehouses received an invalid group: no groups, an empty group, a warehouse repeated in two groups or a line that does not belong to the order. A single delivery note whose selected lines leave from different warehouses is rejected the same way, with param lines. |
sales_orders_monthly_limit_exceeded | payment_required_error | 402 | The plan allowance of sales orders for the MONTH is exhausted. It counts the orders created by the company within the natural month, so the payload is correct: every further creation is rejected until the counter resets. |
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.