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

# Get Order History

> Retrieve the complete order history for a specific customer.

Fetch the complete order history for a specific customer identifier, including both active and expired orders.

## Request

### Headers

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

### Path Parameters

<ParamField path="customer_id" type="string" required>
  The customer's Discord ID or identifier.
</ParamField>

### Example Request

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

## Response

### Success Response

```json theme={null}
{
  "order_history": [
    {
      "_id": "64abc123def456789",
      "email": "user@example.com",
      "customer_discord_id": "123456789012345678",
      "product_id": "captcha",
      "product_name": "Captcha Proxies",
      "quantity": 10,
      "order_status": "active",
      "unix_purchase_date": 1753815092,
      "unix_expiration_date": 1756493492,
      "datacenter_details": {
        "proxy_username": "sub_1rqjp3jb4g9i6pkhdwmkpjob",
        "proxy_password": "stat261",
        "proxy_port": 3128
      }
    },
    {
      "_id": "64xyz789abc123456",
      "email": "user@example.com",
      "customer_discord_id": "123456789012345678",
      "product_id": "x1",
      "product_name": "X1 Fiber ISP",
      "quantity": 5,
      "order_status": "expired",
      "unix_purchase_date": 1750000000,
      "unix_expiration_date": 1752678400
    }
  ]
}
```

### Response Fields

<ResponseField name="order_history" type="array">
  Array of order objects for the customer.
</ResponseField>

### Order Object Fields

| Field                  | Type    | Description                         |
| ---------------------- | ------- | ----------------------------------- |
| `_id`                  | string  | MongoDB document ID                 |
| `email`                | string  | Customer's email address            |
| `customer_discord_id`  | string  | Customer's Discord ID               |
| `product_id`           | string  | Product type identifier             |
| `product_name`         | string  | Human-readable product name         |
| `quantity`             | integer | Number of proxies                   |
| `order_status`         | string  | Status (active, expired, cancelled) |
| `unix_purchase_date`   | integer | Purchase timestamp                  |
| `unix_expiration_date` | integer | Expiration timestamp                |
| `datacenter_details`   | object  | Proxy credentials (if applicable)   |

### Error Responses

#### 503 Service Unavailable

```json theme={null}
{
  "error": "user_order_history_not_found"
}
```

## Use Case

This endpoint is useful for:

* Viewing a customer's complete purchase history
* Auditing past orders
* Customer support inquiries
* Building customer dashboards

## Notes

* Returns both active and expired orders
* Includes full order details including credentials for active orders
* The `customer_id` parameter uses the Discord ID field from legacy accounts
