EPCIS 2.0
Send and read events as GS1 EPCIS 2.0 JSON-LD, the standard your traceability system may already speak.
Endpoints
Capture an EPCIS document
https://api.dawatrack.com/partner-api/v1/epcis/capture
Send an EPCIS 2.0 JSON-LD EPCISDocument; its events are recorded through the same checks as POST /events/.
events:write
Limit 10 per hour
Captured: ObjectEvents with bizStep commissioning (action ADD, one event per serial in epcList), shipping, receiving and dispensing (action OBSERVE). Other events are refused by name; packing goes through POST /aggregations/.
Each event's eventID is its idempotency key; an event naming several serials becomes one event per serial, keyed <eventID>#<n>. An event without an eventID is refused.
Name the event it follows from in dawatrack:parentEventID: the eventID you sent for it, or the eventID a DawaTrack EPCIS export gave it. A receipt can instead name the consignment in a desadv business transaction, as DawaTrack's exports write it.
The lot comes from ilmd (cbvmda:lotNumber, cbvmda:itemExpirationDate) or from an lgtin or GS1 Digital Link with AI 10. A shipment's destinationList GLN that is a DawaTrack supplier's names it.
Returns 202 with captureID; the Location header is the capture job. A document with any event DawaTrack can't record is refused whole (400, epcisException:ValidationException, each reason by index). Sending the same document again finds the same job.
Send it as application/ld+json or application/json. At most 1,000 DawaTrack events per document, counting one per serial. The EPCIS 2.0 guide walks through a full exchange.
Example request
curl -X POST https://api.dawatrack.com/partner-api/v1/epcis/capture \
-H "Authorization: Bearer $DAWATRACK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"type": "EPCISDocument",
"schemaVersion": "2.0",
"creationDate": "2026-10-10T09:00:00+03:00",
"epcisBody": {
"eventList": [
{
"type": "ObjectEvent",
"eventID": "urn:uuid:4f1c2a9e-7b3d-4c8e-a1f5-6d2e9b0c3a71",
"eventTime": "2026-10-10T08:30:00+03:00",
"eventTimeZoneOffset": "+03:00",
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"urn:epc:id:sgtin:6164004.032156.SN-0007731",
"urn:epc:id:sgtin:6164004.032156.SN-0007732"
],
"ilmd": {
"cbvmda:lotNumber": "BTH-2026-041",
"cbvmda:itemExpirationDate": "2028-03-31"
}
}
]
}
}'
import requests
token = "..." # from POST /oauth/token/
response = requests.post(
"https://api.dawatrack.com/partner-api/v1/epcis/capture",
headers={"Authorization": f"Bearer {token}"},
json={
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"type": "EPCISDocument",
"schemaVersion": "2.0",
"creationDate": "2026-10-10T09:00:00+03:00",
"epcisBody": {
"eventList": [
{
"type": "ObjectEvent",
"eventID": "urn:uuid:4f1c2a9e-7b3d-4c8e-a1f5-6d2e9b0c3a71",
"eventTime": "2026-10-10T08:30:00+03:00",
"eventTimeZoneOffset": "+03:00",
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"urn:epc:id:sgtin:6164004.032156.SN-0007731",
"urn:epc:id:sgtin:6164004.032156.SN-0007732"
],
"ilmd": {
"cbvmda:lotNumber": "BTH-2026-041",
"cbvmda:itemExpirationDate": "2028-03-31"
}
}
]
}
},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/epcis/capture", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"type": "EPCISDocument",
"schemaVersion": "2.0",
"creationDate": "2026-10-10T09:00:00+03:00",
"epcisBody": {
"eventList": [
{
"type": "ObjectEvent",
"eventID": "urn:uuid:4f1c2a9e-7b3d-4c8e-a1f5-6d2e9b0c3a71",
"eventTime": "2026-10-10T08:30:00+03:00",
"eventTimeZoneOffset": "+03:00",
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"urn:epc:id:sgtin:6164004.032156.SN-0007731",
"urn:epc:id:sgtin:6164004.032156.SN-0007732"
],
"ilmd": {
"cbvmda:lotNumber": "BTH-2026-041",
"cbvmda:itemExpirationDate": "2028-03-31"
}
}
]
}
}),
});
console.log(await response.json());
<?php
$token = "..."; // from POST /oauth/token/
$body = <<<'JSON'
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"type": "EPCISDocument",
"schemaVersion": "2.0",
"creationDate": "2026-10-10T09:00:00+03:00",
"epcisBody": {
"eventList": [
{
"type": "ObjectEvent",
"eventID": "urn:uuid:4f1c2a9e-7b3d-4c8e-a1f5-6d2e9b0c3a71",
"eventTime": "2026-10-10T08:30:00+03:00",
"eventTimeZoneOffset": "+03:00",
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"urn:epc:id:sgtin:6164004.032156.SN-0007731",
"urn:epc:id:sgtin:6164004.032156.SN-0007732"
],
"ilmd": {
"cbvmda:lotNumber": "BTH-2026-041",
"cbvmda:itemExpirationDate": "2028-03-31"
}
}
]
}
}
JSON;
$ch = curl_init("https://api.dawatrack.com/partner-api/v1/epcis/capture");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $token",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, "\n", $response;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String token = "..."; // from POST /oauth/token/
String body = """
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"type": "EPCISDocument",
"schemaVersion": "2.0",
"creationDate": "2026-10-10T09:00:00+03:00",
"epcisBody": {
"eventList": [
{
"type": "ObjectEvent",
"eventID": "urn:uuid:4f1c2a9e-7b3d-4c8e-a1f5-6d2e9b0c3a71",
"eventTime": "2026-10-10T08:30:00+03:00",
"eventTimeZoneOffset": "+03:00",
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"urn:epc:id:sgtin:6164004.032156.SN-0007731",
"urn:epc:id:sgtin:6164004.032156.SN-0007732"
],
"ilmd": {
"cbvmda:lotNumber": "BTH-2026-041",
"cbvmda:itemExpirationDate": "2028-03-31"
}
}
]
}
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.dawatrack.com/partner-api/v1/epcis/capture"))
.header("Authorization", "Bearer " + token)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
using System.Net.Http.Headers;
using System.Text;
var token = "..."; // from POST /oauth/token/
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.dawatrack.com/partner-api/v1/epcis/capture");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
request.Content = new StringContent("""
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"type": "EPCISDocument",
"schemaVersion": "2.0",
"creationDate": "2026-10-10T09:00:00+03:00",
"epcisBody": {
"eventList": [
{
"type": "ObjectEvent",
"eventID": "urn:uuid:4f1c2a9e-7b3d-4c8e-a1f5-6d2e9b0c3a71",
"eventTime": "2026-10-10T08:30:00+03:00",
"eventTimeZoneOffset": "+03:00",
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"urn:epc:id:sgtin:6164004.032156.SN-0007731",
"urn:epc:id:sgtin:6164004.032156.SN-0007732"
],
"ilmd": {
"cbvmda:lotNumber": "BTH-2026-041",
"cbvmda:itemExpirationDate": "2028-03-31"
}
}
]
}
}
""", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Response fields
-
captureIDstring -
statusstring -
eventCountinteger
Example response
{
"captureID": "8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a",
"status": "PENDING",
"eventCount": 2
}
Status codes
202 | Accepted: queued for processing |
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 |
415 | The body isn't JSON |
429 | Rate limit exceeded |
Fetch a capture job
https://api.dawatrack.com/partner-api/v1/epcis/capture/{capture_id}
Whether the capture is still running, whether it succeeded, and the error of any event that wasn't recorded.
events:write
Limit 5,000 per day
Poll the URL from the capture's Location header until running is false. success is true when every event was recorded. Otherwise errors names each event that wasn't: its index among the DawaTrack events the document became (one per serial, in document order), an error_code and an error_message. The codes are listed under Errors.
Events in errors weren't recorded. Fix them and send them again in a new document. Events that were recorded stay recorded, and sending them again changes nothing.
A captureID that isn't yours returns 404 (epcisException:NoSuchResourceException).
Path parameters
-
capture_idUUID Required
Example request
curl -X GET https://api.dawatrack.com/partner-api/v1/epcis/capture/8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.get(
"https://api.dawatrack.com/partner-api/v1/epcis/capture/8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a",
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/epcis/capture/8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
console.log(await response.json());
<?php
$token = "..."; // from POST /oauth/token/
$ch = curl_init("https://api.dawatrack.com/partner-api/v1/epcis/capture/8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $token",
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, "\n", $response;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String token = "..."; // from POST /oauth/token/
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.dawatrack.com/partner-api/v1/epcis/capture/8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a"))
.header("Authorization", "Bearer " + token)
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
using System.Net.Http.Headers;
var token = "..."; // from POST /oauth/token/
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.dawatrack.com/partner-api/v1/epcis/capture/8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Example response
{
"captureID": "8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a",
"createdAt": "2026-10-10T09:00:02.114000+00:00",
"finishedAt": "2026-10-10T09:00:03.870000+00:00",
"running": false,
"success": true,
"captureErrorBehaviour": "proceed",
"eventCount": 2,
"succeededEvents": 2,
"failedEvents": 0,
"errors": []
}
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 |
Query your events (EPCIS)
https://api.dawatrack.com/partner-api/v1/epcis/events
Your own events as an EPCIS 2.0 EPCISQueryDocument, oldest first.
batches:read
Limit 5,000 per day
Filters: eventType, GE_eventTime, LT_eventTime, EQ_bizStep, MATCH_anyEPC, MATCH_epcClass. An unsupported parameter is refused (400), not ignored.
perPage (up to 500, default 100); the next page's URL is in the Link header (rel="next").
Each event carries the same eventID a batch export gives it, so you can name it in dawatrack:parentEventID when you capture what follows from it.
Query parameters
-
EQ_bizStepstring OptionalCBV business steps, comma-separated: commissioning, shipping, receiving, dispensing, holding, packing or unpacking (short form, URN or web URI).
-
GE_eventTimestring OptionalEvents at or after this ISO 8601 date and time.
-
LT_eventTimestring OptionalEvents before this ISO 8601 date and time.
-
MATCH_anyEPCstring OptionalEvents about any of these units: sgtin URNs or GS1 Digital Links with AI 21, comma-separated.
-
MATCH_epcClassstring OptionalEvents about any of these lots or products: lgtin URNs or GS1 Digital Links with AI 01 (and AI 10 for a lot), comma-separated.
-
eventTypestring OptionalObjectEvent, AggregationEvent, or both, comma-separated.
-
nextPageTokenstring OptionalFrom the Link header of the page before. Don't make one yourself.
-
perPagestring OptionalEvents per page, 1 to 500. Default 100.
Example request
curl -X GET https://api.dawatrack.com/partner-api/v1/epcis/events \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.get(
"https://api.dawatrack.com/partner-api/v1/epcis/events",
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/epcis/events", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
console.log(await response.json());
<?php
$token = "..."; // from POST /oauth/token/
$ch = curl_init("https://api.dawatrack.com/partner-api/v1/epcis/events");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $token",
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, "\n", $response;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String token = "..."; // from POST /oauth/token/
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.dawatrack.com/partner-api/v1/epcis/events"))
.header("Authorization", "Bearer " + token)
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
using System.Net.Http.Headers;
var token = "..."; // from POST /oauth/token/
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.dawatrack.com/partner-api/v1/epcis/events");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Example response
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld",
{
"dawatrack": "https://dawatrack.com/ns/epcis#"
}
],
"type": "EPCISQueryDocument",
"schemaVersion": "2.0",
"creationDate": "2026-10-10T12:00:00+00:00",
"epcisBody": {
"queryResults": {
"queryName": "SimpleEventQuery",
"resultsBody": {
"eventList": [
{
"type": "ObjectEvent",
"eventTime": "2026-10-01T09:00:00+00:00",
"eventTimeZoneOffset": "+00:00",
"eventID": "urn:uuid:0b0f6c7e-5a3c-5b2e-9a51-3f2d7c1e8a44",
"action": "OBSERVE",
"bizStep": "shipping",
"disposition": "in_transit",
"readPoint": {
"id": "urn:dawatrack:facility:distributor_nairobi"
},
"bizLocation": {
"id": "urn:dawatrack:facility:distributor_nairobi"
},
"quantityList": [
{
"epcClass": "https://id.gs1.org/01/06164004321562/10/BTH-2026-041",
"quantity": 2600
}
]
}
]
}
}
}
}
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 |
429 | Rate limit exceeded |
Partner API v1. The API reference is generated from the API's own code.