---
title: "Create Order"
method: POST
path: "/{client_id}/orders/"
---

# Create Order

`POST /{client_id}/orders/`

## Request

- Base URL: `https://cf-blast.livelikecdn.com/api/v1/applications`
- URL: `https://cf-blast.livelikecdn.com/api/v1/applications/{client_id}/orders/`
- Auth: API key in header `Authorization`

Places a redemption order for the signed-in member. The member spends their reward item balance, or pays a provider in cash, on a product variant. Eligibility, stock and the balance debit are handled together, so an order either goes through completely or not at all. The caller must be a member of the application.

Send an `idempotency_key` so a retried request can't place the order twice. Repeating a key with the same request returns the original order with status 200 instead of 201. Reusing a key for a different request fails with 409.

An order can contain only one item for now. The response is the order, in the same shape as Retrieve Order, plus `new_balance`, the member's current balance in the order's reward item. It is null for a cash order.

Errors come back as `detail` and `error_code`. A 400 means the request itself is wrong, for example an unknown variant. A 422 means the order is valid but the current state blocks it, for example out of stock, insufficient balance, or a product that is expired or the member isn't eligible for.

## Path parameters

- `client_id` string, required

## Request body

- object
  - `idempotency_key` string, required: A unique key for this order, chosen by the client. Reuse it only to retry the same request.
  - `items` object[], required: The variant to redeem. Exactly one item is allowed.
    - `variant_id` string, uuid, required: The ID of the product variant to redeem.
    - `quantity` integer: How many units to redeem.

## Response `201`

Created. The order was placed.

- object
  - `id` string, uuid
  - `status` string
  - `total_amount` string
  - `new_balance` string, nullable

## Other responses

- `400`: The request is invalid.
- `409`: The idempotency key was already used for a different request.
- `422`: A valid order that the current state blocks.

---

[API](https://skmtc.dev/livelike/apis/applications.md) - [All operations](https://skmtc.dev/livelike/apis/applications/llms.txt) - [OpenAPI document](https://skmtc.dev/livelike/apis/applications/revisions/841be2451373?raw)
