order.create
Create an immutable order from a snapshot (frozen lines/totalizers/buyer/address). Requires an active reservation.
- Scope:
order.write - System: no
- Reachable from:
POST /v1/commands/order.create(tenant credential) · MCP toolorder.create· SDKclient.call('order.create', …) - Events:
order.created
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "buyer": { "properties": { "email": { "minLength": 1, "type": "string" }, "name": { "type": "string" }, "phone": { "type": "string" }, "tax_id": { "type": "string" } }, "required": [ "email" ], "type": "object" }, "cart_id": { "type": "string" }, "currency": { "minLength": 1, "type": "string" }, "custom_fields": { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" }, "lines": { "items": { "properties": { "custom_fields": { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" }, "qty": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "sku_id": { "minLength": 1, "type": "string" }, "sku_name": { "type": "string" }, "title": { "minLength": 1, "type": "string" }, "unit_amount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "sku_id", "title", "unit_amount", "qty" ], "type": "object" }, "minItems": 1, "type": "array" }, "origin": { "properties": { "city": { "type": "string" }, "name": { "type": "string" }, "region": { "type": "string" } }, "type": "object" }, "reservation_id": { "minLength": 1, "type": "string" }, "shipping_address": { "properties": { "city": { "minLength": 1, "type": "string" }, "country_code": { "minLength": 1, "type": "string" }, "line1": { "minLength": 1, "type": "string" }, "line2": { "type": "string" }, "neighborhood": { "type": "string" }, "number": { "type": "string" }, "postal_code": { "minLength": 1, "type": "string" }, "recipient": { "type": "string" }, "region": { "minLength": 1, "type": "string" } }, "required": [ "line1", "city", "region", "postal_code", "country_code" ], "type": "object" }, "shipping_delivery_max_days": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "shipping_delivery_min_days": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "shipping_method_label": { "type": "string" }, "store": { "minLength": 1, "type": "string" }, "total_amount": { "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "totalizers": { "items": { "properties": { "amount": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "id": { "minLength": 1, "type": "string" }, "name": { "minLength": 1, "type": "string" } }, "required": [ "id", "name", "amount" ], "type": "object" }, "type": "array" } }, "required": [ "store", "buyer", "shipping_address", "lines", "totalizers", "total_amount", "currency", "reservation_id" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "order_id": { "type": "string" } }, "required": [ "order_id" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)