Skip to content

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 the order:write scope and Ocp-Apim-Subscription-Key: <subscription_key>. See Getting Started.


POST /checkout/v1/create

The 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 your checkoutId.
  • 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.

POST /checkout/v1/submit
{
"checkoutId": "019fd6cac2fd7383ac6d759468e7360c"
}

Response — 204 No Content (no body)

Key points:

  • 204 is the single source of truth that the order is placed. Nothing else confirms it.
  • Omitting deliveryOptionId means “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.

GET /checkout/v1/019fd6cac2fd7383ac6d759468e7360c

Response — 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.


Submitting the same checkoutId twice never places a second order.

POST /checkout/v1/submit { "checkoutId": "019fd6..." } → 204
POST /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.

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.

Terminal window
# 1. Create
curl -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. Submit
curl -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