> ## Documentation Index
> Fetch the complete documentation index at: https://developer.clopos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Order (v2)

> Submit a POS order using the streamlined v2 schema

## Purpose

Create a new order in Clopos using the simplified v2 payload. Optional fields with defaults can be omitted.

## HTTP Request

```http theme={null}
POST https://integrations.clopos.com/open-api/v2/orders
```

<Warning>
  This endpoint requires authentication. Include your JWT in the `x-token` header. See [Authentication](/authentication) for how to obtain a token and [Errors](/errors) for error responses.
</Warning>

## Request Example

<CodeGroup>
  ```bash curl theme={null}
  curl --location 'https://integrations.clopos.com/open-api/v2/orders' \
    --header 'x-token: <your JWT token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "auto_accept_terminal": 1,
      "auto_order_accept": true,
      "auto_order_sent_to_station": true,
      "order_number": "A-1024",
      "sale_type_id": 2,
      "venue_id": 1,
      "delivery_fee": 2.5,
      "customer": {
        "id": 9,
        "phone": "+994705401040",
        "address": "123 Main St",
        "customer_discount_type": 1,
        "name": "Rahid Akhundzada"
      },
      "comment": "Leave at the door",
      "discount": {
        "discount_type": 1,
        "discount_value": 10
      },
      "service_charge": {
        "enabled": true,
        "value": 5
      },
      "products": [
        {
          "product_id": 101,
          "product_name": "Pizza",
          "count": 2,
          "price": 8.5,
          "status": "new",
          "product_hash": "abc123",
          "portion_size": 1,
          "note": "No onions",
          "modifiers": [
            {
              "modifier_id": 501,
              "modifier_name": "Extra Cheese",
              "count": 1,
              "price": 0.5,
              "portion_size": 1
            }
          ]
        }
      ]
    }'
  ```
</CodeGroup>

## Payload fields

### Top-level

* `auto_accept_terminal` (number, optional): Terminal that auto-accepts.
* `auto_order_accept` (boolean, default `false`): Auto-accept the order.
* `auto_order_sent_to_station` (boolean, default `false`): Auto-send to stations after acceptance.
* `order_number` (string, optional, max 20 chars): Custom order number to assign to the order.
* `sale_type_id` (number, required): Sale type to use.
* `venue_id` (number, required): Venue where the order belongs.
* `delivery_fee` (number, optional): Delivery charge to apply.
* `comment` (string, optional): Free text note for the order.

### Discounts

* `discount` (object, optional; defaults applied if present but fields omitted)
  * `discount_type` (number, default `0`)
  * `discount_value` (number, default `0`)

### Service charge

* `service_charge` (object, optional; defaults applied if present but fields omitted)
  * `enabled` (boolean, default `false`)
  * `value` (number, default `0`)

### Customer (required)

* `id` (number)
* `phone` (string)
* `address` (string)
* `customer_discount_type` (number)
* `name` (string)

### Products (array, required)

Each product item requires:

* `product_id` (number)
* `product_name` (string, required) — Display name of the product
* `count` (number)
* `price` (number)
* `status` (string)
* `product_hash` (string)
* `portion_size` (number, default `1`, optional)
* `note` (string, optional) — Free text note for the product (e.g., "No onions")
* `modifiers` (array, optional; defaults to `[]`)
  * `modifier_id` (number)
  * `modifier_name` (string, required) — Display name of the modifier
  * `count` (number)
  * `price` (number, default `0`, optional)
  * `portion_size` (number, default `1`, optional)

<Info>
  Optional fields and any values with defaults can be omitted; defaults are
  applied server-side .
</Info>

### Response (example)

```json theme={null}
{
  "success": true,
  "message": "Order created",
  "data": {
    "id": 295,
    "venue_id": 1,
    "type": "CALL_CENTER_ORDER",
    "integration": "call_center_new",
    "integration_uuid": null,
    "integration_id": null,
    "customer_ref_id": null,
    "integration_status": "CREATED",
    "status": "PENDING",
    "created_at": "2026-01-08T06:28:23.000000Z",
    "updated_at": "2026-01-08T06:28:23.000000Z",
    "integration_response": null
  }
}
```

## Response Field Reference

| Field                  | Type              | Description                                    |
| ---------------------- | ----------------- | ---------------------------------------------- |
| `id`                   | integer           | Newly created order identifier.                |
| `venue_id`             | integer           | Venue where the order was placed.              |
| `type`                 | string            | Order type (e.g., `CALL_CENTER_ORDER`).        |
| `integration`          | string            | Integration channel (e.g., `call_center_new`). |
| `integration_uuid`     | string (nullable) | UUID from the integration source, if provided. |
| `integration_id`       | string (nullable) | External ID from the integration source.       |
| `customer_ref_id`      | string (nullable) | External customer reference ID.                |
| `integration_status`   | string            | Initial integration state (`CREATED`).         |
| `status`               | string            | Initial order lifecycle state (`PENDING`).     |
| `integration_response` | object (nullable) | Response from the integration, if any.         |
| `created_at`           | string            | Creation timestamp (ISO 8601).                 |
| `updated_at`           | string            | Last update timestamp (ISO 8601).              |
