Skip to main content

EPCIS 2.0 exchange

If your traceability system already speaks GS1 EPCIS 2.0, send it events and read them back in that standard, with no mapping of your own. EPCIS events go through the same checks as POST /events/: it is another way in, not a way around them.

The endpoints

EndpointWhat it does
POST /epcis/captureCapture an EPCISDocument. Scope events:write.
GET /epcis/capture/{captureID}Follow a capture job. Scope events:write.
GET /epcis/eventsYour own events as an EPCISQueryDocument. Scope batches:read.
GET /batches/{gtin}/{batch}/epcis/A batch's whole history that you may see, as an EPCISDocument. Scope batches:read.

The paths follow the EPCIS 2.0 REST binding, so they have no trailing slash. Send documents as application/ld+json or application/json.

What DawaTrack records

Each EPCIS event becomes one DawaTrack event per unit or lot it names:

EPCIS eventRecorded as
ObjectEvent, action ADD, bizStep commissioningCOMMISSION, one per serial
ObjectEvent, action OBSERVE, bizStep shipping or departingSHIP
ObjectEvent, action OBSERVE, bizStep receiving, accepting or arrivingRECEIVE
ObjectEvent, action OBSERVE, bizStep dispensingDISPENSE

A bizStep can be the short form (shipping), the URN (urn:epcglobal:cbv:bizstep:shipping) or the web URI (https://ref.gs1.org/cbv/BizStep-shipping).

Anything else is refused by name, never guessed at. That includes AggregationEvent: record packing with POST /aggregations/, and holds or anything else with POST /events/.

DawaTrack reads the fields described below. Others, such as readPoint, bizLocation and disposition, are accepted and not recorded: the event's facility is your credential's.

Identifiers

  • Units go in epcList: an SGTIN URN (urn:epc:id:sgtin:6164004.032156.SN-0007731) or a GS1 Digital Link with AI 01 and 21 (https://id.gs1.org/01/06164004321562/21/SN-0007731).
  • A quantity of a lot goes in quantityList, with epcClass an LGTIN URN (urn:epc:class:lgtin:6164004.032156.BTH-2026-041) or a Digital Link with AI 01 and 10, and a whole-number quantity.
  • The lot of a unit comes from ilmd: cbvmda:lotNumber, and cbvmda:itemExpirationDate for the expiry. An LGTIN or a Digital Link with AI 10 names it too.
  • Commissioning names each unit by its serial. A quantity can't be commissioned.

Event IDs and retries

Every event needs an eventID. It is the event's idempotency key, so capture needs no Idempotency-Key header. An event that names several units becomes one DawaTrack event per unit, keyed <eventID>#1, <eventID>#2 and so on, in epcList order.

Sending the same document again finds the same capture job and records nothing twice. After a timeout, just send it again.

Naming the event it follows

A stock event names the event its units came from (see the parent rule). EPCIS has no field for that, so name it one of two ways:

  • dawatrack:parentEventID on the event: the eventID you sent for your own earlier event, or the eventID a DawaTrack EPCIS export or query gave an event you may see.
  • For a receipt, a desadv entry in bizTransactionList naming the consignment the shipment left on, as DawaTrack's own exports write it.

A dawatrack:parentEventID that names no event you may see is refused.

1. Capture commissioning

This document commissions two units of lot BTH-2026-041:

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()}");

The answer is 202 with the job, and its URL in the Location header:

Response
{ "captureID": "8d1e4b7a-2c3f-4e5a-9b6c-1f2e3d4c5b6a", "status": "PENDING", "eventCount": 2 }

2. Follow the job

Poll the Location URL until running is false. success is true when every event was recorded; otherwise errors lists those that weren't, with an error code each.

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()}");

3. Ship a unit

The shipment names the commissioning as its parent, and the consignment (despatch advice) it leaves on. A destinationList entry whose GLN (an SGLN URN, or a Digital Link with AI 414) is a DawaTrack supplier's names that supplier as the receiver, so it confirms receipt on its own screen.

POST /epcis/capture
{
  "@context": [
    "https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
  ],
  "type": "EPCISDocument",
  "schemaVersion": "2.0",
  "creationDate": "2026-10-11T10:00:00+03:00",
  "epcisBody": {
    "eventList": [
      {
        "type": "ObjectEvent",
        "eventID": "urn:uuid:a7d3e5f1-2b4c-4d6e-8f9a-0b1c2d3e4f50",
        "eventTime": "2026-10-11T09:45:00+03:00",
        "eventTimeZoneOffset": "+03:00",
        "action": "OBSERVE",
        "bizStep": "shipping",
        "disposition": "in_transit",
        "epcList": [
          "urn:epc:id:sgtin:6164004.032156.SN-0007731"
        ],
        "ilmd": {
          "cbvmda:lotNumber": "BTH-2026-041"
        },
        "bizTransactionList": [
          {
            "type": "desadv",
            "bizTransaction": "urn:epcglobal:cbv:bt:6164004000009:DSP-2026-0193"
          }
        ],
        "dawatrack:parentEventID": "urn:uuid:4f1c2a9e-7b3d-4c8e-a1f5-6d2e9b0c3a71"
      }
    ]
  }
}

To ship to a party outside DawaTrack, use POST /events/ with a recipient. EPCIS has no place for the email and phone a recall needs to reach it. See Shipments and confirmation.

Reading events back

GET /epcis/events returns your own events, oldest first, as an EPCISQueryDocument. It takes the standard's simple event query parameters:

ParameterEvents returned
eventTypeObjectEvent, AggregationEvent, or both, comma-separated.
GE_eventTimeAt or after this ISO 8601 date and time.
LT_eventTimeBefore this date and time.
EQ_bizStepOf these business steps, comma-separated: commissioning, shipping, receiving, dispensing, holding, packing, unpacking.
MATCH_anyEPCAbout any of these units (SGTINs or Digital Links with AI 21).
MATCH_epcClassAbout any of these lots or products (LGTINs or Digital Links with AI 01, and AI 10 for a lot).
perPageUp to 500 a page. The default is 100.

A parameter DawaTrack doesn't support is refused (400), not ignored, so a filter you rely on is never silently dropped. When there are more events, the next page's URL is in the Link header with rel="next". Follow it as given.

curl -X GET https://api.dawatrack.com/partner-api/v1/epcis/events?EQ_bizStep=shipping&GE_eventTime=2026-10-01T00:00:00Z \
  -H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests

token = "..."  # from POST /oauth/token/
response = requests.get(
    "https://api.dawatrack.com/partner-api/v1/epcis/events?EQ_bizStep=shipping&GE_eventTime=2026-10-01T00:00:00Z",
    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?EQ_bizStep=shipping&GE_eventTime=2026-10-01T00:00:00Z", {
  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?EQ_bizStep=shipping&GE_eventTime=2026-10-01T00:00:00Z");
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?EQ_bizStep=shipping&GE_eventTime=2026-10-01T00:00:00Z"))
    .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?EQ_bizStep=shipping&GE_eventTime=2026-10-01T00:00:00Z");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");

To read a whole batch, including what others did with it after you, use the batch export. Its event IDs are the ones to name in dawatrack:parentEventID.

Limits and errors

  • A document can make at most 1,000 DawaTrack events, counting one per unit.
  • Captures and bulk event requests share one limit: 10 per hour. See Rate limits.
  • A document with any event DawaTrack can't translate is refused whole, so you never have to untangle a partial capture. The error lists each event by its place in eventList. See EPCIS errors.

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