Batch Shipping
Create multiple labels in a single request for high-volume fulfillment.
Create a batch
curl -X POST https://api.flexops.io/v1/batches \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"shipments": [
{
"carrier": "usps",
"service": "priority",
"from": { "zip": "80202", "country": "US", "name": "Warehouse A", "street1": "100 Shipping Lane", "city": "Denver", "state": "CO" },
"to": { "zip": "97201", "country": "US", "name": "Jane Doe", "street1": "456 Oak Ave", "city": "Portland", "state": "OR" },
"parcel": { "weightOz": 16 },
"reference": "ORDER-001"
},
{
"carrier": "usps",
"service": "ground_advantage",
"from": { "zip": "80202", "country": "US", "name": "Warehouse A", "street1": "100 Shipping Lane", "city": "Denver", "state": "CO" },
"to": { "zip": "10001", "country": "US", "name": "John Smith", "street1": "789 Broadway", "city": "New York", "state": "NY" },
"parcel": { "weightOz": 8 },
"reference": "ORDER-002"
}
]
}'
Batch response
{
"batchId": "bat_abc123",
"status": "processing",
"totalShipments": 2,
"completed": 0,
"failed": 0,
"createdAt": "2026-03-10T12:00:00Z"
}
Checking batch status
curl -X GET https://api.flexops.io/v1/batches/bat_abc123 \
-H "X-API-Key: your-api-key"
When complete, each shipment in the batch includes its label URL and tracking number. Failed items include error details.
Limits
- Maximum 500 shipments per batch
- Batches are processed asynchronously
- Subscribe to
batch.completedwebhook for notifications