> ## 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.

# Get Orders

> Retrieve orders with replicable filters and status-based searches

## Purpose

Fetches the statuses, customer details, and line items of your multi-channel orders in a single request.

## HTTP Request

```http theme={null}
GET 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>

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination (1-based).
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of orders per page.
</ParamField>

<ParamField query="status" type="string">
  Lifecycle state to filter by. Allowed values: `PENDING`, `RECEIVED`, `IGNORE`, `DELIVERED`.
</ParamField>

<ParamField query="with[]" type="array[string]">
  Related resources to include in each order. Repeat with indexed brackets (e.g. `with[0]=customer&with[1]=receipt`).
</ParamField>

<ParamField query="date[0]" type="string">
  Start date of a `created_at` range, inclusive. Format: `YYYY-MM-DD`. Pair with `date[1]`.
</ParamField>

<ParamField query="date[1]" type="string">
  End date of a `created_at` range, inclusive. Format: `YYYY-MM-DD`.
</ParamField>

<ParamField query="sort[0]" type="string">
  Field to sort by (e.g. `created_at`, `updated_at`, `id`).
</ParamField>

<ParamField query="sort[1]" type="integer">
  Sort direction: `1` = ascending, `-1` = descending.
</ParamField>

<ParamField query="filters[N]" type="array">
  Additional filter tuples using PHP bracket notation: `filters[N][0]=field_name&filters[N][1]=value`. Stack filters by incrementing `N` (0-based).
</ParamField>

## Request Example

<CodeGroup>
  ```bash curl theme={null}
  curl -X GET "https://integrations.clopos.com/open-api/v2/orders?limit=20&status=DELIVERED" \
    -H "x-token: oauth_example_token" \
  ```

  ```javascript javascript theme={null}
  const response = await fetch('https://integrations.clopos.com/open-api/v2/orders?limit=20&status=DELIVERED', {
    headers: {
      'x-token': 'oauth_example_token',
    }
  });

  const { data } = await response.json();
  ```

  ```python python theme={null}
  import requests

  url = "https://integrations.clopos.com/open-api/v2/orders"
  headers = {
      "x-token": "oauth_example_token",
  }
  params = {
      "limit": 20,
      "status": "DELIVERED"
  }

  response = requests.get(url, headers=headers, params=params)
  orders = response.json()
  ```
</CodeGroup>

## Response

### 200 OK — Orders list

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": 1,
      "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": "RECEIVED",
      "payload": {
        "auto_order_accept": false,
        "auto_order_sent_to_station": false,
        "delivery_fee": 2.5,
        "service": {
          "sale_type_id": 2,
          "venue_id": 1
        },
        "customer": {
          "id": 1,
          "phone": "+994705401040",
          "address": "123 Main St",
          "customer_discount_type": 1,
          "name": "Rahid Akhundzada"
        },
        "products": [
          {
            "product_id": 51,
            "count": 2,
            "product_modificators": [],
            "portion_size": 1,
            "meta": {
              "price": 8.5,
              "order_product": {
                "count": 2,
                "status": "new",
                "product_modificators": [],
                "product_hash": "abc123",
                "product": {
                  "id": 51,
                  "name": "Pizza",
                  "price": 8.5
                }
              }
            }
          }
        ],
        "meta": {
          "comment": "Leave at the door",
          "discount": {
            "discount_type": 1,
            "discount_value": 10
          },
          "apply_service_charge": true,
          "customer_discount_type": 1,
          "service_charge_value": 5
        },
        "customer_id": 1,
        "sale_type_id": 2
      },
      "created_at": "2026-02-02T13:45:53.000000Z",
      "updated_at": "2026-02-02T17:46:02.000000Z",
      "integration_response": null
    }
  ],
  "total": 4
}
```

### 401 Unauthorized — Authentication is missing or invalid

```json theme={null}
{
  "success": false,
  "error": "unauthorized",
  "message": "Missing or invalid authentication headers"
}
```

## Field Reference

### Order Object

| Field                  | Type              | Description                                                            |
| ---------------------- | ----------------- | ---------------------------------------------------------------------- |
| `id`                   | integer           | Order identifier.                                                      |
| `venue_id`             | integer           | Venue that owns the order.                                             |
| `type`                 | string            | Source of the order (e.g., `CALL_CENTER_ORDER`).                       |
| `integration`          | string            | Integration channel that created the order (e.g., `call_center_new`).  |
| `integration_uuid`     | string (nullable) | UUID assigned by the integration source.                               |
| `integration_id`       | string (nullable) | External ID from the integration source.                               |
| `integration_status`   | string            | State reported by the upstream integration (e.g., `CREATED`).          |
| `customer_ref_id`      | string (nullable) | External customer reference ID from the integration.                   |
| `status`               | string            | Current lifecycle state: `PENDING`, `RECEIVED`, `IGNORE`, `DELIVERED`. |
| `payload`              | object            | Full order content including service, customer, products, and meta.    |
| `payload.service`      | object            | Sale type and venue for the order.                                     |
| `payload.customer`     | object            | Customer details (id, phone, address, name).                           |
| `payload.products`     | array             | Line items with product\_id, count, modifiers, and pricing meta.       |
| `payload.meta`         | object            | Order-level metadata: comment, discount, service charge settings.      |
| `integration_response` | object (nullable) | Response data from the integration, if any.                            |
| `created_at`           | string            | Creation timestamp (ISO 8601).                                         |
| `updated_at`           | string            | Last update timestamp (ISO 8601).                                      |

## Notes

* When an order is created through this endpoint, the POS receives a push notification and notifies the clerk of the new order. `RECEIVED` orders automatically transition into open receipts.
* Use `status=PENDING` to monitor orders awaiting POS confirmation.
* Poll or subscribe to webhooks to track further status changes if your integration requires real-time updates.
