Skip to main content

Create a sales order

POST 

/api/service/sales-orders

Creates a sales order for a customer. Needs a read-write API key. Prices, tax and totals are worked out by the server: leave unitPrice off a line to use the catalogue price. A price you send can be refused, depending on the workspace's pricing settings and the permissions of the user who created the key. The order starts as DRAFT, which reserves no stock, unless you send status: CONFIRMED, which confirms it and reserves stock. A confirmed order is refused if the customer's credit limit does not allow it or, when the workspace does not allow negative stock, stock does not cover it; with negative stock allowed it is confirmed and the shortfall is a backorder. Send an Idempotency-Key so a retry never creates a second order.

Request​

Responses​

The sales order that was created.

Response Headers
    X-ApiKey-RateLimit-Limit

    Requests per minute this API key is allowed.

    X-ApiKey-RateLimit-Remaining

    Requests left in the current one-minute window.

    X-ApiKey-RateLimit-Reset

    Seconds until the current window ends and the count resets.

    x-request-id

    Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.