Create order
create_orderCreate an order with line items. Currency is required: use trusted source facts or CRM product prices; never guess or convert. Idempotent by externalId: re-sending the same request returns the existing order. Counts toward the plan's monthly order limit (403 PLAN_LIMIT_EXCEEDED when reached). The result echoes the operating workspace. Use search_products first. For a promo code use quote_order_promotion, then send promotion.code and promotion.expectedTotal. CRM alone calculates discounts, net totals, usage limits and free shipping. Do not invent a discount, send a legacy discountAmount, or promise free shipping from your own arithmetic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Order line items (1-100). Each snapshots productName/sku/unitPrice. | |
| notes | No | Internal note stored on the order. For a delivery instruction from the buyer use delivery.comment instead. | |
| currency | Yes | Required ISO 4217 currency code from the source facts or selected CRM product prices. Never guess or convert between currencies. | |
| customer | No | Optional buyer snapshot (name/email/phone, or a storefront customer externalId). Omit for an anonymous order. | |
| delivery | No | How the buyer asked to receive the order: carrier, branch/courier/pickup, branch text, recipient, cash-on-delivery and a delivery note. This is the buyer's choice at checkout — it does not dispatch anything. Record what actually ships with POST /orders/{externalId}/shipments. | |
| promotion | No | Ask the CRM to validate and calculate this promo code. Do not supply promoCode, discountAmount or shippingThresholdAmount alongside it. An optional expectedTotal refuses a changed quote; the server always owns the actual discount. | |
| externalId | Yes | A stable unique id for this order in your system — the idempotency key. Re-sending the same externalId returns the existing order instead of creating a duplicate (e.g. 'mcp-<uuid>'). |