---
search:
  tags:
    - Orders
    - POST
seo:
  description: >-
    Creates a new order with order lines, addresses, and payment… Reference for
    the POST /api/v1/{team_slug}/{app_slug}/orders endpoint in the Management
    API.
sidebar:
  label: Create order
  badge: POST
title: Create order
type: openapi-operation
---
Creates a new order with order lines, addresses, and payment information. Validates that all products and variants exist. Publishes an order created event.

`POST /api/v1/{team_slug}/{app_slug}/orders`

**Request body** (`application/json`, required)

Order data

- `billing_address` (internal_pkg_webserver_v1.InputOrderAddress)
- `bonus_total` (number)
- `country_code` (string, required)
- `currency_code` (string, required)
- `discount_total` (number)
- `gift_card_total` (number)
- `grand_total` (number, required)
- `language_code` (string, required)
- `lines` (internal_pkg_webserver_v1.InputOrderLine[], required)
- `merchant_user_id` (string)
- `payment_method` (string)
- `payment_method_id` (string)
- `payment_method_name` (string)
- `reference` (string, required)
- `session_id` (string)
- `shipping_address` (internal_pkg_webserver_v1.InputOrderAddress)
- `shipping_methods` (string[])
- `shipping_total` (number)
- `source` (string, required)
- `status` (string, required)
- `sub_total` (number)
- `tax_total` (number)

Request body example:

```json
{
  "billing_address": {
    "city": "string",
    "country_code": "string",
    "email": "string",
    "family_name": "string",
    "given_name": "string",
    "postal_code": "string",
    "state_or_province": "string",
    "street_address": "string",
    "street_address_2": "string",
    "telephone_number": "string"
  },
  "bonus_total": 0,
  "country_code": "string",
  "currency_code": "string",
  "discount_total": 0,
  "gift_card_total": 0,
  "grand_total": 0,
  "language_code": "string",
  "lines": [
    {
      "base_price_amount": 0,
      "currency_code": "string",
      "product_id": "string",
      "quantity": 1,
      "tax_group_id": "string",
      "total_discount_amount": 0,
      "total_price_amount": 0,
      "total_tax_amount": 0,
      "variant_id": "string"
    }
  ],
  "merchant_user_id": "string",
  "payment_method": "string",
  "payment_method_id": "string",
  "payment_method_name": "string",
  "reference": "string",
  "session_id": "string",
  "shipping_address": {
    "city": "string",
    "country_code": "string",
    "email": "string",
    "family_name": "string",
    "given_name": "string",
    "postal_code": "string",
    "state_or_province": "string",
    "street_address": "string",
    "street_address_2": "string",
    "telephone_number": "string"
  },
  "shipping_methods": [
    "string"
  ],
  "shipping_total": 0,
  "source": "string",
  "status": "placed",
  "sub_total": 0,
  "tax_total": 0
}
```

**Responses**

- `201` — Order created successfully
- `400` — Invalid request (validation error, product/variant not found)
- `401` — Unauthorized access
- `500` — Internal server error

Response example, 201:

```json
{
  "data": {
    "billing_address": {
      "address_type": "string",
      "city": "string",
      "country_code": "string",
      "created_at": "string",
      "email": "string",
      "family_name": "string",
      "given_name": "string",
      "id": "string",
      "postal_code": "string",
      "state_or_province": "string",
      "street_address": "string",
      "street_address_2": "string",
      "telephone_number": "string",
      "updated_at": "string"
    },
    "bonus_total": 0,
    "country_code": "string",
    "created_at": "string",
    "currency_code": "string",
    "discount_total": 0,
    "discounts": [
      {
        "created_at": "string",
        "discount_id": "string",
        "id": "string",
        "name": "string",
        "order_id": "string",
        "updated_at": "string"
      }
    ],
    "gift_card_total": 0,
    "grand_total": 0,
    "id": "string",
    "language_code": "string",
    "merchant_user": {
      "email": "string",
      "id": "string",
      "name": "string",
      "surname": "string"
    },
    "order_lines": [
      {
        "base_price_amount": 0,
        "created_at": "string",
        "currency_code": "string",
        "first_image_path": "string",
        "id": "string",
        "order_id": "string",
        "product_id": "string",
        "product_name": "string",
        "product_number": "string",
        "quantity": 0,
        "short_description": "string",
        "tax_group_id": "string",
        "total_discount_amount": 0,
        "total_price_amount": 0,
        "total_sale_price": 0,
        "total_tax_amount": 0,
        "updated_at": "string",
        "variant_id": "string",
        "variant_name": "string",
        "variant_number": "string"
      }
    ],
    "order_tracking_reference": "string",
    "payment_method": "string",
    "payment_method_id": "string",
    "payment_method_name": "string",
    "reference": "string",
    "session_id": "string",
    "shipping_address": {
      "address_type": "string",
      "city": "string",
      "country_code": "string",
      "created_at": "string",
      "email": "string",
      "family_name": "string",
      "given_name": "string",
      "id": "string",
      "postal_code": "string",
      "state_or_province": "string",
      "street_address": "string",
      "street_address_2": "string",
      "telephone_number": "string",
      "updated_at": "string"
    },
    "shipping_methods": [
      "string"
    ],
    "shipping_total": 0,
    "source": "string",
    "sub_total": 0,
    "tax_total": 0,
    "updated_at": "string",
    "user_content": [
      {
        "content_type": "string",
        "filename": "string",
        "id": "string",
        "url": "string"
      }
    ]
  },
  "details": [
    "string"
  ],
  "success": true
}
```
