Factuarea APIDevelopers

Retrieve the serving plan of a sales order

Return what serving and invoicing a sales order needs: per line, what is pending, the reservation, availability per warehouse, incoming purchases, suggested sources and a purchase suggestion; plus the holder of the delivery notes and invoice_preview. - invoice_lines, invoice_series_id, invoice_date and buyer_tax_id simulate the invoice; nothing is reserved, numbered or written. - invoice_preview.type is F1, F2 or blocked with blocked_reason (months always present) and pending_by_month. - A series not for invoices or of another company is 404 series_not_found.

GET
/companies/{company}/sales-orders/{sales_order}/serving-plan

Authorization

AuthorizationBearer <token>

Your API key as a bearer token: fact_live_… in production, fact_test_… in sandbox. See the authentication guide.

In: header

Path Parameters

company*string

Public identifier (UUID v7) of the company. Get it from GET /v1/me (data.scope[].id).

Formatuuid
sales_order*string

Public identifier (UUID v7) of the sales order.

Formatuuid

Query Parameters

invoice_lines?

Simulated selection as invoice_lines[<order line id>]=<quantity>: each line to invoice and its quantity. Omit it to simulate all that is pending. Nothing is written.

invoice_series_id?|

Public id of the invoice series to simulate, of the company and not archived.

Formatuuid
invoice_date?|

Requested invoice date (YYYY-MM-DD); the preview reports it as effective_date, the date the draft invoice is born with.

Formatdate
buyer_tax_id?|

Tax id typed by the user, simulated for the buyer identity check. Never stored.

Lengthlength <= 20

Headers

Factuarea-Version?string

Pin the API version (YYYY-MM-DD, Stripe-style date versioning) for this request; omit to use the key's pinned version, or the latest if none. Unsupported version → 400 unsupported_api_version; malformed → 400 parameter_invalid_format. The effective version is echoed in the Factuarea-Version response header. See the Versioning guide.

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json