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

# Get Order

> Retrieve the status and details of a specific order

Returns the full details and current status of a specific order. Use this endpoint to poll for order completion after creating an order — poll until `status` is `COMPLETED` before attempting to retrieve codes.

## Endpoint

**GET /v2/orders/\{orderId}**

## Path Parameters

| Name      | Type   | Required | Description                                |
| --------- | ------ | -------- | ------------------------------------------ |
| `orderId` | string | Yes      | The order ID returned by `POST /v2/orders` |

## Example Request

```bash theme={null}
curl -X GET "https://partner.orbt.com/v2/orders/ORD-123456" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-client-id: YOUR_CLIENT_ID" \
  -H "x-timestamp: 2026-08-13T10:00:00.000Z" \
  -H "x-body-hash: BODY_HASH" \
  -H "x-signature: SIGNATURE"
```

```javascript theme={null}
const orderId = 'ORD-123456';

const response = await fetch(`https://partner.orbt.com/v2/orders/${orderId}`, {
  method: 'GET',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'x-client-id': 'YOUR_CLIENT_ID',
    'x-timestamp': timestamp,
    'x-body-hash': bodyHash,
    'x-signature': signature
  }
});
```

## Polling Pattern

<Note>
  Orders are processed asynchronously. Implement a polling loop with a delay between requests — we recommend polling every 3–5 seconds. Do not poll more frequently than once per second.
</Note>

```javascript theme={null}
async function waitForOrder(orderId) {
  while (true) {
    const res = await fetch(`https://partner.orbt.com/v2/orders/${orderId}`, {
      method: 'GET',
      headers: {
        'x-api-key': 'YOUR_API_KEY',
        'x-client-id': 'YOUR_CLIENT_ID',
        'x-timestamp': timestamp,
        'x-body-hash': bodyHash,
        'x-signature': signature
      }
    });

    const { data } = await res.json();

    if (data.status === 'COMPLETED') return data;

    if (['CANCELLED', 'ON_HOLD', 'OUT_OF_STOCK'].includes(data.status)) {
      throw new Error(`Order ${orderId} ended with status: ${data.status}`);
    }

    // Wait 3 seconds before next poll
    await new Promise(resolve => setTimeout(resolve, 3000));
  }
}
```

## Response — 200 OK (Pending)

```json theme={null}
{
  "data": {
    "id": "ORD-123456",
    "clientReference": "CLIENT-12345",
    "status": "PENDING",
    "currency": "USD",
    "totalAmount": 500,
    "itemCount": 15,
    "createdAt": "2026-08-13T10:00:00Z"
  }
}
```

## Response — 200 OK (Completed)

```json theme={null}
{
  "data": {
    "id": "ORD-123456",
    "clientReference": "CLIENT-12345",
    "status": "COMPLETED",
    "currency": "USD",
    "totalAmount": 500,
    "itemCount": 15,
    "createdAt": "2026-08-13T10:00:00Z",
    "completedAt": "2026-08-13T10:02:30Z"
  }
}
```

## Response Fields

| Field             | Type     | Description                                                            |
| ----------------- | -------- | ---------------------------------------------------------------------- |
| `id`              | string   | Orbt order ID                                                          |
| `clientReference` | string   | Your reference for this order                                          |
| `status`          | string   | Current order status. See status reference in the Overview page.       |
| `currency`        | string   | Wallet currency used for this order                                    |
| `totalAmount`     | number   | Total face value of the order                                          |
| `itemCount`       | integer  | Total number of items in the order                                     |
| `createdAt`       | datetime | Order creation timestamp                                               |
| `completedAt`     | datetime | Order completion timestamp. Only present when `status` is `COMPLETED`. |

## Error Responses

| Status | Code                   | Description                               |
| ------ | ---------------------- | ----------------------------------------- |
| `401`  | `AUTHENTICATION_ERROR` | Missing or invalid authentication headers |
| `404`  | `RESOURCE_NOT_FOUND`   | Order not found                           |
