Create an order
cashctrl_create_orderDestructive
WRITE: changes the accounting records. Makes one request that is never repeated; check the result before trying again. Creates ONE order document for ONE customer or vendor: a quote, invoice, credit note, purchase bill and so on, depending on category_id. Without status_id the first status of the category is used; a booking status (for example Open) also creates journal entries, so use a draft status unless the user asks otherwise. No e-mail is sent. POST /order/create.json.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nr | No | Order number. Leave empty to use the sequence number of the category. | |
| date | Yes | Document date, yyyy-mm-dd. | |
| items | Yes | 1-200 order items. | |
| due_days | No | Days until payment is due. | |
| language | No | Language of the document. | |
| status_id | No | Status id (cashctrl_list_order_categories). Default: the first status of the category. | |
| account_id | No | Debtors or creditors account id; default from the category. | |
| category_id | Yes | Order category id (cashctrl_list_order_categories), for example the Invoice category. | |
| description | No | Description of the document (max 200). | |
| associate_id | Yes | The customer or vendor (cashctrl_list_persons). | |
| sequence_number_id | No | Sequence number for the order number (cashctrl_list_sequence_numbers). | |
| discount_percentage | No | Discount of the whole order in percent. |