Skip to the content
YallaRoute

Help · Developers: API keys and webhooks

API key scopes and sender-bound keys

Every key has one scope. Read can list, read, track, price and label shipments, check coverage, list locations, and read figures and vehicle positions. Write can do all of that and also book and cancel deliveries. Admin can do everything, including managing webhook endpoints through the API. A key limited to one sender only ever sees and books that sender's parcels.

Updated

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.

Scopes by endpoint
RequestScope neededA sender-bound key
GET /api/v1 (the index)NoneWorks
GET /api/v1/track/{id}NoneWorks
GET /api/v1/shipments, GET /api/v1/shipments/{id}readOnly that sender's shipments; others answer 404
GET /api/v1/shipments/{id}/labelreadOnly that sender's shipments
POST /api/v1/rates/quotereadPriced at the sender's contract rate
GET /api/v1/coverage/checkreadWorks
GET /api/v1/locationsreadRefused with 403
GET /api/v1/statsreadCounts only that sender's parcels
GET /api/v1/fleet/positionsreadRefused with 403
POST /api/v1/shipmentswriteAlways books for that sender
POST /api/v1/shipments/{id}/cancelwriteOnly that sender's shipments
GET, POST /api/v1/webhooks and DELETE /api/v1/webhooks/{id}adminRefused 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.

Try it in your own workspace

A new workspace has the Scale features for its first 14 days. Open one and follow this article with your own data.