Skip to main content

EPCIS Queries

EPCIS queries collection manages named query definitions with predefined filtering parameters and business rules for efficiently retrieving specific subsets of supply chain event data based on business requirements.

Note

This configuration object is used to execute named queries through the official GS1 EPCIS 2.0 Query API. It can also be created via that other API.

The epcis_queries Object

EPCIS queries collection stores reusable query definitions with JSON-based filtering parameters, enabling standardized data retrieval patterns for reporting, integration, and business intelligence purposes.

Field NameTypeDescription
namestringPrimary key. Unique name identifier for the query (e.g., "ShipmentsToSiemens").
user_createdstringUser who created the query. Foreign key reference to users table.
date_createddatetimeTimestamp when the query was created.
user_updatedstringUser who last updated the query. Foreign key reference to users table.
date_updateddatetimeTimestamp when the query was last updated.
queryobjectJSON object containing query parameters and filtering criteria.
rulesobjectJSON object containing additional business rules applied when evaluating this query.

List EPCIS Queries

List existing EPCIS queries.

GET /items/epcis_queries

Query Parameters

Supports all global query parameters.

Returns

An array of up to limit EPCIS queries objects. If no items are available, data will be an empty array.


Retrieve an EPCIS Query

Retrieve a specific EPCIS query by name.

GET /items/epcis_queries/:name

Returns

Returns an EPCIS queries object if a valid primary key was provided.


Create an EPCIS Query

Create a new EPCIS query.

POST /items/epcis_queries

{
"name": "ProductShipments",
"query": {
"EQ_bizStep": [
"urn:epcglobal:cbv:bizstep:shipping"
],
"EQ_disposition": [
"urn:epcglobal:cbv:disp:in_transit"
]
}
}

Query Parameters

Supports all global query parameters.

Request Body

A partial EPCIS queries object.

Returns

Returns the EPCIS queries object for the created EPCIS query.


Update an EPCIS Query

Update an existing EPCIS query.

PATCH /items/epcis_queries/:name

{
"query": {
"EQ_bizStep": [
"urn:epcglobal:cbv:bizstep:shipping",
"urn:epcglobal:cbv:bizstep:receiving"
],
"EQ_destination_location": [
"https://food.tvai.me/414/9010586100019"
]
}
}

Query Parameters

Supports all global query parameters.

Request Body

A partial EPCIS queries object.

Returns

Returns the EPCIS queries object for the updated EPCIS query.


Delete an EPCIS Query

Delete an existing EPCIS query.

DELETE /items/epcis_queries/:name

Returns

Empty body.


Sample Data

Example EPCIS Query Records

{
"name": "ShipmentsToPartner",
"user_created": "91456280-d821-4ae6-a29d-54affcf89791",
"date_created": "2025-01-07T13:13:34.000Z",
"user_updated": null,
"date_updated": null,
"query": {
"EQ_destination_location": [
"https://food.tvai.me/414/9010586100019"
]
}
}
{
"name": "SSCCExample",
"user_created": null,
"date_created": null,
"user_updated": null,
"date_updated": null,
"query": {
"MATCH_epc": [
"https://food.tvai.me/00/100538931000000019"
]
}
}