The four calls most integrations make, in order, and the mistakes that cost people a day.
Base URL https://lastmilelabels.com/api/v1. Send Authorization: Bearer YOUR_KEY and JSON bodies. Money is returned as both a decimal string and integer cents.
- GET /account confirms the key works and shows the wallet balance and whether the key is live or test.
- POST /rates quotes an address and parcel without creating anything. Send a from address or a warehouse_id, the to address and the parcel; optionally ship_date and options.
- POST /orders creates the order, with validate: true to have the recipient address verified in the same call. Then GET /orders/{id}/rates for the cached rate list.
- POST /labels with order_id, service and an Idempotency-Key buys the label. The response carries the tracking number and a URL for the 4 × 6 PDF.
- GET /tracking/{number} or GET /labels/{id} returns the current status and scan events. POST /labels/{id}/void returns the postage.
Errors worth handling
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or revoked key. |
| 402 | insufficient_funds | Wallet too low and auto top-up did not cover it. The response says whether auto top-up is on. |
| 403 | insufficient_scope | The key lacks the permission for this endpoint. |
| 409 | duplicate_number | Your order_number already exists in the account. |
| 422 | validation_failed | A field is wrong; fields lists which. |
| 429 | rate_limited | Over 300 requests a minute; back off. |
| 502 | carrier_error | The carrier did not answer; safe to retry. |
The full reference with every field is on the Developers page.
Did this answer your question?
If not, customers can open Support in the app, and anyone can email support@lastmilelabels.com or call +1 (855) 995-4637.