Aggregations
What is packed in a case or pallet, identified by its SSCC.
Endpoints
Declare an SSCC's contents
https://api.dawatrack.com/partner-api/v1/aggregations/
Declare which units, or nested cases, are packed under one SSCC.
events:write
Manufacturers only
Production credentials only
Limit 5,000 per day
A child unit's gtin with a wrong GS1 check digit is 400.
Every child unit must already have a COMMISSION event. You may pack it only if you are its product's registered manufacturer, or that manufacturer authorized you as a contract packer.
A child of type SSCC must itself already be declared, by you, by a brand owner that authorized you, or by a facility you're linked to.
DawaTrack records and forwards what you declare. It doesn't verify the physical contents.
An SSCC is declared once: declaring it again is 409.
When the units are all of one product, or the child SSCCs each hold one product's units, the count is checked against the packaging hierarchy declared for it. A different count is never refused, since the last case of a batch is often part-full: the response carries a warnings list instead.
Request body
JSON. Send Content-Type: application/json.
-
ssccstring Required18-digit GS1 AI (00) Serial Shipping Container Code.
-
childrenarray of objects RequiredChildren (SSCC or SGTIN) packed under this SSCC.
-
typeenum OptionalPossible values:SSCCSGTINDefault:
SGTIN -
ssccstring OptionalAn 18-digit GS1 Serial Shipping Container Code.
-
gtinstring OptionalThe product's GS1 GTIN, as 14 digits.
-
serialstring OptionalThe unit's serial number.
-
Example request
curl -X POST https://api.dawatrack.com/partner-api/v1/aggregations/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"sscc": "106164004000007317",
"children": [
{
"type": "SGTIN",
"gtin": "06164004321562",
"serial": "SN-0007731"
},
{
"type": "SGTIN",
"gtin": "06164004321562",
"serial": "SN-0007732"
}
]
}'
import uuid
import requests
token = "..." # from POST /oauth/token/
response = requests.post(
"https://api.dawatrack.com/partner-api/v1/aggregations/",
headers={"Authorization": f"Bearer {token}", "Idempotency-Key": str(uuid.uuid4())},
json={
"sscc": "106164004000007317",
"children": [
{
"type": "SGTIN",
"gtin": "06164004321562",
"serial": "SN-0007731"
},
{
"type": "SGTIN",
"gtin": "06164004321562",
"serial": "SN-0007732"
}
]
},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/aggregations/", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"sscc": "106164004000007317",
"children": [
{
"type": "SGTIN",
"gtin": "06164004321562",
"serial": "SN-0007731"
},
{
"type": "SGTIN",
"gtin": "06164004321562",
"serial": "SN-0007732"
}
]
}),
});
console.log(await response.json());
Response fields
-
ssccstringAn 18-digit GS1 Serial Shipping Container Code.
-
childrenarray of objectsThe facilities it passed the batch on to, in the same shape.
-
occurred_atdatetimeWhen the event happened.
-
created_atdatetimeWhen the record was created.
Example response
{
"sscc": "106164004000007317",
"children": [
{}
],
"occurred_at": "2026-10-10T09:00:00Z",
"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 |
404 | Not found, or not visible to your credential |
409 | Conflict: a request with this Idempotency-Key is in progress, or the record already exists |
429 | Rate limit exceeded |
Fetch an SSCC's contents
https://api.dawatrack.com/partner-api/v1/aggregations/{sscc}/
What was declared packed under an SSCC.
batches:read
Limit 5,000 per day
Limit 500 per day
Not limited to the partner that declared it, so a distributor or pharmacy can read what the manufacturer packed.
Path parameters
-
ssccstring Required
Example request
curl -X GET https://api.dawatrack.com/partner-api/v1/aggregations/106164004000007317/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.get(
"https://api.dawatrack.com/partner-api/v1/aggregations/106164004000007317/",
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/aggregations/106164004000007317/", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
console.log(await response.json());
Response fields
-
ssccstringAn 18-digit GS1 Serial Shipping Container Code.
-
childrenarray of objectsThe facilities it passed the batch on to, in the same shape.
-
occurred_atdatetimeWhen the event happened.
-
created_atdatetimeWhen the record was created.
Example response
{
"sscc": "106164004000007317",
"children": [
{}
],
"occurred_at": "2026-10-10T09:00:00Z",
"created_at": "2026-10-10T09:00:00Z"
}
Status codes
200 | OK |
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 |
404 | Not found, or not visible to your credential |
429 | Rate limit exceeded |
Unpack an SSCC
https://api.dawatrack.com/partner-api/v1/aggregations/{sscc}/disaggregate/
Record that a case or pallet was opened, releasing its units and nested cases.
events:write
Production credentials only
Limit 5,000 per day
Only the partner that declared the SSCC, or one linked to the facility holding it, can unpack it. Any other SSCC, including one never declared, returns 404.
The whole container is unpacked: every unit and nested case in it is released, and the response lists them. The body is optional: a reason, and occurred_at (default now). An SSCC already unpacked is 409.
Path parameters
-
ssccstring Required
Request body
JSON. Send Content-Type: application/json.
-
reasonstring OptionalWhy it was opened.
-
occurred_atdatetime OptionalWhen; defaults to now.
Example request
curl -X POST https://api.dawatrack.com/partner-api/v1/aggregations/106164004000007317/disaggregate/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"
import uuid
import requests
token = "..." # from POST /oauth/token/
response = requests.post(
"https://api.dawatrack.com/partner-api/v1/aggregations/106164004000007317/disaggregate/",
headers={"Authorization": f"Bearer {token}", "Idempotency-Key": str(uuid.uuid4())},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/aggregations/106164004000007317/disaggregate/", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
console.log(await response.json());
Response fields
-
ssccstringAn 18-digit GS1 Serial Shipping Container Code.
-
statusstringDefault:
DISAGGREGATED -
unpacked_atdatetime -
released_childrenarray of objects
Example response
{
"sscc": "106164004000007317",
"status": "OPEN",
"unpacked_at": "2026-10-10T09:00:00Z",
"released_children": [
{}
]
}
Status codes
200 | OK |
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 |
404 | Not found, or not visible to your credential |
409 | Conflict: a request with this Idempotency-Key is in progress, or the record already exists |
429 | Rate limit exceeded |
Partner API v1. The API reference is generated from the API's own code.