Skip to main content

Packing authorizations

Let a contract packer pack your products.

List packing authorizations

GET 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.

Scope events:write Limit 5,000 per day

Query parameters

  • ordering string Optional

    Which field to use when ordering the results.

  • page integer Optional

    A page number within the paginated result set.

  • page_size integer Optional

    Number of results to return per page.

  • search string Optional

    A 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.

  • id integer Read-only

    The record's id.

  • brand_owner string

    The manufacturer that granted it.

  • packer string

    The partner allowed to pack.

  • gtins object

    GTIN-14s covered. Empty means all of the brand owner's products.

  • valid_from datetime

    When the authorization starts.

  • valid_until datetime or null

    When it ends. Empty means no end date.

  • revoked_at datetime or null

    When it was revoked, if it was.

  • is_active boolean Read-only

    Whether this record is active.

  • note string

    e.g. the contract or agreement reference.

  • created_at datetime Read-only

    When the record was created.

Example response

JSON
{
  "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

200OK
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
429Rate limit exceeded

Authorize a contract packer

POST https://api.dawatrack.com/partner-api/v1/packing-authorizations/

Let an approved partner pack your products.

Scope 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_number string Optional

    The packer's PPB licence number.

  • packer_gln string Optional

    Or the packer's GS1 GLN.

  • gtins array of strings Optional

    Your GTINs it may pack. Omit for all of them.

  • valid_from datetime Optional

    Defaults to now.

  • valid_until datetime or null Optional

    When it ends. Empty means no end date.

  • note string 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

  • id integer Read-only

    The record's id.

  • brand_owner string

    The manufacturer that granted it.

  • packer string

    The partner allowed to pack.

  • gtins object

    GTIN-14s covered. Empty means all of the brand owner's products.

  • valid_from datetime

    When the authorization starts.

  • valid_until datetime or null

    When it ends. Empty means no end date.

  • revoked_at datetime or null

    When it was revoked, if it was.

  • is_active boolean Read-only

    Whether this record is active.

  • note string

    e.g. the contract or agreement reference.

  • created_at datetime Read-only

    When the record was created.

Example response

JSON
{
  "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

201Created
400The request is invalid, for example a malformed GTIN or a missing field
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
409Conflict: a request with this Idempotency-Key is in progress, or the record already exists
429Rate limit exceeded

Revoke a packing authorization

DELETE https://api.dawatrack.com/partner-api/v1/packing-authorizations/{id}/

Revoke an authorization you granted. The record is kept, with revoked_at set.

Scope events:write Manufacturers only Production credentials only Limit 5,000 per day

Path parameters

  • id integer 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

  • id integer Read-only

    The record's id.

  • brand_owner string

    The manufacturer that granted it.

  • packer string

    The partner allowed to pack.

  • gtins object

    GTIN-14s covered. Empty means all of the brand owner's products.

  • valid_from datetime

    When the authorization starts.

  • valid_until datetime or null

    When it ends. Empty means no end date.

  • revoked_at datetime or null

    When it was revoked, if it was.

  • is_active boolean Read-only

    Whether this record is active.

  • note string

    e.g. the contract or agreement reference.

  • created_at datetime Read-only

    When the record was created.

Example response

JSON
{
  "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

200OK
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
404Not found, or not visible to your credential
429Rate limit exceeded

Partner API v1. The API reference is generated from the API's own code.