create_order
Create an order with line items and delivery. Link an existing customer or create a new one inline with name and contact details.
Instructions
Create an order with line items and delivery. Link an existing customer via customer_id/customer_external_id, or pass first_name (+phone/email) to create one inline. Returns {success, id, order?}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Site (store) symbolic code. Required on create/edit when the API key is scoped to multiple sites (see list_sites). | |
| No | Customer email | ||
| items | Yes | Order items (at least one required) | |
| phone | No | Customer phone number | |
| status | No | Initial order status code (e.g. 'new') | |
| last_name | No | Customer last name | |
| first_name | No | Customer first name (omit only when linking by customer_id/customer_external_id) | |
| order_type | No | Order type code | eshop-individual |
| customer_id | No | Link the order to an EXISTING customer by RetailCRM ID (mutually exclusive with inline name/phone/email) | |
| delivery_code | No | Delivery type code | |
| delivery_cost | No | Delivery cost | |
| delivery_address | No | Delivery address as free text | |
| customer_external_id | No | Link the order to an EXISTING customer by externalId |