Creates a sales order, optionally with its lines (the app's New Sales Order page plus its item modal).
Requires ManageSalesOrders and an Idempotency-Key header. Body: { "customerId": 42, "customerPONumber": "PO-7781", "lines": [ { "itemId": 5, "quantity": 10, "unitPrice": 125.00 } ] }. Same code path and defaults as the app: the order is created Pending with the next SO{yy}{MM}{nnnn} number; taxRate omitted or 0 → the organization's default rate, and 0 for a tax-exempt customer; paymentTerms omitted → the organization's default terms; orderDate omitted → now. The customer must exist in this organization and not be marked Difficult, deliveryAddressId must be one of its addresses and each line's itemId a non-deleted catalog item — everything is checked before anything is written. Lines are added as the app adds them: two lines for the same item become one line (quantities add up; a later non-zero price or cost wins), line total = quantity × unit price, then subTotal, taxAmount and totalAmount are computed. The order's history records "Sales order created (via API key '…')". Creating reserves no stock; call POST /api/v1/sales-orders/{id}/fulfill to start fulfilment.
Request
- Base URL: https://app.flexonthejob.com
- URL: https://app.flexonthejob.com/api/v1/sales-orders
- Auth: HTTP bearer
Request body
Response
Created; body is the order as GET /api/v1/sales-orders/{id} returns it, Location points at it.
Changes
No recorded changes to this operation across all 1 revision of this API.