Create an order
Records a pending order on the sales channel from the external
storefront's cart. Totals are computed from the prices the request
sends (products[].price, shipping.price, discount as a fraction
of the subtotal), not from the catalog; the customer is found by e-mail
or created. No stock is reserved and no payment is taken. Lines whose
product or variant is not an active one of this store are skipped.
Authorization
channel_key A sales channel's API key, generated in the admin under the channel.
In: header
Header Parameters
A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/storefront/orders" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"message": "string",
"status": "string",
"total_cents": 0
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}