Create a parked sales order
unleashed_create_sales_orderCreate a DRAFT sales order with status Parked (reserves no stock, posts nothing to accounting — a person places or completes it in Unleashed). Line totals, line tax, SubTotal, TaxTotal and Total are computed for you to satisfy Unleashed's validation (SubTotal = sum of line totals, TaxTotal = sum of line taxes, Total = SubTotal + TaxTotal). Unleashed: POST /SalesOrders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | At least one order line. | |
| taxCode | No | Tax code as configured in Unleashed, e.g. GST. | |
| taxRate | Yes | Tax rate as a fraction, e.g. 0.15 for 15%. | |
| comments | No | Order comments. | |
| orderDate | No | Order date (YYYY-MM-DD). Default today. | |
| orderNumber | No | Order number; generated by Unleashed if omitted. | |
| currencyCode | Yes | Order currency code, e.g. NZD. | |
| customerCode | Yes | The customer's code. | |
| exchangeRate | No | Exchange rate to the base currency. Default 1. | |
| requiredDate | No | Required date (YYYY-MM-DD). | |
| warehouseCode | Yes | The warehouse code to sell from. |