Create an order from a webshop or other channel. The buyer is matched on email or created, lines are matched to variants by id, SKU, or EAN, and a promotion code is applied to the whole order. Posting the same `source` and `externalId` again returns the existing order with status 200 instead of creating a second one. Set `confirm` to reserve stock right away.
sb-auth-token<token>Supabase browser session cookie. Supabase may split larger session values into chunked cookies like sb-auth-token.0.
organizationId*stringuuidThe incoming order.
application/jsonconfirm*booleanfalsecurrency?string^[A-Z]{3}$customer?customerId?stringuuidcustomerNote*|length <= 4000deliveryMethod?string"pickup""own_delivery""carrier""digital""none"externalId*string1 <= length <= 200lines*array<>1 <= items <= 500notes*|length <= 4000promotionCode?string1 <= length <= 40requestedDeliveryDate?stringdateshippingAddress?source*string1 <= length <= 80vatInclusive?booleanReturns the order and whether it was created.
application/jsoncreated*booleanorder*curl -X POST 'https://app.localhost/api/v1/organizations/123/orders' \ -H 'Content-Type: application/json' \ -d '{ "confirm": false, "customerNote": "string", "externalId": "string", "lines": [ { "quantity": 1, "title": "string" } ], "notes": "string", "source": "string"}'{ "created": true, "order": { "canceledAt": "string", "channel": "manual", "completedAt": "string", "confirmedAt": "string", "createdAt": "string", "currency": "string", "customer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "deliveryMethod": "pickup", "formattedNumber": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoicingPolicy": "before_fulfillment", "number": 0, "quoteId": "826e5192-f8c6-4e24-aab3-3910e46c52b7", "quoteNumber": 0, "requestedDeliveryDate": "2019-08-24", "status": "draft", "subtotalExcl": 0, "totalIncl": 0, "updatedAt": "string", "vatTotal": 0, "buyerEmail": "string", "buyerName": "string", "buyerPhone": "string", "cancelReason": "string", "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e", "customerContactId": "94bcd060-4a66-4a44-96c9-7a2da2955e96", "customerNote": "string", "discountDescription": "string", "discountKind": "none", "discountValue": 0, "externalId": "string", "fulfillmentStatus": "unfulfilled", "invoices": [ { "amountDueCents": 0, "amountPaidCents": 0, "createdAt": "string", "displayNumber": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "status": "string", "totalIncl": 0 } ], "lines": [ { "allocated": 0, "backordered": 0, "description": "string", "discountKind": "none", "discountValue": 0, "fulfilled": 0, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoiced": 0, "lineType": "product", "position": 0, "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "productType": "string", "promotionId": "3eaf888b-516c-4eac-ac00-1312640986a2", "quantity": 0, "quantityCanceled": 0, "returned": 0, "sku": "string", "title": "string", "trackInventory": true, "unit": "string", "unitPrice": 0, "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf", "vatRate": 0 } ], "notes": "string", "paymentRequired": true, "paymentStatus": "none", "promotionId": "3eaf888b-516c-4eac-ac00-1312640986a2", "quoteInvoice": { "amountDueCents": 0, "amountPaidCents": 0, "createdAt": "string", "displayNumber": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "status": "string", "totalIncl": 0 }, "shippingAddress": { "city": "string", "country": "string", "line1": "string", "line2": "string", "name": "string", "phone": "string", "postalCode": "string" }, "source": "string", "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d", "vatInclusive": true, "vatRegime": "standard" }}