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

# Order Items

> Retrieve the issued digital value codes for a completed order

Returns the issued digital value codes for a completed order. Only available once `status` is `COMPLETED` — call `GET /v2/orders/{orderId}` first to confirm completion before requesting items.

## Endpoint

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

## 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/items" \
  -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}/items`, {
  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 response.json();
// data is an array of issued codes
```

## Response — 200 OK

```json theme={null}
{
  "data": [
    {
      "itemNo": 1,
      "productId": 1725,
      "brand": "Apple",
      "currency": "USD",
      "faceValue": 25,
      "cardIdentifier": "39e43675-1c1f-46a0-b11e-fd2039f9ceaa",
      "giftCardNumber": "L8J9 HXY5 1234 1234",
      "giftCardPin": "1234 30",
      "barCodeNumber": "6258 7876 1770",
      "redemptionUrl": "https://djngbfz18880p.cloudfront.net/39e43675-1c1f-46a0-b11e-fd2039f9ceaa.html"
    },
    {
      "itemNo": 2,
      "productId": 1725,
      "brand": "Apple",
      "currency": "USD",
      "faceValue": 25,
      "cardIdentifier": "48f54786-2d2g-57b1-c22f-ge3140g0debb",
      "giftCardNumber": "K7H8 GWX4 5678 5678",
      "giftCardPin": "5678 40",
      "barCodeNumber": "7369 8987 2881",
      "redemptionUrl": "https://djngbfz18880p.cloudfront.net/48f54786-2d2g-57b1-c22f-ge3140g0debb.html"
    }
  ]
}
```

## Response Fields

| Field            | Type    | Description                                   |
| ---------------- | ------- | --------------------------------------------- |
| `itemNo`         | integer | Sequential item number within the order       |
| `productId`      | integer | Product identifier                            |
| `brand`          | string  | Brand name                                    |
| `currency`       | string  | Currency of the issued code                   |
| `faceValue`      | number  | Face value of this code                       |
| `cardIdentifier` | string  | Unique internal identifier for this code      |
| `giftCardNumber` | string  | The redemption code to give to your recipient |
| `giftCardPin`    | string  | PIN for the gift card, if applicable          |
| `barCodeNumber`  | string  | Barcode number, if applicable                 |
| `redemptionUrl`  | string  | URL where the recipient can redeem the code   |

<Note>
  For large orders, consider using `GET /v2/orders/{orderId}/fulfillments/export` instead — it returns a single CSV download URL containing all codes, which is more efficient than paginating through items.
</Note>

## Response — 409 Order Not Yet Completed

```json theme={null}
{
  "error": {
    "code": "BUSINESS_RULE_VIOLATION",
    "message": "Order items are not available until the order is COMPLETED"
  }
}
```

## Error Responses

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