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

# List Orders

> List all active and cancelled (not yet expired) orders for the authenticated user or organization.

Retrieve a list of all active and cancelled (not yet expired) orders. Optionally include proxy details, and optionally include expired orders, in the response.

Each order includes a `status` field that is one of:

* `active` — currently active and renewing
* `cancelled` — set to cancel at period end, but still usable until expiration
* `expired` — past its expiration date (only returned when `include_expired=true`)

## Request

### Headers

| Header          | Value                   | Required |
| --------------- | ----------------------- | -------- |
| `Authorization` | `Bearer {your_api_key}` | Yes      |

### Query Parameters

<ParamField query="include_proxies" type="boolean">
  Set to `true` to include proxy details in the response. Default is `false`.
</ParamField>

<ParamField query="include_expired" type="boolean">
  Set to `true` to also include expired orders. Expired orders are excluded by default.
</ParamField>

<ParamField query="format" type="string">
  Proxy format when `include_proxies=true`. Options:

  * `ipup` - `ip:port:username:password` (default)
  * `upip` - `username:password:ip:port`
  * `upaip` - `username:password@ip:port`
  * `object` - JSON object format
</ParamField>

### Example Requests

#### Get Order Summaries

```bash theme={null}
curl -X GET "https://dashboard.statproxies.com/api/v2/order/list" \
  -H "Authorization: Bearer {your_api_key}"
```

#### Get Orders with Proxy Details

```bash theme={null}
curl -X GET "https://dashboard.statproxies.com/api/v2/order/list?include_proxies=true" \
  -H "Authorization: Bearer {your_api_key}"
```

#### Get Orders with Custom Format

```bash theme={null}
curl -X GET "https://dashboard.statproxies.com/api/v2/order/list?include_proxies=true&format=object" \
  -H "Authorization: Bearer {your_api_key}"
```

#### Include Expired Orders

```bash theme={null}
curl -X GET "https://dashboard.statproxies.com/api/v2/order/list?include_expired=true" \
  -H "Authorization: Bearer {your_api_key}"
```

## Response

### Success Response (Without Proxies)

```json theme={null}
{
  "response": "success",
  "summary": {
    "total_orders": 3,
    "total_proxies": 30,
    "by_category": {
      "datacenter": {
        "count": 2,
        "total_quantity": 20
      },
      "residential": {
        "count": 1,
        "total_quantity": 10
      }
    },
    "by_status": {
      "active": 2,
      "cancelled": 1
    }
  },
  "orders": [
    {
      "order_id": "sub_1rqjp3jb4g9i6pkhdwmkpjob",
      "subscription_id": "sub_1RqJP3JB4G9i6PKHDwmKPJOb",
      "status": "active",
      "product_type": "captcha",
      "product_name": "Captcha Proxies",
      "product_category": "datacenter",
      "quantity": 10,
      "unix_purchase_date": 1753815092,
      "unix_expiration_date": 1756493492,
      "customer": "clientabc",
      "origination": "api",
      "proxy_username": "sub_1rqjp3jb4g9i6pkhdwmkpjob"
    }
  ]
}
```

### Success Response (With Proxies)

```json theme={null}
{
  "response": "success",
  "summary": {
    "total_orders": 1,
    "total_proxies": 10,
    "by_category": {
      "datacenter": {
        "count": 1,
        "total_quantity": 10
      }
    },
    "by_status": {
      "active": 1
    }
  },
  "orders": [
    {
      "order_id": "sub_1rqjp3jb4g9i6pkhdwmkpjob",
      "subscription_id": "sub_1RqJP3JB4G9i6PKHDwmKPJOb",
      "status": "active",
      "product_type": "captcha",
      "product_name": "Captcha Proxies",
      "product_category": "datacenter",
      "quantity": 10,
      "unix_purchase_date": 1753815092,
      "unix_expiration_date": 1756493492,
      "proxy_username": "sub_1rqjp3jb4g9i6pkhdwmkpjob",
      "proxy_password": "stat261",
      "customer": "clientabc",
      "origination": "api",
      "proxies": [
        "31.193.191.6:3128:sub_1rqjp3jb4g9i6pkhdwmkpjob:stat261",
        "31.193.191.7:3128:sub_1rqjp3jb4g9i6pkhdwmkpjob:stat261"
      ]
    }
  ]
}
```

### Response Fields

<ResponseField name="response" type="string">
  Status of the request.
</ResponseField>

<ResponseField name="summary" type="object">
  Summary statistics for all orders.
</ResponseField>

<ResponseField name="summary.total_orders" type="integer">
  Total number of active orders.
</ResponseField>

<ResponseField name="summary.total_proxies" type="integer">
  Total number of proxies across all orders.
</ResponseField>

<ResponseField name="summary.by_category" type="object">
  Breakdown of orders by product category.
</ResponseField>

<ResponseField name="summary.by_status" type="object">
  Breakdown of orders by status (`active`, `cancelled`, `expired`). Only statuses present in the result set are included.
</ResponseField>

<ResponseField name="orders" type="array">
  Array of order objects.
</ResponseField>

### Order Object Fields

| Field                  | Type    | Description                                                                                      |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------ |
| `order_id`             | string  | Unique order identifier                                                                          |
| `subscription_id`      | string  | Stripe subscription ID                                                                           |
| `status`               | string  | Order status: `active`, `cancelled` (set to cancel at period end but still usable), or `expired` |
| `product_type`         | string  | Product type identifier                                                                          |
| `product_name`         | string  | Human-readable product name                                                                      |
| `product_category`     | string  | Category (datacenter, residential)                                                               |
| `quantity`             | integer | Number of proxies                                                                                |
| `unix_purchase_date`   | integer | Purchase timestamp                                                                               |
| `unix_expiration_date` | integer | Expiration timestamp                                                                             |
| `customer`             | string  | Customer identifier (if set)                                                                     |
| `origination`          | string  | Order source (api, dashboard)                                                                    |
| `proxy_username`       | string  | Proxy authentication username                                                                    |
| `proxy_password`       | string  | Proxy authentication password (only with `include_proxies=true`)                                 |
| `proxies`              | array   | List of proxy strings (only with `include_proxies=true`)                                         |

## Proxy Formats

When `include_proxies=true`, you can specify the format:

| Format           | Example Output                                                               |
| ---------------- | ---------------------------------------------------------------------------- |
| `ipup` (default) | `31.193.191.6:3128:username:password`                                        |
| `upip`           | `username:password:31.193.191.6:3128`                                        |
| `upaip`          | `username:password@31.193.191.6:3128`                                        |
| `object`         | `{"ip": "31.193.191.6", "port": 3128, "username": "...", "password": "..."}` |
