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.
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 Name | Type | Description |
|---|---|---|
name | string | Primary key. Unique name identifier for the query (e.g., "ShipmentsToSiemens"). |
user_created | string | User who created the query. Foreign key reference to users table. |
date_created | datetime | Timestamp when the query was created. |
user_updated | string | User who last updated the query. Foreign key reference to users table. |
date_updated | datetime | Timestamp when the query was last updated. |
query | object | JSON object containing query parameters and filtering criteria. |
rules | object | JSON object containing additional business rules applied when evaluating this query. |
List EPCIS Queries
List existing EPCIS queries.
- REST
- GraphQL
GET /items/epcis_queries
query {
epcis_queries {
name
user_created
date_created
user_updated
date_updated
query
}
}
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.
- REST
- GraphQL
GET /items/epcis_queries/:name
query {
epcis_queries_by_id(name: "query_name") {
name
user_created
date_created
user_updated
date_updated
query
}
}
Returns
Returns an EPCIS queries object if a valid primary key was provided.
Create an EPCIS Query
Create a new EPCIS query.
- REST
- GraphQL
POST /items/epcis_queries
{
"name": "ProductShipments",
"query": {
"EQ_bizStep": [
"urn:epcglobal:cbv:bizstep:shipping"
],
"EQ_disposition": [
"urn:epcglobal:cbv:disp:in_transit"
]
}
}
mutation {
create_epcis_queries_item(data: {
name: "ProductShipments"
query: {
EQ_bizStep: [
"urn:epcglobal:cbv:bizstep:shipping"
]
EQ_disposition: [
"urn:epcglobal:cbv:disp:in_transit"
]
}
}) {
name
query
date_created
}
}
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.
- REST
- GraphQL
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"
]
}
}
mutation {
update_epcis_queries_item(name: "query_name", data: {
query: {
EQ_bizStep: [
"urn:epcglobal:cbv:bizstep:shipping"
"urn:epcglobal:cbv:bizstep:receiving"
]
EQ_destination_location: [
"https://food.tvai.me/414/9010586100019"
]
}
}) {
name
query
date_updated
}
}
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.
- REST
- GraphQL
DELETE /items/epcis_queries/:name
mutation {
delete_epcis_queries_item(name: "query_name") {
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"
]
}
}