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

# Get Order Codes

> Returns digital codes for the order in JSON format

## Get Order Digital Codes (JSON)

`GET /api/v1/orders/{order}/get-codes`

Returns digital codes for the order in JSON format.

### Path Parameters

| Parameter | Type          | Required | Description         |
| --------- | ------------- | -------- | ------------------- |
| `order`   | string (ULID) | ✅        | The `ulid` in order |

### Example Response

```json theme={null}
{
  "error": false,
  "message": "Codes retrieved successfully",
  "data": [
    {
      "product_name": "Product Name",
      "status": "completed",
      "codes": [
        {
          "code": "XXXX-XXXX-XXXX-XXXX",
          "serial_number": "SN123456789",
          "pin_code": "1234",
          "expiration_date": "2026-01-30 00:00:00"
        }
      ]      
    }
  ]
}
```

Each product includes a `status` field indicating its fulfillment state: `completed` or `pending`.

### Responses

| Status             | Description                             |
| ------------------ | --------------------------------------- |
| `200 OK`           | Successful operation                    |
| `401 Unauthorized` | Missing or invalid authentication token |
| `403 Forbidden`    | Access denied                           |
| `404 Not Found`    | Order not found or no codes available   |

### 200 — Digital Codes

```json theme={null}
{
  "error": false,
  "message": "Codes retrieved successfully",
  "data": [
    {
      "product_name": "Product Name",
      "status": "completed",
      "codes": [
        {
          "code": "XXXX-XXXX-XXXX-XXXX",
          "serial_number": "SN123456789",
          "pin_code": "1234",
          "expiration_date": "2026-01-30 00:00:00"
        }
      ]
    }
  ]
}
```
