Place a standard order
This is the shortest path to a placed order: create a draft, then submit it. You do not have to inspect delivery options — if you submit without choosing one, the first option Komplett prepared for the checkout is used.
Use this path when your integration does not offer the buyer a delivery choice. If it does, read Choose a delivery option instead.
Both calls need
Authorization: Bearer <access_token>with theorder:writescope andOcp-Apim-Subscription-Key: <subscription_key>. See Getting Started.
Step 1 — Create the draft
Section titled “Step 1 — Create the draft”POST /checkout/v1/createThe minimum viable body: what is being bought and where it goes.
{ "orderLines": [ { "materialId": { "type": "MaterialNumber", "value": "1245306" }, "quantity": 1 } ], "delivery": { "deliveryAddress": { "name": "Contoso AS", "addressLine1": "Storgata 1", "postCode": "0151", "city": "Oslo", "country": "NO", "email": "orders@contoso.example" } }}Response — 201 Created
{ "name": "CheckoutId", "value": "019fd6cac2fd7383ac6d759468e7360c"}Key points:
- Take
value— that is yourcheckoutId. - The id is an opaque string, currently 32 lowercase hex characters. Do not parse it or assume it is a GUID.
- Nothing is ordered yet. A checkout that is never submitted is not an order, and no stock is reserved.
- Validation is strict and returns every problem at once — see Handling failures.
Step 2 — Submit it
Section titled “Step 2 — Submit it”POST /checkout/v1/submit{ "checkoutId": "019fd6cac2fd7383ac6d759468e7360c"}Response — 204 No Content (no body)
Key points:
204is the single source of truth that the order is placed. Nothing else confirms it.- Omitting
deliveryOptionIdmeans “use the first option”, which is Komplett’s default choice for this checkout. It is a real, deliberate default — not a fallback. - Submit promptly. Drafts expire; see Timing below.
Step 3 — Confirm the outcome (optional)
Section titled “Step 3 — Confirm the outcome (optional)”GET /checkout/v1/019fd6cac2fd7383ac6d759468e7360cResponse — 200 OK (trimmed)
{ "checkoutId": "019fd6cac2fd7383ac6d759468e7360c", "status": "Placed", "delivery": { "options": [] }}status moves Created → Placed. The delivery menu remains readable after submission, so you
can show the buyer which method was used.
To follow the order itself from here, use the Orders API — the order carries
this checkoutId.
Retrying safely
Section titled “Retrying safely”Submitting the same checkoutId twice never places a second order.
POST /checkout/v1/submit { "checkoutId": "019fd6..." } → 204POST /checkout/v1/submit { "checkoutId": "019fd6..." } → 204 (replay, still one order)So if a 204 is lost to a network timeout, just send the request again. If the first submit is
still in flight you get 422 with detail: "Checkout submission is already in progress." — wait
and retry rather than creating a second checkout.
Timing
Section titled “Timing”Checkout drafts are short-lived. Create the draft at the moment the buyer commits, not at the
start of a long form. A draft left too long returns 422 with detail: "Checkout has expired.",
and the only recovery is to create a new checkout.
Complete example
Section titled “Complete example”# 1. Createcurl -s -X POST "https://<store-url>/public/checkout/v1/create" \ -H "Authorization: Bearer <access_token>" \ -H "Ocp-Apim-Subscription-Key: <subscription_key>" \ -H "Content-Type: application/json" \ -d '{ "orderLines": [ { "materialId": { "type": "MaterialNumber", "value": "1245306" }, "quantity": 1 } ], "delivery": { "deliveryAddress": { "name": "Contoso AS", "addressLine1": "Storgata 1", "postCode": "0151", "city": "Oslo", "country": "NO", "email": "orders@contoso.example" } } }'# → {"name":"CheckoutId","value":"019fd6cac2fd7383ac6d759468e7360c"}
# 2. Submitcurl -s -o /dev/null -w "%{http_code}\n" \ -X POST "https://<store-url>/public/checkout/v1/submit" \ -H "Authorization: Bearer <access_token>" \ -H "Ocp-Apim-Subscription-Key: <subscription_key>" \ -H "Content-Type: application/json" \ -d '{ "checkoutId": "019fd6cac2fd7383ac6d759468e7360c" }'# → 204