---
title: "Create a channel order (synchronous)"
method: POST
path: "/api/v1/orders"
tags: ["orders"]
---

# Create a channel order (synchronous)

`POST /api/v1/orders`

Validates and synchronously materializes a channel order: checks the channel is active; optionally links an existing customer by customer_id (the order is left unidentified when omitted); validates every item SKU against an active product and every payment method against an active payment method; cross-checks the subtotal against the sum of item totals; then persists the order, its items, addresses, mirrored payments and bootstrap timeline event in a single transaction. A duplicate (same external_order_id + channel) is rejected with 409. Authenticated as a channel service account.

## Request body

- OrderCreate
  - `requested_strategy_code` string, nullable
  - `source_store` string, nullable
  - `shipping_method` string, nullable
  - `currency` 'BRL' | 'USD'
  - `customer_id` string, uuid, nullable
  - `shipping_address` OrderAddressCreate
    - `zip_code` string, required
    - `street` string, required
    - `number` string, required
    - `complement` string, nullable
    - `district` string, required
    - `city` string, required
    - `state` string, required
    - `country` string, required
  - `billing_address` OrderAddressCreate
    - `zip_code` string, required
    - `street` string, required
    - `number` string, required
    - `complement` string, nullable
    - `district` string, required
    - `city` string, required
    - `state` string, required
    - `country` string, required
  - `items` OrderItemCreate[], required
    - `sku` string, required
    - `name` string, required
    - `quantity` number, required
    - `unit_price` number, required
    - `discount` number
    - `total_price` number, required
    - `category` string, nullable
    - `metadata` object, nullable
  - `payments` OrderPaymentInput[], required
    - `method` string, required
    - `amount` number, required
    - `installments` number
    - `gateway_payment_id` string, nullable
    - `status` 'PENDING' | 'PAID' | 'REJECTED' | 'REFUNDED', required
  - `totals` OrderTotalsCreate, required
    - `subtotal` number, required
    - `shipping` number, required
    - `discount` number, required
    - `total` number, required
  - `metadata` object, nullable
  - `external_order_id` string, required
  - `channel_code` string, required

## Response `201`

Order created.

- OrderCreateResponse
  - `id` string, required
  - `external_order_id` string, required
  - `channel_id` string, required
  - `customer_id` string, nullable, required
  - `requested_strategy_code` string, nullable, required
  - `source_store` string, nullable, required
  - `shipping_method` string, nullable, required
  - `status` string, required
  - `state_machine_version_id` string, required
  - `state_machine_id` string, required
  - `currency` 'BRL' | 'USD', required
  - `subtotal` number, required
  - `shipping` number, required
  - `discount` number, required
  - `total` number, required
  - `item_count` number, required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `400` — Invalid payload: schema violation, missing required field, or empty items/payments.
- `401` — Authentication is missing, malformed, expired, or refers to a session that is no longer active.
- `403` — The caller is authenticated but lacks the required permission for this action.
- `404` — One of the referenced resources (Customer, Product, PaymentMethod) was not found in the caller account.
- `409` — An order with the same external_order_id already exists for the channel.
- `422` — Business rule violation.
- `500` — Unexpected server error. The response body never leaks internal details.

---

[API](https://skmtc.net/kruzer-corp/apis/oms-api.md) · [All operations](https://skmtc.net/kruzer-corp/apis/oms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kruzer-corp/oms-api/revisions/38ef6e16a7a8/schema)
