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

# API Reference

> Complete reference for every Package Retriever API endpoint.

# API Reference

Base URL: `https://api.packageretriever.com/v1`

All requests require authentication via Bearer token:

```bash theme={null}
Authorization: Bearer pr_live_YOUR_KEY
```

Use `pr_test_` keys for sandbox mode (no billing, simulated responses).

## Endpoints

| Resource         | Endpoints                                        |
| ---------------- | ------------------------------------------------ |
| Addresses        | Validate address, get residential classification |
| Rates            | Multi-carrier rate shopping                      |
| Labels           | Create, view, and void shipping labels           |
| Tracking         | Register and poll tracking numbers               |
| Carrier Accounts | View connected BYOA accounts                     |
| Batches          | Batch label creation (up to 5,000)               |
| Wallet           | Check prepaid wallet balance                     |
| Webhooks         | Webhook delivery log                             |

## Response format

All successful responses return the resource object directly. All errors follow:

```json theme={null}
{
  "error": {
    "code": "RESOURCE.CATEGORY.SPECIFIC",
    "message": "What went wrong.",
    "suggestion": "What to do next.",
    "docs_url": "https://docs.packageretriever.com/...",
    "request_id": "req_xxxxxxxxx"
  }
}
```

## Rate limits

Every response includes `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers. See [Rate Limits](/guides/rate-limits) for the full published table.
