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

# Get Order

> Get details of a specific order

# Get Order

Returns detailed information about a specific order.

**Requires customer authentication.**

## Request

<ParamField header="X-API-Key" type="string" required>
  Your API key
</ParamField>

<ParamField header="Authorization" type="string" required>
  Customer token: `Bearer {token}`
</ParamField>

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

## Response

<ResponseExample>
  ```json theme={null}
  {
    "status": true,
    "message": "Order retrieved",
    "data": {
      "id": "txn_abc123",
      "status": "completed",
      "payment_status": "paid",
      "fulfillment_status": "shipped",
      "subtotal": 5998,
      "discount": 600,
      "shipping": 599,
      "tax": 432,
      "total": 5829,
      "currency": "USD",
      "items": [
        {
          "product_id": 12345,
          "product_title": "Premium T-Shirt",
          "variant_label": "Size: Medium",
          "quantity": 2,
          "unit_price": 2999,
          "total": 5398
        }
      ],
      "shipping_address": {
        "first_name": "John",
        "last_name": "Doe",
        "address": "123 Main St",
        "city": "New York",
        "state": "NY",
        "zip_code": "10001",
        "country": "US"
      },
      "tracking": {
        "carrier": "UPS",
        "tracking_number": "1Z999AA10123456784",
        "tracking_url": "https://..."
      },
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-16T14:20:00Z"
    }
  }
  ```
</ResponseExample>

## Order Statuses

| Status       | Description                       |
| ------------ | --------------------------------- |
| `pending`    | Order created, awaiting payment   |
| `processing` | Payment received, preparing order |
| `completed`  | Order fulfilled                   |
| `cancelled`  | Order was cancelled               |
| `refunded`   | Order was refunded                |

## Errors

| Error Code               | Description                       |
| ------------------------ | --------------------------------- |
| `ORDER_NOT_FOUND`        | Order doesn't exist               |
| `AUTH_PERMISSION_DENIED` | Order belongs to another customer |

## Example

```bash theme={null}
curl "https://api.khaime.com/api/v1/order/txn_abc123" \
  -H "X-API-Key: pk_live_your_api_key" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
```
