Packing authorizations
Let a contract packer pack your products.
Endpoints
List packing authorizations
https://api.dawatrack.com/partner-api/v1/packing-authorizations/
Authorizations you granted as a brand owner or received as a packer, each with is_active.
events:write
Limit 5,000 per day
Query parameters
-
orderingstring OptionalWhich field to use when ordering the results.
-
pageinteger OptionalA page number within the paginated result set.
-
page_sizeinteger OptionalNumber of results to return per page.
-
searchstring OptionalA search term.
Example request
curl -X GET https://api.dawatrack.com/partner-api/v1/packing-authorizations/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.get(
"https://api.dawatrack.com/partner-api/v1/packing-authorizations/",
headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/packing-authorizations/", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
console.log(await response.json());
Response fields
A page of results. These are the fields of each item in results. See Pagination.
-
idinteger Read-onlyThe record's id.
-
brand_ownerstringThe manufacturer that granted it.
-
packerstringThe partner allowed to pack.
-
gtinsobjectGTIN-14s covered. Empty means all of the brand owner's products.
-
valid_fromdatetimeWhen the authorization starts.
-
valid_untildatetime or nullWhen it ends. Empty means no end date.
-
revoked_atdatetime or nullWhen it was revoked, if it was.
-
is_activeboolean Read-onlyWhether this record is active.
-
notestringe.g. the contract or agreement reference.
-
created_atdatetime Read-onlyWhen the record was created.
Example response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 42,
"brand_owner": "Example Pharmaceuticals Ltd",
"packer": "Example Packers Ltd",
"gtins": [
"06164004321562"
],
"valid_from": "2026-10-10T09:00:00Z",
"valid_until": "2026-10-10T09:00:00Z",
"revoked_at": "2026-10-10T09:00:00Z",
"is_active": true,
"note": "Contract CP-2026-11",
"created_at": "2026-10-10T09:00:00Z"
}
]
}
Status codes
200 | OK |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
429 | Rate limit exceeded |
Authorize a contract packer
https://api.dawatrack.com/partner-api/v1/packing-authorizations/
Let an approved partner pack your products.
events:write
Manufacturers only
Production credentials only
Limit 5,000 per day
Name the packer by packer_ppb_license_number or packer_gln. Leave out gtins to cover all your registered products.
Request body
JSON. Send Content-Type: application/json.
-
packer_ppb_license_numberstring OptionalThe packer's PPB licence number.
-
packer_glnstring OptionalOr the packer's GS1 GLN.
-
gtinsarray of strings OptionalYour GTINs it may pack. Omit for all of them.
-
valid_fromdatetime OptionalDefaults to now.
-
valid_untildatetime or null OptionalWhen it ends. Empty means no end date.
-
notestring Optional
Example request
curl -X POST https://api.dawatrack.com/partner-api/v1/packing-authorizations/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"packer_ppb_license_number": "PPB/M/2026/0042",
"gtins": [
"06164004321562"
],
"valid_until": "2027-12-31T23:59:59Z",
"note": "Contract CP-2026-11"
}'
import uuid
import requests
token = "..." # from POST /oauth/token/
response = requests.post(
"https://api.dawatrack.com/partner-api/v1/packing-authorizations/",
headers={"Authorization": f"Bearer {token}", "Idempotency-Key": str(uuid.uuid4())},
json={
"packer_ppb_license_number": "PPB/M/2026/0042",
"gtins": [
"06164004321562"
],
"valid_until": "2027-12-31T23:59:59Z",
"note": "Contract CP-2026-11"
},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/packing-authorizations/", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"packer_ppb_license_number": "PPB/M/2026/0042",
"gtins": [
"06164004321562"
],
"valid_until": "2027-12-31T23:59:59Z",
"note": "Contract CP-2026-11"
}),
});
console.log(await response.json());
Response fields
-
idinteger Read-onlyThe record's id.
-
brand_ownerstringThe manufacturer that granted it.
-
packerstringThe partner allowed to pack.
-
gtinsobjectGTIN-14s covered. Empty means all of the brand owner's products.
-
valid_fromdatetimeWhen the authorization starts.
-
valid_untildatetime or nullWhen it ends. Empty means no end date.
-
revoked_atdatetime or nullWhen it was revoked, if it was.
-
is_activeboolean Read-onlyWhether this record is active.
-
notestringe.g. the contract or agreement reference.
-
created_atdatetime Read-onlyWhen the record was created.
Example response
{
"id": 42,
"brand_owner": "Example Pharmaceuticals Ltd",
"packer": "Example Packers Ltd",
"gtins": [
"06164004321562"
],
"valid_from": "2026-10-10T09:00:00Z",
"valid_until": "2026-10-10T09:00:00Z",
"revoked_at": "2026-10-10T09:00:00Z",
"is_active": true,
"note": "Contract CP-2026-11",
"created_at": "2026-10-10T09:00:00Z"
}
Status codes
201 | Created |
400 | The request is invalid, for example a malformed GTIN or a missing field |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
409 | Conflict: a request with this Idempotency-Key is in progress, or the record already exists |
429 | Rate limit exceeded |
Revoke a packing authorization
https://api.dawatrack.com/partner-api/v1/packing-authorizations/{id}/
Revoke an authorization you granted. The record is kept, with revoked_at set.
events:write
Manufacturers only
Production credentials only
Limit 5,000 per day
Path parameters
-
idinteger Required
Example request
curl -X DELETE https://api.dawatrack.com/partner-api/v1/packing-authorizations/42/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.delete(
"https://api.dawatrack.com/partner-api/v1/packing-authorizations/42/",
headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/packing-authorizations/42/", {
method: "DELETE",
headers: {
Authorization: `Bearer ${token}`,
},
});
Response fields
-
idinteger Read-onlyThe record's id.
-
brand_ownerstringThe manufacturer that granted it.
-
packerstringThe partner allowed to pack.
-
gtinsobjectGTIN-14s covered. Empty means all of the brand owner's products.
-
valid_fromdatetimeWhen the authorization starts.
-
valid_untildatetime or nullWhen it ends. Empty means no end date.
-
revoked_atdatetime or nullWhen it was revoked, if it was.
-
is_activeboolean Read-onlyWhether this record is active.
-
notestringe.g. the contract or agreement reference.
-
created_atdatetime Read-onlyWhen the record was created.
Example response
{
"id": 42,
"brand_owner": "Example Pharmaceuticals Ltd",
"packer": "Example Packers Ltd",
"gtins": [
"06164004321562"
],
"valid_from": "2026-10-10T09:00:00Z",
"valid_until": "2026-10-10T09:00:00Z",
"revoked_at": "2026-10-10T09:00:00Z",
"is_active": true,
"note": "Contract CP-2026-11",
"created_at": "2026-10-10T09:00:00Z"
}
Status codes
200 | OK |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
404 | Not found, or not visible to your credential |
429 | Rate limit exceeded |
Partner API v1. The API reference is generated from the API's own code.