API Overview
The FlexOps API is a RESTful JSON API that gives you access to multi-carrier shipping, tracking, and analytics through a single integration.
Base URL
| Environment | URL |
|---|---|
| Production | https://api.flexops.io/v1 |
| Sandbox | https://sandbox.flexops.io/v1 |
Use the sandbox environment for development and testing. All endpoints behave identically, but no real shipments are created and no charges are incurred.
Authentication
All requests require an API key via the X-API-Key header:
curl -X GET https://api.flexops.io/v1/carriers \
-H "X-API-Key: your-api-key"
See Authentication for details on API keys and JWT bearer tokens.
Request flow
A typical shipping integration follows this pattern:
Request format
All request bodies must be JSON with Content-Type: application/json.
Response format
All responses return JSON. Successful responses return the resource directly:
{
"id": "lbl_abc123",
"trackingNumber": "9400111899223456789012",
"carrier": "usps",
"service": "priority",
"status": "created",
"labelUrl": "https://api.flexops.io/v1/labels/lbl_abc123/download",
"rate": {
"amount": 7.85,
"currency": "USD"
},
"createdAt": "2026-03-10T14:30:00Z"
}
List endpoints return paginated results:
{
"data": [...],
"pagination": {
"page": 1,
"pageSize": 25,
"totalCount": 142,
"totalPages": 6
}
}
Idempotency
All POST requests support idempotency via the Idempotency-Key header:
curl -X POST https://api.flexops.io/v1/labels \
-H "X-API-Key: your-api-key" \
-H "Idempotency-Key: order-12345-label" \
-H "Content-Type: application/json" \
-d '{...}'
If you retry the same request with the same idempotency key, you'll receive the original response without creating a duplicate resource. Keys expire after 24 hours.
The idempotency key is scoped to your workspace. If you send the same key with a different request body, the API returns a 409 Conflict error.
Correlation IDs
Every response includes an X-Correlation-ID header. Include this when contacting support for faster issue resolution.
Endpoints at a glance
| Endpoint | Methods | Description |
|---|---|---|
/v1/shipments | POST, GET | Create and list shipments |
/v1/rates | POST | Compare carrier rates |
/v1/tracking/:number | GET | Track shipments |
/v1/labels | POST, GET | Create, retrieve, and download labels |
/v1/addresses/validate | POST | Validate and standardize addresses |
/v1/carriers | GET | List carriers and services |
/v1/webhooks | POST, GET, DELETE | Manage webhook subscriptions |
/v1/analytics | GET, POST | Savings, performance, and predictions |