curl --request POST \
--url https://www.closient.com/epcis/api/2.0/capture \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"creationDate": "2026-05-03T12:00:00.000Z",
"epcisBody": {
"eventList": [
{
"action": "OBSERVE",
"bizLocation": {
"id": "urn:epc:id:sgln:0614141.00777.0"
},
"bizStep": "urn:epcglobal:cbv:bizstep:shipping",
"bizTransactionList": [
{
"bizTransaction": "urn:epcglobal:cbv:bt:0614141:1234",
"type": "urn:epcglobal:cbv:btt:po"
}
],
"disposition": "urn:epcglobal:cbv:disp:in_transit",
"epcList": [
"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001"
],
"eventTime": "2026-05-03T10:00:00.000Z",
"eventTimeZoneOffset": "-05:00",
"readPoint": {
"id": "urn:epc:id:sgln:0614141.00777.0"
},
"type": "ObjectEvent"
}
]
},
"schemaVersion": "2.0",
"type": "EPCISDocument"
}
'import requests
url = "https://www.closient.com/epcis/api/2.0/capture"
payload = {
"@context": ["https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"],
"creationDate": "2026-05-03T12:00:00.000Z",
"epcisBody": { "eventList": [
{
"action": "OBSERVE",
"bizLocation": { "id": "urn:epc:id:sgln:0614141.00777.0" },
"bizStep": "urn:epcglobal:cbv:bizstep:shipping",
"bizTransactionList": [
{
"bizTransaction": "urn:epcglobal:cbv:bt:0614141:1234",
"type": "urn:epcglobal:cbv:btt:po"
}
],
"disposition": "urn:epcglobal:cbv:disp:in_transit",
"epcList": ["https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001"],
"eventTime": "2026-05-03T10:00:00.000Z",
"eventTimeZoneOffset": "-05:00",
"readPoint": { "id": "urn:epc:id:sgln:0614141.00777.0" },
"type": "ObjectEvent"
}
] },
"schemaVersion": "2.0",
"type": "EPCISDocument"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'@context': ['https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld'],
creationDate: '2026-05-03T12:00:00.000Z',
epcisBody: {
eventList: [
{
action: 'OBSERVE',
bizLocation: {id: 'urn:epc:id:sgln:0614141.00777.0'},
bizStep: 'urn:epcglobal:cbv:bizstep:shipping',
bizTransactionList: [
{
bizTransaction: 'urn:epcglobal:cbv:bt:0614141:1234',
type: 'urn:epcglobal:cbv:btt:po'
}
],
disposition: 'urn:epcglobal:cbv:disp:in_transit',
epcList: ['https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001'],
eventTime: '2026-05-03T10:00:00.000Z',
eventTimeZoneOffset: '-05:00',
readPoint: {id: 'urn:epc:id:sgln:0614141.00777.0'},
type: 'ObjectEvent'
}
]
},
schemaVersion: '2.0',
type: 'EPCISDocument'
})
};
fetch('https://www.closient.com/epcis/api/2.0/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.closient.com/epcis/api/2.0/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'@context' => [
'https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld'
],
'creationDate' => '2026-05-03T12:00:00.000Z',
'epcisBody' => [
'eventList' => [
[
'action' => 'OBSERVE',
'bizLocation' => [
'id' => 'urn:epc:id:sgln:0614141.00777.0'
],
'bizStep' => 'urn:epcglobal:cbv:bizstep:shipping',
'bizTransactionList' => [
[
'bizTransaction' => 'urn:epcglobal:cbv:bt:0614141:1234',
'type' => 'urn:epcglobal:cbv:btt:po'
]
],
'disposition' => 'urn:epcglobal:cbv:disp:in_transit',
'epcList' => [
'https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001'
],
'eventTime' => '2026-05-03T10:00:00.000Z',
'eventTimeZoneOffset' => '-05:00',
'readPoint' => [
'id' => 'urn:epc:id:sgln:0614141.00777.0'
],
'type' => 'ObjectEvent'
]
]
],
'schemaVersion' => '2.0',
'type' => 'EPCISDocument'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/epcis/api/2.0/capture"
payload := strings.NewReader("{\n \"@context\": [\n \"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\"\n ],\n \"creationDate\": \"2026-05-03T12:00:00.000Z\",\n \"epcisBody\": {\n \"eventList\": [\n {\n \"action\": \"OBSERVE\",\n \"bizLocation\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"bizStep\": \"urn:epcglobal:cbv:bizstep:shipping\",\n \"bizTransactionList\": [\n {\n \"bizTransaction\": \"urn:epcglobal:cbv:bt:0614141:1234\",\n \"type\": \"urn:epcglobal:cbv:btt:po\"\n }\n ],\n \"disposition\": \"urn:epcglobal:cbv:disp:in_transit\",\n \"epcList\": [\n \"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001\"\n ],\n \"eventTime\": \"2026-05-03T10:00:00.000Z\",\n \"eventTimeZoneOffset\": \"-05:00\",\n \"readPoint\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"type\": \"ObjectEvent\"\n }\n ]\n },\n \"schemaVersion\": \"2.0\",\n \"type\": \"EPCISDocument\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.closient.com/epcis/api/2.0/capture")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"@context\": [\n \"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\"\n ],\n \"creationDate\": \"2026-05-03T12:00:00.000Z\",\n \"epcisBody\": {\n \"eventList\": [\n {\n \"action\": \"OBSERVE\",\n \"bizLocation\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"bizStep\": \"urn:epcglobal:cbv:bizstep:shipping\",\n \"bizTransactionList\": [\n {\n \"bizTransaction\": \"urn:epcglobal:cbv:bt:0614141:1234\",\n \"type\": \"urn:epcglobal:cbv:btt:po\"\n }\n ],\n \"disposition\": \"urn:epcglobal:cbv:disp:in_transit\",\n \"epcList\": [\n \"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001\"\n ],\n \"eventTime\": \"2026-05-03T10:00:00.000Z\",\n \"eventTimeZoneOffset\": \"-05:00\",\n \"readPoint\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"type\": \"ObjectEvent\"\n }\n ]\n },\n \"schemaVersion\": \"2.0\",\n \"type\": \"EPCISDocument\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/epcis/api/2.0/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"@context\": [\n \"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\"\n ],\n \"creationDate\": \"2026-05-03T12:00:00.000Z\",\n \"epcisBody\": {\n \"eventList\": [\n {\n \"action\": \"OBSERVE\",\n \"bizLocation\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"bizStep\": \"urn:epcglobal:cbv:bizstep:shipping\",\n \"bizTransactionList\": [\n {\n \"bizTransaction\": \"urn:epcglobal:cbv:bt:0614141:1234\",\n \"type\": \"urn:epcglobal:cbv:btt:po\"\n }\n ],\n \"disposition\": \"urn:epcglobal:cbv:disp:in_transit\",\n \"epcList\": [\n \"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001\"\n ],\n \"eventTime\": \"2026-05-03T10:00:00.000Z\",\n \"eventTimeZoneOffset\": \"-05:00\",\n \"readPoint\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"type\": \"ObjectEvent\"\n }\n ]\n },\n \"schemaVersion\": \"2.0\",\n \"type\": \"EPCISDocument\"\n}"
response = http.request(request)
puts response.read_body{
"captureErrorBehaviour": "rollback",
"captureID": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"createdAt": "2026-08-25T03:40:00+00:00",
"errors": [
{
"detail": "Event is missing required field(s): eventTime",
"sequenceInEPCISDoc": [
2
],
"status": 400,
"title": "Invalid event",
"type": "epcisException:ValidationException"
}
],
"finishedAt": "2026-08-25T03:40:00.812000+00:00",
"running": false,
"success": false
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Capture EPCIS events
Submit an EPCIS 2.0 document for capture. Returns 202 Accepted with a Location header naming a capture job, per GS1 EPCIS 2.0 — poll GET /capture/{captureID} until running is false, then read success and errors.
Document-level faults return 400 and create no job: a missing or empty epcisBody.eventList, or a body that is not an EPCISDocument. Event-level faults are reported on the job, not as an HTTP error — including duplicates, which are recorded as epcisException:DuplicateEventException entries carrying sequenceInEPCISDoc rather than returning 409. A replayed document is a well-formed document.
Duplicate detection uses a Closient-internal content fingerprint, scoped to the capturing organization. It is not the GS1 EPCIS event Hash-ID (ni:///sha-256;...?ver=CBV2.0) and will not match one computed by another implementation; it exists only to make a replayed capture a no-op for the tenant that sent it. The standard Hash-ID is stored for events captured from now on, except those whose @context or content it cannot be computed under; events captured earlier have none until a backfill runs. Duplicate detection does not use it.
GS1-Capture-Error-Behaviour selects rollback (default — one invalid event discards the whole document) or proceed (valid events persist, the rest are reported). Documents of at most 100 events are processed inline and the returned job is already finished; larger ones are processed in the background. Either way the job is pollable, so the client contract does not depend on which path ran.
Caller must hold an OWNER or MANAGER membership on the target organization.
curl --request POST \
--url https://www.closient.com/epcis/api/2.0/capture \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"creationDate": "2026-05-03T12:00:00.000Z",
"epcisBody": {
"eventList": [
{
"action": "OBSERVE",
"bizLocation": {
"id": "urn:epc:id:sgln:0614141.00777.0"
},
"bizStep": "urn:epcglobal:cbv:bizstep:shipping",
"bizTransactionList": [
{
"bizTransaction": "urn:epcglobal:cbv:bt:0614141:1234",
"type": "urn:epcglobal:cbv:btt:po"
}
],
"disposition": "urn:epcglobal:cbv:disp:in_transit",
"epcList": [
"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001"
],
"eventTime": "2026-05-03T10:00:00.000Z",
"eventTimeZoneOffset": "-05:00",
"readPoint": {
"id": "urn:epc:id:sgln:0614141.00777.0"
},
"type": "ObjectEvent"
}
]
},
"schemaVersion": "2.0",
"type": "EPCISDocument"
}
'import requests
url = "https://www.closient.com/epcis/api/2.0/capture"
payload = {
"@context": ["https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"],
"creationDate": "2026-05-03T12:00:00.000Z",
"epcisBody": { "eventList": [
{
"action": "OBSERVE",
"bizLocation": { "id": "urn:epc:id:sgln:0614141.00777.0" },
"bizStep": "urn:epcglobal:cbv:bizstep:shipping",
"bizTransactionList": [
{
"bizTransaction": "urn:epcglobal:cbv:bt:0614141:1234",
"type": "urn:epcglobal:cbv:btt:po"
}
],
"disposition": "urn:epcglobal:cbv:disp:in_transit",
"epcList": ["https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001"],
"eventTime": "2026-05-03T10:00:00.000Z",
"eventTimeZoneOffset": "-05:00",
"readPoint": { "id": "urn:epc:id:sgln:0614141.00777.0" },
"type": "ObjectEvent"
}
] },
"schemaVersion": "2.0",
"type": "EPCISDocument"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'@context': ['https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld'],
creationDate: '2026-05-03T12:00:00.000Z',
epcisBody: {
eventList: [
{
action: 'OBSERVE',
bizLocation: {id: 'urn:epc:id:sgln:0614141.00777.0'},
bizStep: 'urn:epcglobal:cbv:bizstep:shipping',
bizTransactionList: [
{
bizTransaction: 'urn:epcglobal:cbv:bt:0614141:1234',
type: 'urn:epcglobal:cbv:btt:po'
}
],
disposition: 'urn:epcglobal:cbv:disp:in_transit',
epcList: ['https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001'],
eventTime: '2026-05-03T10:00:00.000Z',
eventTimeZoneOffset: '-05:00',
readPoint: {id: 'urn:epc:id:sgln:0614141.00777.0'},
type: 'ObjectEvent'
}
]
},
schemaVersion: '2.0',
type: 'EPCISDocument'
})
};
fetch('https://www.closient.com/epcis/api/2.0/capture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.closient.com/epcis/api/2.0/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'@context' => [
'https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld'
],
'creationDate' => '2026-05-03T12:00:00.000Z',
'epcisBody' => [
'eventList' => [
[
'action' => 'OBSERVE',
'bizLocation' => [
'id' => 'urn:epc:id:sgln:0614141.00777.0'
],
'bizStep' => 'urn:epcglobal:cbv:bizstep:shipping',
'bizTransactionList' => [
[
'bizTransaction' => 'urn:epcglobal:cbv:bt:0614141:1234',
'type' => 'urn:epcglobal:cbv:btt:po'
]
],
'disposition' => 'urn:epcglobal:cbv:disp:in_transit',
'epcList' => [
'https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001'
],
'eventTime' => '2026-05-03T10:00:00.000Z',
'eventTimeZoneOffset' => '-05:00',
'readPoint' => [
'id' => 'urn:epc:id:sgln:0614141.00777.0'
],
'type' => 'ObjectEvent'
]
]
],
'schemaVersion' => '2.0',
'type' => 'EPCISDocument'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/epcis/api/2.0/capture"
payload := strings.NewReader("{\n \"@context\": [\n \"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\"\n ],\n \"creationDate\": \"2026-05-03T12:00:00.000Z\",\n \"epcisBody\": {\n \"eventList\": [\n {\n \"action\": \"OBSERVE\",\n \"bizLocation\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"bizStep\": \"urn:epcglobal:cbv:bizstep:shipping\",\n \"bizTransactionList\": [\n {\n \"bizTransaction\": \"urn:epcglobal:cbv:bt:0614141:1234\",\n \"type\": \"urn:epcglobal:cbv:btt:po\"\n }\n ],\n \"disposition\": \"urn:epcglobal:cbv:disp:in_transit\",\n \"epcList\": [\n \"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001\"\n ],\n \"eventTime\": \"2026-05-03T10:00:00.000Z\",\n \"eventTimeZoneOffset\": \"-05:00\",\n \"readPoint\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"type\": \"ObjectEvent\"\n }\n ]\n },\n \"schemaVersion\": \"2.0\",\n \"type\": \"EPCISDocument\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.closient.com/epcis/api/2.0/capture")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"@context\": [\n \"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\"\n ],\n \"creationDate\": \"2026-05-03T12:00:00.000Z\",\n \"epcisBody\": {\n \"eventList\": [\n {\n \"action\": \"OBSERVE\",\n \"bizLocation\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"bizStep\": \"urn:epcglobal:cbv:bizstep:shipping\",\n \"bizTransactionList\": [\n {\n \"bizTransaction\": \"urn:epcglobal:cbv:bt:0614141:1234\",\n \"type\": \"urn:epcglobal:cbv:btt:po\"\n }\n ],\n \"disposition\": \"urn:epcglobal:cbv:disp:in_transit\",\n \"epcList\": [\n \"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001\"\n ],\n \"eventTime\": \"2026-05-03T10:00:00.000Z\",\n \"eventTimeZoneOffset\": \"-05:00\",\n \"readPoint\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"type\": \"ObjectEvent\"\n }\n ]\n },\n \"schemaVersion\": \"2.0\",\n \"type\": \"EPCISDocument\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/epcis/api/2.0/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"@context\": [\n \"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\"\n ],\n \"creationDate\": \"2026-05-03T12:00:00.000Z\",\n \"epcisBody\": {\n \"eventList\": [\n {\n \"action\": \"OBSERVE\",\n \"bizLocation\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"bizStep\": \"urn:epcglobal:cbv:bizstep:shipping\",\n \"bizTransactionList\": [\n {\n \"bizTransaction\": \"urn:epcglobal:cbv:bt:0614141:1234\",\n \"type\": \"urn:epcglobal:cbv:btt:po\"\n }\n ],\n \"disposition\": \"urn:epcglobal:cbv:disp:in_transit\",\n \"epcList\": [\n \"https://id.gs1.org/01/00614141123452/10/LOT-A1/21/SERIAL-001\"\n ],\n \"eventTime\": \"2026-05-03T10:00:00.000Z\",\n \"eventTimeZoneOffset\": \"-05:00\",\n \"readPoint\": {\n \"id\": \"urn:epc:id:sgln:0614141.00777.0\"\n },\n \"type\": \"ObjectEvent\"\n }\n ]\n },\n \"schemaVersion\": \"2.0\",\n \"type\": \"EPCISDocument\"\n}"
response = http.request(request)
puts response.read_body{
"captureErrorBehaviour": "rollback",
"captureID": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"createdAt": "2026-08-25T03:40:00+00:00",
"errors": [
{
"detail": "Event is missing required field(s): eventTime",
"sequenceInEPCISDoc": [
2
],
"status": 400,
"title": "Invalid event",
"type": "epcisException:ValidationException"
}
],
"finishedAt": "2026-08-25T03:40:00.812000+00:00",
"running": false,
"success": false
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Authorizations
Body
EPCIS 2.0 Capture request body (GS1 EPCIS 2.0 §6.2 — EPCISDocument).
The wire format is a JSON-LD EPCISDocument whose epcisBody carries
an eventList array of one or more events. The example below is a
minimal ObjectEvent shipping a single SGTIN — production payloads
typically include bizTransactionList, sourceList, destinationList,
and (for FSMA 204 captures) ilmd KDEs in the cbvmda: namespace.
JSON-LD context defining every term in the document (GS1 EPCIS 2.0 §8.2). Mandatory — a document without it is not an EPCISDocument, and capture answers 400. Normally the GS1 context URI, optionally followed by objects declaring the sender's own extension namespaces.
[
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
]
EPCIS 2.0 document body containing an eventList array of one or more events (per GS1 EPCIS 2.0 §6.2). At least one event is required. Each event must include type, eventTime, eventTimeZoneOffset, and the per-type required fields specified in §7.3.
Show child attributes
Show child attributes
Response
OK
202 response body for an accepted EPCIS capture (C-5404).
Mirrors the GS1 EPCIS 2.0 capture-job resource: running and success
are the two booleans the standard specifies, and reading them together is
what lets a client distinguish "not finished yet" from "finished and
failed". The same body is returned by GET /capture/{captureID}, so a
client can treat the POST response as its first poll.
errors carries RFC 9457 problem objects. Each has
sequenceInEPCISDoc — the indices of the offending events in the
document you submitted — which is what makes a rejection on a large file
actionable rather than merely true.
Identifier of the capture job; poll GET /capture/{captureID}.
ISO-8601 timestamp the job was accepted.
True while the job is still processing.
True only when every event in the document was captured. False while running — a job that has not finished is not a success yet.
Behaviour applied: rollback (default) or proceed, from GS1-Capture-Error-Behaviour.
ISO-8601 timestamp processing ended; null while running.
RFC 9457 problem objects, each carrying sequenceInEPCISDoc.