TIX 6 Capture API
EPCIS Documents may be captured by doing a POST to the /event api endpoint. The endpoint will accept both multipart/form-data including many documents, or a single file as a content-type "application/xml". The capture end point is asynchronous, but will validate any input against the EPCIS schema before placed on the import queue, generating a response of 200 OK. A Document that fails to validate will be rejected.
There is also synchronous endpoint which returns after the import is really completed
The result of the import may be queried using the event/status API, documented at tix/api/rest.event.status.html
GET /event
Get the EPCIS document from a event import. This endpoint will return the original file that was uploaded if the import with given importId failed.
Parameter | Default | Description |
|---|---|---|
|
| The import ID of a event import |
|
| If |
<?xml version="1.0" encoding="utf-8" standalone="yes"?><e:EPCISDocument xmlns:e="urn:epcglobal:epcis:xsd:1" schemaVersion="1.1" creationDate="2015-03-03T14:13:02.099+02:00"> <EPCISBody> <EventList> <ObjectEvent> <eventTime>2013-10-31T14:58:56.591Z</eventTime> <eventTimeZoneOffset>+02:00</eventTimeZoneOffset> <epcList> <epc>ObjectEvent.epcList.epc-1</epc> </epcList> <action>ADD</action> </ObjectEvent> </EventList> </EPCISBody></e:EPCISDocument> POST /event
Import one or more EPCIS documents, use multipart/form-data to import multiple documents
<?xml version="1.0" encoding="utf-8" standalone="yes"?><e:EPCISDocument xmlns:e="urn:epcglobal:epcis:xsd:1" schemaVersion="1.1" creationDate="2015-03-03T14:13:02.099+02:00"> <EPCISBody> <EventList> <ObjectEvent> <eventTime>2013-10-31T14:58:56.591Z</eventTime> <eventTimeZoneOffset>+02:00</eventTimeZoneOffset> <epcList> <epc>ObjectEvent.epcList.epc-1</epc> </epcList> <action>ADD</action> </ObjectEvent> </EventList> </EPCISBody></e:EPCISDocument> <?xml version="1.0" encoding="UTF-8" standalone="yes"?><importResult> <bytes>613</bytes> <filename>user-1425906067240.xml</filename> <importId>8aeb843d4bfde8c7014bfe9fe72813d6410000fd</importId> <userId>user</userId></importResult>Multiplart
Header | Example | Description |
|---|---|---|
Content-Disposition | form-data; name=[filename|data|data[]]; filename=myfile.xml | Header for multipart imports |
X-TraceTracker-Client-Reference |
| Optional header to override the filename |
POST /event/immediate
Synchronous endpoint which returns after the import is really completed
GET /event/status
Get the status of an EPCIS document import
Parameter | Default | Description |
|---|---|---|
|
| The import id of a EPCIS document |
OK (1 events imported)Status | Description |
|---|---|
| Temporary state, try again |
| The import is in queue |
| The import is being processes. |
| The import was process but failed, no data was captured |
| The import has completed with no errors, data can now be queried |
| The import has completed with errors, not all data will be queried |
Legacy formats
The TraceTracker ttData format is still supported, but it will be converted to event data on import. The TRD input format can be imported unchanged.
Error Codes & Responses
Status | Description |
|---|---|
200 | Success! |
400 | The request was invalid or cannot be otherwise served. |
401 | Authentication credentials were missing or incorrect. |
403 | The request is understood, but it has been refused or access is not allowed. |
404 | The requested URL path was not found. |
405 | The request was sent using the wrong HTTP method. |
500 | Error on the server. Please contact support@tracetracker.com and be as specific as possible with the included information. |
503 | The server is up, but is temporarily unable to process the request. Try again later. |