- Where
- Console, Developers (API keys); sender portal, Developers
- Who can do it
- Owners create company keys; senders create their own in the portal
- Plans
- REST API is included in Growth, Scale and Enterprise
In detail
Scopes are ordered: write includes read, and admin includes write. A request that needs more than the key allows is refused with 403 insufficient_scope, and the error names the scope it needed in required_scope.
| Request | Scope needed | A sender-bound key |
|---|---|---|
| GET /api/v1 (the index) | None | Works |
| GET /api/v1/track/{id} | None | Works |
| GET /api/v1/shipments, GET /api/v1/shipments/{id} | read | Only that sender's shipments; others answer 404 |
| GET /api/v1/shipments/{id}/label | read | Only that sender's shipments |
| POST /api/v1/rates/quote | read | Priced at the sender's contract rate |
| GET /api/v1/coverage/check | read | Works |
| GET /api/v1/locations | read | Refused with 403 |
| GET /api/v1/stats | read | Counts only that sender's parcels |
| GET /api/v1/fleet/positions | read | Refused with 403 |
| POST /api/v1/shipments | write | Always books for that sender |
| POST /api/v1/shipments/{id}/cancel | write | Only that sender's shipments |
| GET, POST /api/v1/webhooks and DELETE /api/v1/webhooks/{id} | admin | Refused with 403 |
Sender-bound keys
A sender-bound key belongs to one of your sender accounts. It is the right key for a business customer's own web shop, or for an integration you run on a customer's behalf. It can be created in two places:
- by an owner, under Developers, with Limit to one sender. It can have the read or write scope, never admin.
- by the sender, in the Developers page of the sender portal. Senders choose read only, or read and write. See sender access to the API.
Whichever way it was made, the key can never see, price for or book another sender's parcels, and asking for something company-wide, such as vehicle positions, is refused with 403 forbidden. Owners see sender keys in the console's key list and can revoke them there.
Coverage and locations
The coverage check answers whether the company delivers to an address or position, and with which services, so a checkout can offer only what will be accepted. It works with sender-bound keys too. The list of locations is company-wide, so a sender-bound key cannot read it.