Shipping API
Shipping built into your software
The same rating, label, tracking and returns engine behind our app, exposed as a clean REST API with sandbox keys, idempotent writes and webhooks. Included on the Scale plan.
curl https://api.lastmilelabels.com/v1/labels \
-H "Authorization: Bearer lml_live_..." \
-H "Idempotency-Key: order-10482" \
-d '{
"service": "usps_ground_advantage",
"ship_date": "2026-10-13",
"from": { "name": "Last Mile Labels", "street1": "10450 Pioneer Blvd",
"city": "Santa Fe Springs", "state": "CA", "zip": "90670", "country": "US" },
"to": { "name": "Jane Doe", "street1": "1 Infinite Loop",
"city": "Cupertino", "state": "CA", "zip": "95014", "country": "US" },
"parcel": { "length": 10, "width": 6, "height": 4, "weight_oz": 16 },
"label": { "format": "pdf", "size": "4x6" }
}'{
"id": "lbl_01HZX...",
"tracking_number": "9235990309268000990427",
"carrier": "usps",
"service": "usps_ground_advantage",
"cost": { "amount": 8.40, "currency": "USD" },
"label_url": "https://cdn.lastmilelabels.com/labels/....pdf",
"status": "preparing"
}Endpoints
Everything the app can do, you can do
Rates
POST a route and parcel, get every eligible service with price, zone and packaging. Filter by carrier or ask for one service.
Labels
Buy a label in one call with an idempotency key. Get back the tracking number, cost and a label file in PDF, PNG or ZPL. Void with a refund to your wallet.
Tracking and webhooks
Poll any tracking number or subscribe a webhook URL. We normalise carrier events into preparing, in transit, delivered, voided and exception.
Returns
Create return labels and QR codes for carrier drop-off, and track them separately from outbound shipments.
Manifests and pickups
Generate USPS SCAN forms and DHL manifests, and schedule USPS pickups from the same key.
Address validation
Verify and standardise US addresses before you rate or buy, with residential detection.
Designed for production
Boring in the best way
- Versioned API with a published OpenAPI spec and generated SDKs
- Sandbox keys that never charge postage
- Idempotency keys on every write, so retries are safe
- Per-key rate limits and scopes
- Signed webhooks with retries
- Full request and response history for 90 days
- Our field names, not the carrier's, so a carrier change never breaks you
Reseller program
Sell shipping to your own customers
For marketplaces, 3PLs and software platforms. Create sub-accounts under your account, each with its own prepaid wallet, spend caps and API keys. Set your markup on every label and keep the margin.
- Parent and child accounts with rolled-up ledgers
- Your markup, per service or per customer
- White-label tracking pages and notifications
- Volume pricing as you grow
- Onboarding and KYC handled with you
