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

# Get Order

> Retrieve a single order by ID

# Get Order

Retrieve detailed information about a specific order.

<Note>Requires `read:orders` scope.</Note>

## Request

```bash theme={null}
GET /api/v1/orders/{id}
```

### Path Parameters

<ParamField path="id" type="integer" required>
  The order ID
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  The order object with full details including line items
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.zenflow.com.ar/api/v1/orders/12345" \
    -H "X-API-Key: zenflow_live_your_key"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.zenflow.com.ar/api/v1/orders/12345", {
    headers: { "X-API-Key": "zenflow_live_your_key" },
  });
  const data = await response.json();
  ```

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

  response = requests.get(
      'https://api.zenflow.com.ar/api/v1/orders/12345',
      headers={'X-API-Key': 'zenflow_live_your_key'}
  )
  data = response.json()
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": 12345,
    "order_tenant_id": "ORD-001",
    "state_id": 1,
    "state_picking_id": null,
    "assembly_date": "2024-01-15",
    "customer_name": "John Doe",
    "shipping_address": "123 Main St, City",
    "order_detail": [
      {
        "id": 1001,
        "product_id": 100,
        "barcode": "7891234567890",
        "product_name": "Widget A",
        "quantity": 2,
        "picked_quantity": 0,
        "price": 29.99
      },
      {
        "id": 1002,
        "product_id": 101,
        "barcode": "7891234567891",
        "product_name": "Widget B",
        "quantity": 1,
        "picked_quantity": 0,
        "price": 49.99
      }
    ],
    "created_at": "2024-01-14T10:30:00Z",
    "updated_at": "2024-01-14T10:30:00Z"
  }
}
```

## Error Responses

### 404 Not Found

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

### 400 Bad Request

```json theme={null}
{
  "success": false,
  "error": {
    "code": "invalid_id",
    "message": "Order ID must be a valid integer"
  }
}
```
