Message: order.create
Creates an new Order.
Schema
Body
orderNumber | string (optional) The OrderNumber to assign to the asset. If not set, the number is automatically generated. |
currencyCode | string ISO-4217 currency code (recommended), or a custom code. |
taxIncluded | boolean Whether monetary values on the order should be regarded as including tax or not. This applies to commands as well as the graph nodes generated by the actor. |
commands | array of command (optional) An array of order commands to be applied upon creation. If any command fail, the order will not be created. |
createdAt | any value (optional) Overrides `createdAt` value of the order. If not set (or set to the future), the time will be set to the current system time of creation. |
Response Type
stringRule Hooks
During the create message, the following Rule Hooks are run in the given order:
Examples
Create New Order
```json [{ "type": "create", "body": { "currencyCode": "EUR", "taxIncluded": true, "commands": [{ "type": "createDelivery", "deliveryId": "65812410-bd14-4d6d-ab79-374789a976c1", "shippingPrice": 100 },{ "type": "createOrderLine", "deliveryId": "65812410-bd14-4d6d-ab79-374789a976c1", "productNumber": "P1", "quantity": 1, "unitPrice": 90, "taxFactor": 0.25 } ] } }] ```