Factuarea APIDevelopers

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.

CodeTypeHTTPDescription
invoice_date_in_futureinvalid_request_error422The issue date asked for the invoice of the sales order is later than today.
invoice_spans_several_monthsinvalid_request_error422The 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_paymentinvalid_request_error422The 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_conflictinvalid_request_error422The tax id sent to complete the buyer identity differs from the one the sales order already has.
sales_order_has_invoicesinvalid_request_error422The order has a net invoiced amount (its invoices minus their corrective invoices): an invoiced order cannot be cancelled.
sales_order_line_already_servedinvalid_request_error422The 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_editableinvalid_request_error422The 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_foundnot_found_error404No 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_invalidinvalid_request_error422Serving 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_exceededpayment_required_error402The 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.

On this page

Need a hand?Contact support