Create sales order
kiotviet_create_orderWRITE: create a sales order (an order, not an invoice: no invoice is made and no payment is recorded) with lines of existing products in a branch, for an existing customer or none. Always confirm the products, quantities and prices with the user first. POST /orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The order lines. | |
| discount | No | Order discount amount. | |
| branch_id | Yes | Branch the order is for (see kiotviet_list_branches). | |
| sold_by_id | No | Salesperson user id (see kiotviet_list_users). | |
| customer_id | No | Existing customer id (see kiotviet_list_customers). | |
| description | No | Note on the order. | |
| sale_channel_id | No | Sales channel id. |