Scopes and partner types
Each credential holds a set of scopes. Each endpoint needs one scope, and some also need a manufacturer or a production credential.
Scopes by partner type
A new credential gets the scopes for its partner type:
| Partner type | Scopes |
|---|---|
| Manufacturer | products:readproducts:writebatches:readevents:writerecalls:readrecalls:writewebhooks:manageorders:readorders:write |
| Distributor / Wholesaler | products:readbatches:readevents:writerecalls:readrecalls:acknowledgewebhooks:manageorders:readorders:write |
| Pharmacy / Hospital | products:readbatches:readevents:writerecalls:readrecalls:acknowledgewebhooks:manage |
facilities:read, for verifying a facility licence, isn't in any default set. Ask us to add it to your credential.
What each endpoint needs
Read from each endpoint's own access rules.
| Endpoint | Scope | Also needs |
|---|---|---|
POST /oauth/token/ |
None. No token needed. | Nothing else |
GET /products/ |
products:read |
Nothing else |
POST /products/ |
products:write |
Production credential |
GET /products/{gtin}/ |
products:read |
Nothing else |
GET /facilities/verify/ |
facilities:read |
Nothing else |
GET /parties/ |
batches:read |
Nothing else |
PATCH /parties/{id}/ |
events:write |
Nothing else |
GET /batches/ |
batches:read |
Nothing else |
GET /batches/{gtin}/{batch_number}/ |
batches:read |
Nothing else |
GET /batches/{gtin}/{batch_number}/tree/ |
batches:read |
Nothing else |
GET /batches/{gtin}/{batch_number}/orphans/ |
batches:read |
Nothing else |
GET /batches/{gtin}/{batch_number}/epcis/ |
batches:read |
Nothing else |
GET /lots/ |
batches:read |
Nothing else |
GET /lots/{gtin}/{batch_number}/ |
batches:read |
Nothing else |
PATCH /lots/{gtin}/{batch_number}/ |
products:write |
Production credential |
POST /events/ |
events:write |
Nothing else |
GET /events/{id}/upstream/ |
batches:read |
Nothing else |
POST /events/bulk/ |
events:write |
Nothing else |
GET /events/bulk/{job_id}/ |
events:write |
Nothing else |
GET /receipts/incoming/ |
batches:read |
Nothing else |
POST /receipts/ |
events:write |
Production credential |
GET /consignments/ |
batches:read |
Nothing else |
GET /consignments/{number}/ |
batches:read |
Nothing else |
GET /purchase-orders/ |
orders:read |
Nothing else |
GET /purchase-orders/{id}/ |
orders:read |
Nothing else |
POST /purchase-orders/{id}/confirm/ |
orders:write |
Production credential |
POST /purchase-orders/{id}/reject/ |
orders:write |
Production credential |
POST /purchase-orders/{id}/delivery/ |
orders:write |
Production credential |
GET /units/ |
batches:read |
Nothing else |
GET /units/{gtin}/{serial}/ |
batches:read |
Nothing else |
POST /aggregations/ |
events:write |
Manufacturer, Production credential |
GET /aggregations/{sscc}/ |
batches:read |
Nothing else |
POST /aggregations/{sscc}/disaggregate/ |
events:write |
Production credential |
GET /packing-authorizations/ |
events:write |
Nothing else |
POST /packing-authorizations/ |
events:write |
Manufacturer, Production credential |
DELETE /packing-authorizations/{id}/ |
events:write |
Manufacturer, Production credential |
GET /recalls/ |
recalls:read |
Nothing else |
POST /recalls/ |
recalls:write |
Manufacturer, Production credential |
POST /recalls/drill/ |
recalls:write |
Manufacturer |
GET /recalls/{id}/ |
recalls:read |
Nothing else |
GET /recalls/{id}/tree/ |
recalls:read |
Nothing else |
GET /recalls/{id}/affected/ |
recalls:read |
Nothing else |
GET /recalls/{id}/affected/{facility_schema}/units/ |
recalls:read |
Nothing else |
POST /recalls/{id}/acknowledge/ |
recalls:acknowledge |
Nothing else |
GET /recalls/{id}/report/ |
recalls:read |
Manufacturer |
GET /recall-lookup/{gtin}/{batch_number}/ |
None. No token needed. | Nothing else |
POST /capture/code/ |
None. No token needed. | Nothing else |
POST /capture/receive/ |
None. No token needed. | Nothing else |
GET /webhooks/ |
webhooks:manage |
Nothing else |
POST /webhooks/ |
webhooks:manage |
Nothing else |
DELETE /webhooks/{id}/ |
webhooks:manage |
Nothing else |
GET /webhooks/{id}/deliveries/ |
webhooks:manage |
Nothing else |
POST /webhooks/{id}/test/ |
webhooks:manage |
Nothing else |
GET /version/ |
None. No token needed. | Nothing else |
GET /health/ |
None. No token needed. | Nothing else |
What you can see
Scopes decide which endpoints you can call. Your partner type and links decide which records they return:
- A manufacturer sees its own products, deliveries and recalls, through the supplier account its credential is linked to.
- A distributor or pharmacy sees records for the facilities its credential is linked to.
- A record you can't see returns
404, the same as one that doesn't exist.
Partner API v1. The API reference is generated from the API's own code.