> ## 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 Order by ID

> Retrieve a single order with status, customer, and line item details.

## Purpose

Return a specific order so you can inspect its metadata, customer, payment, and fulfillment status without fetching the entire list.

## HTTP Request

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

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

## Path Parameters

<ParamField path="id" type="string" required>
  Unique identifier of the order (numeric ID).
</ParamField>

## Query Parameters

<ParamField query="with[0]" type="string">
  Include related resources in the response. Currently supported: `receipt:id,service_notification_id,status`.
  When included, the `data.receipt` field will be present in the response (or `null` if no receipt exists for the order).
</ParamField>

## Request Example

<CodeGroup>
  ```bash curl theme={null}
  # Basic request
  curl --location "https://integrations.clopos.com/open-api/v2/orders/1" \
    -H "x-token: oauth_example_token" \

  # Request including receipt (note: --globoff to avoid shell globbing)
  curl --location --globoff 'https://integrations.clopos.com/open-api/v2/orders/1?with[0]=receipt%3Aid%2Cservice_notification_id%2Cstatus' \
    -H "x-token: oauth_example_token" \
  ```

  ```javascript javascript theme={null}
  // Basic request
  const orderId = 1;
  let url = `https://integrations.clopos.com/open-api/v2/orders/${orderId}`;

  // Include receipt
  const params = new URLSearchParams({
    'with[0]': 'receipt:id,service_notification_id,status'
  });
  const urlWithReceipt = `${url}?${params}`;

  const response = await fetch(urlWithReceipt, {
    headers: {
      'x-token': 'oauth_example_token',
    }
  });

  const order = await response.json();
  ```

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

  order_id = 1
  base = f"https://integrations.clopos.com/open-api/v2/orders/{order_id}"
  params = {
      'with[0]': 'receipt:id,service_notification_id,status'
  }
  headers = {
      "x-token": "oauth_example_token",
  }

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

## Response

### 200 OK — Order found

```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
  }
}
```

### 404 Not Found — Order does not exist

```json theme={null}
{
  "success": false,
  "error": "resource_not_found",
  "message": "Order not found"
}
```

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

* Returns the same structure as the list endpoint, providing parity between detail and collection responses.
* Use this endpoint after receiving webhook notifications to hydrate UI with complete order data.
* You can embed the linked receipt using the `with[0]` parameter. If the order has no receipt, `receipt` will be `null`.
* Combine with the receipts endpoint when you need final settlement information once the order is delivered.
