openapi: 3.2.0
info:
version: 2.0.1
title: EPCIS 2.0 REST Bindings Queries API
license:
name: Apache2
description: 'Endpoints to create large named or anonymous queries using the EPCIS Query Language. Named queries have a custom
name and are stored until deleted by the user. Anonymous queries are not persisted and only available to the caller.
EPCIS events queries also support query subscription.
'
tags:
- name: Queries
description: 'Endpoints to create large named or anonymous queries using the EPCIS Query Language. Named queries have a custom
name and are stored until deleted by the user. Anonymous queries are not persisted and only available to the caller.
EPCIS events queries also support query subscription.
'
paths:
/queries:
get:
tags:
- Queries
parameters:
- $ref: '#/components/parameters/NextPageToken'
- $ref: '#/components/parameters/PerPage'
- $ref: '#/components/parameters/GS1-Extensions'
- $ref: '#/components/parameters/GS1-CBV-Min'
- $ref: '#/components/parameters/GS1-CBV-Max'
- $ref: '#/components/parameters/GS1-EPCIS-Min'
- $ref: '#/components/parameters/GS1-EPCIS-Max'
summary: Returns a list of queries available.
description: 'An endpoint to list named queries.
This endpoint supports pagination.
'
responses:
'200':
headers:
GS1-EPCIS-Version:
$ref: '#/components/headers/GS1-EPCIS-Version'
GS1-CBV-Version:
$ref: '#/components/headers/GS1-CBV-Version'
GS1-Extensions:
$ref: '#/components/headers/GS1-Extensions'
Link:
$ref: '#/components/headers/Link'
GS1-Next-Page-Token-Expires:
$ref: '#/components/headers/GS1-Next-Page-Token-Expires'
description: "Queries are like views that are created using the EPCIS Query Language. Each query object\nconsists of a query name and the query definition. \nAn EPCIS 2.0 query body using the REST interface SHALL be serialised as a JSON object. The value of the query key within that JSON object SHALL validate against the schema defined at: https://ref.gs1.org/standards/epcis/2.0.1/query-schema.json.\nPerforming a `GET` on `/queries` lists all existing queries.\n"
content:
application/json:
example: "[{\n \"query\": {\n \"EQ_bizStep\": [\n \"shipping\",\n \"receiving\"\n ],\n \"eventType\": [\"ObjectEvent\"]\n},\n\"name\": \"myQuery\"\n}]\n"
schema:
description: The query name.
type: array
items:
allOf:
- type: object
required:
- name
properties:
name:
$ref: '#/components/schemas/QueryName'
- $ref: '#/components/schemas/QueryDefinition'
uniqueItems: true
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'406':
$ref: '#/components/responses/406NotAcceptable'
'500':
$ref: '#/components/responses/500ImplementationException'
post:
tags:
- Queries
summary: 'Creates a named EPCIS events query.
'
parameters:
- $ref: '#/components/parameters/GS1-EPCIS-Version'
- $ref: '#/components/parameters/GS1-CBV-Version'
- $ref: '#/components/parameters/GS1-Extensions'
description: 'Creating a named query creates a view on the events in the repository, accessible through its events resource.
To obtain the named query results, the client can use the URL in the `Location` header. The client can also use this URL to start a query subscription immediately after creating the query.
'
requestBody:
$ref: '#/components/requestBodies/CreateQuery'
responses:
'201':
headers:
GS1-EPCIS-Version:
$ref: '#/components/headers/GS1-EPCIS-Version'
GS1-CBV-Version:
$ref: '#/components/headers/GS1-CBV-Version'
GS1-Extensions:
$ref: '#/components/headers/GS1-Extensions'
Location:
description: 'Absolute or relative URL of the created query. The client can use the `Location` URL to obtain the named query definition.
'
schema:
example: /queries/myQuery
type: string
minLength: 1
description: Creates the named query.
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'406':
$ref: '#/components/responses/406NotAcceptable'
'409':
$ref: '#/components/responses/409ResourceAlreadyExistsException'
'415':
$ref: '#/components/responses/415UnsupportedMediaType'
'500':
$ref: '#/components/responses/500ImplementationException'
/queries/{queryName}:
parameters:
- $ref: '#/components/parameters/QueryName'
get:
parameters:
- $ref: '#/components/parameters/GS1-EPCIS-Min'
- $ref: '#/components/parameters/GS1-EPCIS-Max'
- $ref: '#/components/parameters/GS1-CBV-Min'
- $ref: '#/components/parameters/GS1-CBV-Max'
- $ref: '#/components/parameters/GS1-Extensions'
tags:
- Queries
summary: Returns the query definition.
responses:
'200':
headers:
GS1-EPCIS-Version:
$ref: '#/components/headers/GS1-EPCIS-Version'
GS1-CBV-Version:
$ref: '#/components/headers/GS1-CBV-Version'
GS1-Extensions:
$ref: '#/components/headers/GS1-Extensions'
description: 'Queries are like views that are created using the EPCIS Query Language. Each query object
consists of a query name and the query definition.
An EPCIS 2.0 query body using the REST interface SHALL be serialised as a JSON object. The value of the query key within that JSON object SHALL validate against the schema defined at: https://ref.gs1.org/standards/epcis/2.0.1/query-schema.json.
'
content:
application/json:
example:
name: myQuery
query:
EQ_bizStep:
- shipping
- receiving
eventType:
- ObjectEvent
schema:
type: array
items:
allOf:
- type: object
required:
- name
properties:
name:
type: string
- $ref: '#/components/schemas/QueryDefinition'
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'404':
$ref: '#/components/responses/404ResourceNotFound'
'406':
$ref: '#/components/responses/406NotAcceptable'
'413':
$ref: '#/components/responses/413QueryScopeOrSize'
'500':
$ref: '#/components/responses/500ImplementationException'
delete:
tags:
- Queries
summary: Removes a named query and forcibly unsubscribes all active subscriptions, whether by WebSockets or Webhooks
responses:
'204':
$ref: '#/components/responses/204QueryDeleted'
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'404':
$ref: '#/components/responses/404ResourceNotFound'
'406':
$ref: '#/components/responses/406NotAcceptable'
'500':
$ref: '#/components/responses/500ImplementationException'
/queries/{queryName}/subscriptions:
parameters:
- $ref: '#/components/parameters/QueryName'
- $ref: '#/components/parameters/GS1-Extensions'
get:
tags:
- Queries
summary: Returns active subscriptions with the option to use pagination if needed.
parameters:
- $ref: '#/components/parameters/NextPageToken'
- $ref: '#/components/parameters/PerPage'
- $ref: '#/components/parameters/GS1-EPCIS-Min'
- $ref: '#/components/parameters/GS1-EPCIS-Max'
description: 'The `GET` endpoint is to list all active subscriptions on that query.
'
responses:
'200':
headers:
GS1-EPCIS-Version:
$ref: '#/components/headers/GS1-EPCIS-Version'
GS1-Extensions:
$ref: '#/components/headers/GS1-Extensions'
Link:
$ref: '#/components/headers/Link'
GS1-Next-Page-Token-Expires:
$ref: '#/components/headers/GS1-Next-Page-Token-Expires'
description: Returns active subscriptions.
content:
application/json:
example:
- subscriptionID: df5a33e3-5aa3-4403-ae01-99b83234e27b
createdAt: '2017-08-21T17:32:28Z'
schedule:
hour: '1'
minute: '5'
- subscriptionID: df5a33e3-5aa3-5504-bf12-88c94345f38c
createdAt: '2017-07-21T17:32:28Z'
stream: true
schema:
type: array
items:
allOf:
- $ref: '#/components/schemas/AbstractQuerySubscriptionResponse'
- oneOf:
- $ref: '#/components/schemas/QueryScheduleSubscription'
- $ref: '#/components/schemas/QueryStreamSubscription'
'400':
$ref: '#/components/responses/400SubscriptionIssues'
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'404':
$ref: '#/components/responses/404ResourceNotFound'
'406':
$ref: '#/components/responses/406NotAcceptable'
'500':
$ref: '#/components/responses/500ImplementationException'
post:
tags:
- Queries
summary: Creates a query subscription.
parameters:
- $ref: '#/components/parameters/GS1-EPCIS-Version'
- $ref: '#/components/parameters/GS1-EPC-Format'
- $ref: '#/components/parameters/GS1-CBV-XML-Format'
description: "EPCIS 2.0 implementations must support Webhook subscriptions. \nCreating a query subscription requires the client to provide a single endpoint to which the\nserver will send events (as `EPCISQueryDocument`) and an optional string `signatureToken`. \nThis `signatureToken` must be generated by the client and is used by the server to authenticate itself and sign messages when sending events. The signature must be contained on the `GS1-Signature` HTTP header of the server request. \n\nThe choice of signature type is implementation specific but examples would be using HMAC with SHA-256 directly or a wrapper supporting various symmetric or asymetric \ncryptographic algorithms such as Json Web Signature (JWS).\nWhen the client subscribes to a query, it must either set `stream` to `true`, to be notified whenever a new EPCIS\nevent matches the query, or the client must define a query schedule. If these are missing the query subscription is invalid because the server won't\nknow when to notify a client.\n## Scheduled query: Receive query results at 1.05am\nA scheduled query subscription is a time-based query execution. EPCIS 2.0 scheduled queries are scheduled\nin the same manner as cron jobs.\nFor example, this query subscription is scheduled to trigger every morning at 1.05am. By setting\n`reportIfEmpty` to `true`, the client's callback URL (`dest`) will be called even if there are no new events that match\nthe query.\n```\nPOST /queries/MyQuery/subscriptions\n{\n \"dest\": \"https://client.example.com/queryCallback\",\n \"signatureToken\": \"13df38d8275b13f05704629e5f1cf3d45d6132d5\",\n \"reportIfEmpty\": true,\n \"schedule\": {\n \"hour\":\"1\",\n \"minute\": \"5\"\n }\n}\n```\n## Streaming query subscription: Whenever a captured EPCIS event matches the query criteria\nIf no query schedule is specified, the client must explicitly set `stream` to `true`. This restriction is to\nprevent clients from accidentally subscribing to EPCIS event streams.\n```\nPOST /queries/MyQuery/subscriptions\n{\n \"dest\": \"https://client.example.com/queryCallback\",\n \"signatureToken\": \"13df38d8275b13f05704629e5f1cf3d45d6132d5\",\n \"stream\": true\n}\n```\n"
requestBody:
content:
application/json:
example:
dest: https://client.example.com/queryCallback
signatureToken: 13df38d8275b13f05704629e5f1cf3d45d6132d5
schedule:
hour: '1'
minute: '5'
schema:
allOf:
- $ref: '#/components/schemas/AbstractQuerySubscription'
- oneOf:
- $ref: '#/components/schemas/QueryScheduleSubscription'
- $ref: '#/components/schemas/QueryStreamSubscription'
responses:
'201':
headers:
Location:
description: 'The server creates a new subscription for each client and query subscription. The client needs that URL
to unsubscribe by deleting this resource. The `Location` URL must point to the `subscriptionID` returned
in the response body. Note that for security reasons the response should not
return the secret.
'
schema:
type: string
format: uri
example: https://www.example.com/queries/MyQuery/subscriptions/df5a33e3-5aa3
description: Query subscription successful. The subscription is valid until the client unsubscribes.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AbstractQuerySubscriptionResponse'
- oneOf:
- $ref: '#/components/schemas/QueryScheduleSubscription'
- $ref: '#/components/schemas/QueryStreamSubscription'
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'404':
$ref: '#/components/responses/404ResourceNotFound'
'406':
$ref: '#/components/responses/406NotAcceptable'
'415':
$ref: '#/components/responses/415UnsupportedMediaType'
'500':
$ref: '#/components/responses/500ImplementationException'
callbacks:
querySubscriptionResults:
'{$request.body#/dest}':
post:
summary: Callback invoked by the server to provide the query result to the client.
parameters:
- $ref: '#/components/parameters/GS1-Signature'
requestBody:
description: 'The server sends the query result to the client as a series of `EPCISQueryDocument`. There is no pagination for a `POST` request, the
server must either send each EPCIS event individually or group EPCIS events in manageable batches.
If an error occurs server-side, the server must send the error in the format that is already used for
returning `4xx` or `5xx` responses.
'
required: true
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/epcisQueryDocument'
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
responses:
'200':
description: Webhook successfully processed the server request.
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'413':
description: 'The `POST` request is too large. The client can''t handle a payload of this size at once and
asks the server to send EPCIS events in smaller batches.
'
content:
application/problem+json:
schema:
allOf:
- properties:
status:
type: integer
enum:
- 413
default: 413
type:
type: string
format: uri
enum:
- epcisException:QueryTooComplexException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
'415':
$ref: '#/components/responses/415UnsupportedMediaType'
/queries/{queryName}/subscriptions/{subscriptionID}:
parameters:
- $ref: '#/components/parameters/QueryName'
- in: path
name: subscriptionID
required: true
example: df5a33e3-5aa3-4403-ae01-99b83234e27b
schema:
$ref: '#/components/schemas/subscriptionID'
get:
tags:
- Queries
summary: Returns the details of a subscription. This method is useful to verify if a subscription is still active.
parameters:
- $ref: '#/components/parameters/GS1-EPCIS-Min'
- $ref: '#/components/parameters/GS1-EPCIS-Max'
- $ref: '#/components/parameters/GS1-Extensions'
responses:
'200':
headers:
GS1-Extensions:
$ref: '#/components/headers/GS1-Extensions'
GS1-EPCIS-Version:
$ref: '#/components/headers/GS1-EPCIS-Version'
description: 'The `GET` method on a query subscription allows the client to get the details of an individual subscription.
'
content:
application/json:
example:
subscriptionID: 7cec849f-72f7-4a9d-bc86-080d3c5b7c98
queryName: GetIlmdExtension
dest: http://example.com/testWebhookSubscription
initialRecordTime: '2022-01-06T06:52:24.880Z'
reportIfEmpty: true
schedule:
second: 0/30
createdAt: '2022-01-06T06:52:24.889Z'
lastNotifiedAt: '2022-01-08T06:51:21.889Z'
schema:
allOf:
- $ref: '#/components/schemas/AbstractQuerySubscriptionResponse'
- oneOf:
- $ref: '#/components/schemas/QueryScheduleSubscription'
- $ref: '#/components/schemas/QueryStreamSubscription'
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'404':
$ref: '#/components/responses/404ResourceNotFound'
'406':
$ref: '#/components/responses/406NotAcceptable'
'500':
$ref: '#/components/responses/500ImplementationException'
delete:
operationId: unsubscribe
tags:
- Queries
summary: Unsubscribes a client by deleting the query subscription.
responses:
'204':
description: Client unsubscribed from query.
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'404':
$ref: '#/components/responses/404ResourceNotFound'
'406':
$ref: '#/components/responses/406NotAcceptable'
'500':
$ref: '#/components/responses/500ImplementationException'
/queries/{queryName}/events:
parameters:
- $ref: '#/components/parameters/QueryName'
- $ref: '#/components/parameters/GS1-Extensions'
get:
tags:
- Queries
summary: 'Returns EPCIS events with the option to use pagination if needed. This endpoint supports query subscriptions
using WebSockets.
'
parameters:
- $ref: '#/components/parameters/Upgrade'
- $ref: '#/components/parameters/Connection'
- $ref: '#/components/parameters/GS1-Query-ReportIfEmpty'
- $ref: '#/components/parameters/GS1-Query-InitialRecordTime'
- $ref: '#/components/parameters/GS1-Query-Second'
- $ref: '#/components/parameters/GS1-Query-Minute'
- $ref: '#/components/parameters/GS1-Query-Hour'
- $ref: '#/components/parameters/GS1-Query-DayOfMonth'
- $ref: '#/components/parameters/GS1-Query-Month'
- $ref: '#/components/parameters/GS1-Query-DayOfWeek'
- $ref: '#/components/parameters/GS1-Query-Stream'
- $ref: '#/components/parameters/NextPageToken'
- $ref: '#/components/parameters/PerPage'
- $ref: '#/components/parameters/GS1-CBV-Min'
- $ref: '#/components/parameters/GS1-CBV-Max'
- $ref: '#/components/parameters/GS1-EPCIS-Min'
- $ref: '#/components/parameters/GS1-EPCIS-Max'
- $ref: '#/components/parameters/GS1-EPC-Format'
- $ref: '#/components/parameters/GS1-CBV-XML-Format'
description: 'The `GET` endpoint is to retrieve results of a named query.
Furthermore, this endpoint can also be used to subscribe to queries using Websocket. To do this, the client
must specify the query schedule or set the `stream` parameter to `true` as a URL query string parameter. Please
note that scheduling parameters and the `stream` parameter are mutually exclusive.
## Scheduled query: Receive query results at 1.05am
Handshake from client for scheduled query:
```
GET https://example.com/queries/MyQuery/events?minute=5&hour=1
Host: example.com
Upgrade: websocket
Connection: Upgrade
```
Handshake from the server:
```
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
```
## Streaming query subscription: Whenever a captured EPCIS event matches the query criteria
Handshake from client for streaming:
```
GET https://example.com/queries/MyQuery/events?stream=true
Host: example.com
Upgrade: websocket
Connection: Upgrade
```
Handshake from the server:
```
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
```
'
responses:
'101':
$ref: '#/components/responses/101WebsocketCreated'
'200':
$ref: '#/components/responses/200EPCISQueryDocument'
'400':
$ref: '#/components/responses/400SubscriptionIssues'
'401':
$ref: '#/components/responses/401UnauthorizedRequest'
'403':
$ref: '#/components/responses/403ClientUnauthorized'
'404':
$ref: '#/components/responses/404ResourceNotFound'
'406':
$ref: '#/components/responses/406NotAcceptable'
'413':
$ref: '#/components/responses/413QueryScopeOrSize'
'414':
$ref: '#/components/responses/414URLTooLong'
'500':
$ref: '#/components/responses/500ImplementationException'
/nextPageToken/{token}:
parameters:
- $ref: '#/components/parameters/Token'
delete:
tags:
- Queries
summary: Optional endpoint that allows on-demand release of any resources associated with `nextPageToken`.
responses:
'204':
$ref: '#/components/responses/204NextPageTokenInvalidated'
'501':
$ref: '#/components/responses/501NotImplemented'
components:
schemas:
queryResults:
type: object
properties:
queryName:
type: string
subscriptionID:
type: string
resultsBody:
$ref: '#/components/schemas/resultsBody'
required:
- queryName
- resultsBody
error-reason:
anyOf:
- $ref: '#/components/schemas/vocab-other-uri'
- type: string
enum:
- did_not_occur
- incorrect_data
ObjectEvent:
allOf:
- $ref: '#/components/schemas/Event'
- type: object
properties:
type:
type: string
enum:
- ObjectEvent
epcList:
$ref: '#/components/schemas/epcList'
quantityList:
$ref: '#/components/schemas/quantityList'
action:
$ref: '#/components/schemas/action'
bizStep:
$ref: '#/components/schemas/bizStep'
disposition:
$ref: '#/components/schemas/disposition'
persistentDisposition:
$ref: '#/components/schemas/persistentDisposition'
readPoint:
$ref: '#/components/schemas/readPoint'
bizLocation:
$ref: '#/components/schemas/bizLocation'
bizTransactionList:
type: array
items:
$ref: '#/components/schemas/bizTransaction'
sourceList:
type: array
items:
$ref: '#/components/schemas/source'
destinationList:
type: array
items:
$ref: '#/components/schemas/destination'
sensorElementList:
type: array
items:
$ref: '#/components/schemas/sensorElement'
ilmd:
$ref: '#/components/schemas/ilmd'
required:
- type
- action
- anyOf:
- type: object
properties:
epcList:
type: array
minItems: 0
items:
$ref: '#/components/schemas/id'
required:
- epcList
- type: object
properties:
quantityList:
type: array
minItems: 1
items:
$ref: '#/components/schemas/quantityElement'
required:
- quantityList
- allOf:
- type: object
properties:
sensorElementList:
type: array
items:
$ref: '#/components/schemas/sensorElement'
minItems: 1
required:
- sensorElementList
- type: object
properties:
readPoint:
$ref: '#/components/schemas/readPoint'
required:
- readPoint
- anyOf:
- type: object
properties:
ilmd:
not: {}
action:
type: string
pattern: ^OBSERVE$
- type: object
properties:
ilmd:
not: {}
action:
type: string
pattern: ^DELETE$
- type: object
properties:
action:
type: string
pattern: ^ADD$
ilmd:
type: object
attribute:
type: object
properties:
id:
$ref: '#/components/schemas/uri'
attribute:
anyOf:
- type: number
- type: string
- type: object
required:
- id
component:
anyOf:
- $ref: '#/components/schemas/vocab-other-uri'
- type: string
enum:
- x
- y
- z
- axial_distance
- azimuth
- height
- spherical_radius
- polar_angle
- elevation_angle
- easting
- northing
- latitude
- longitude
- altitude
GS1-Extensions:
example: 'example-epc-ext=http://org1.example.com/epcis/,
example-epc-ext2=http://vendor.example.com/epcis/
'
type: object
Upgrade:
type: string
description: The `Upgrade` and `Connection` headers are needed to open a Websocket for queries.
default: websocket
example: websocket
bizStep:
anyOf:
- $ref: '#/components/schemas/vocab-other-uri'
- type: string
enum:
- accepting
- arriving
- assembling
- collecting
- commissioning
- consigning
- creating_class_instance
- cycle_counting
- decommissioning
- departing
- destroying
- disassembling
- dispensing
- encoding
- entering_exiting
- holding
- inspecting
- installing
- killing
- loading
- other
- packing
- picking
- receiving
- removing
- repackaging
- repairing
- replacing
- reserving
- retail_selling
- shipping
- staging_outbound
- stock_taking
- stocking
- storing
- transporting
- unloading
- unpacking
- void_shipping
- sensor_reporting
- sampling
sensorElement:
type: object
properties:
sensorMetadata:
$ref: '#/components/schemas/sensorMetadata'
sensorReport:
$ref: '#/components/schemas/sensorReportList'
required:
- sensorReport
eventID:
$ref: '#/components/schemas/uri'
QueryStreamSubscription:
description: "If no query schedule is specified, the client must explicitly set `stream` to `true`. This restriction is to\nprevent clients from accidentally subscribing to EPCIS event streams.\nExample:\n```\nPOST /queries/MyQuery/subscriptions\n{\n \"dest\": \"https://client.example.com/queryCallback\",\n \"signatureToken\": \"13df38d8275b13f05704629e5f1cf3d45d6132d5\",\n \"stream\": true\n}\n```\n"
type: object
example:
stream: true
required:
- stream
properties:
stream:
$ref: '#/components/schemas/GS1-Query-Stream'
GS1-Next-Page-Token-Expires:
example: '2017-07-21T17:32:28Z'
type: string
format: date-time
GS1-EPCIS-Max:
allOf:
- example: 2.0.1
- $ref: '#/components/schemas/version'
GS1-Signature:
description: "Used to sign events sent by the repository to subscribers. The choice of signature type is implementation specific but examples would be using HMAC with SHA-256 directly or a wrapper supporting various symmetric or asymetric \ncryptographic algorithms such as Json Web Signature (JWS). \n"
type: string
example: eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ
AbstractQuerySubscriptionResponse:
example:
dest: https://client.example.com/queryCallback
subscriptionID: df5a33e3-5aa3-4403-ae01-99b83234e27b
stream: true
createdAt: '2017-08-21T17:32:28Z'
lastNotifiedAt: '2022-01-08T06:51:21.889Z'
type: object
description: 'This schema contains shared features of EPCIS query subscriptions response.
'
required:
- dest
- subscriptionID
- createdAt
properties:
dest:
$ref: '#/components/schemas/dest'
subscriptionID:
$ref: '#/components/schemas/subscriptionID'
createdAt:
example: '2022-02-27T17:32:28Z'
type: string
format: date-time
lastNotifiedAt:
example: '2022-07-09T17:32:28Z'
type: string
format: date-time
description: The last time the target client was notified and responded with a 200 OK.
initialRecordTime:
$ref: '#/components/schemas/GS1-Query-InitialRecordTime'
minRecordTime:
$ref: '#/components/schemas/GS1-Query-Min-Record-Time'
epcFormat:
$ref: '#/components/schemas/GS1-EPC-Format'
errorDeclaration:
type: object
properties:
declarationTime:
$ref: '#/components/schemas/time'
reason:
$ref: '#/components/schemas/error-reason'
correctiveEventIDs:
type: array
items:
$ref: '#/components/schemas/eventID'
required:
- declarationTime
certificationInfo:
anyOf:
- type: array
items:
$ref: '#/components/schemas/uri'
- $ref: '#/components/schemas/uri'
bizTransaction-type:
anyOf:
- $ref: '#/components/schemas/vocab-other-uri'
- type: string
enum:
- bol
- cert
- desadv
- inv
- pedigree
- po
- poc
- prodorder
- recadv
- rma
- testprd
- testres
- upevt
resultsBody:
type: object
properties:
eventList:
$ref: '#/components/schemas/eventList'
vocabularyList:
$ref: '#/components/schemas/vocabularyList'
required:
- eventList
disposition:
anyOf:
- $ref: '#/components/schemas/vocab-other-uri'
- type: string
enum:
- active
- container_closed
- damaged
- destroyed
- dispensed
- disposed
- encoded
- expired
- in_progress
- in_transit
- inactive
- no_pedigree_match
- non_sellable_other
- partially_dispensed
- recalled
- reserved
- retail_sold
- returned
- sellable_accessible
- sellable_not_accessible
- stolen
- unknown
- available
- completeness_verified
- completeness_inferred
- conformant
- container_open
- mismatch_instance
- mismatch_class
- mismatch_quantity
- needs_replacement
- non_conformant
- unavailable
QueryName:
description: Unique query name.
type: string
example: myQuery
GS1-EPC-Format:
example: Always_GS1_Digital_Link
type: string
enum:
- No_Preference
- Always_GS1_Digital_Link
- Always_EPC_URN
- Never_Translates
GS1-Query-DayOfMonth:
description: 'Specifies that the query time must have a matching day of month value. The range for this parameter is 1 through
31, inclusive.
'
example: 1
type: string
pattern: (\g,)*\g|(?(\g|\g))|(?(\[\g\-\g\]))|(?([1-31]))
sensorReport:
type: object
properties:
type:
$ref: '#/components/schemas/measurementType'
exception:
$ref: '#/components/schemas/sensorAlertType'
deviceID:
$ref: '#/components/schemas/uri'
deviceMetadata:
$ref: '#/components/schemas/uri'
rawData:
$ref: '#/components/schemas/uri'
dataProcessingMethod:
$ref: '#/components/schemas/uri'
bizRules:
$ref: '#/components/schemas/uri'
time:
$ref: '#/components/schemas/time'
microorganism:
$ref: '#/components/schemas/uri'
chemicalSubstance:
$ref: '#/components/schemas/uri'
coordinateReferenceSystem:
$ref: '#/components/schemas/uri'
value:
$ref: '#/components/schemas/decimal'
component:
$ref: '#/components/schemas/component'
stringValue:
$ref: '#/components/schemas/string'
booleanValue:
$ref: '#/components/schemas/boolean'
hexBinaryValue:
$ref: '#/components/schemas/hexBinary'
uriValue:
$ref: '#/components/schemas/uri'
minValue:
$ref: '#/components/schemas/decimal'
maxValue:
$ref: '#/components/schemas/decimal'
meanValue:
$ref: '#/components/schemas/decimal'
sDev:
$ref: '#/components/schemas/decimal'
percRank:
$ref: '#/components/schemas/decimal'
percValue:
$ref: '#/components/schemas/decimal'
uom:
$ref: '#/components/schemas/string'
required:
- type
AggregationEvent:
allOf:
- $ref: '#/components/schemas/Event'
- type: object
properties:
type:
type: string
enum:
- AggregationEvent
parentID:
$ref: '#/components/schemas/uri'
childEPCs:
type: array
items:
$ref: '#/components/schemas/uri'
childQuantityList:
type: array
items:
$ref: '#/components/schemas/quantityElement'
action:
$ref: '#/components/schemas/action'
bizStep:
$ref: '#/components/schemas/bizStep'
disposition:
$ref: '#/components/schemas/disposition'
readPoint:
$ref: '#/components/schemas/readPoint'
bizLocation:
$ref: '#/components/schemas/bizLocation'
bizTransactionList:
type: array
items:
$ref: '#/components/schemas/bizTransaction'
sourceList:
type: array
items:
$ref: '#/components/schemas/source'
destinationList:
type: array
items:
$ref: '#/components/schemas/destination'
sensorElementList:
type: array
items:
$ref: '#/components/schemas/sensorElement'
required:
- type
- action
- anyOf:
- type: object
properties:
childEPCs:
type: array
minItems: 1
items:
$ref: '#/components/schemas/id'
required:
- childEPCs
- type: object
properties:
childQuantityList:
type: array
minItems: 1
items:
$ref: '#/components/schemas/quantityElement'
required:
- childQuantityList
- type: object
properties:
action:
type: string
pattern: ^DELETE$
vocab-other-uri:
type: string
format: uri
pattern: ^(?!(urn:epcglobal:cbv|https?:\/\/ns\.gs1\.org/cbv\/))
AssociationEvent:
allOf:
- $ref: '#/components/schemas/Event'
- type: object
properties:
type:
type: string
enum:
- AssociationEvent
parentID:
$ref: '#/components/schemas/uri'
childEPCs:
type: array
items:
$ref: '#/components/schemas/uri'
childQuantityList:
type: array
items:
$ref: '#/components/schemas/quantityElement'
action:
$ref: '#/components/schemas/action'
bizStep:
$ref: '#/components/schemas/bizStep'
disposition:
$ref: '#/components/schemas/disposition'
readPoint:
$ref: '#/components/schemas/readPoint'
bizLocation:
$ref: '#/components/schemas/bizLocation'
bizTransactionList:
type: array
items:
$ref: '#/components/schemas/bizTransaction'
sourceList:
type: array
items:
$ref: '#/components/schemas/source'
destinationList:
type: array
items:
$ref: '#/components/schemas/destination'
sensorElementList:
type: array
items:
$ref: '#/components/schemas/sensorElement'
required:
- type
- action
- parentID
- anyOf:
- type: object
properties:
childEPCs:
type: array
minItems: 1
items:
$ref: '#/components/schemas/id'
required:
- childEPCs
- type: object
properties:
childQuantityList:
type: array
minItems: 1
items:
$ref: '#/components/schemas/quantityElement'
required:
- childQuantityList
- type: object
properties:
action:
type: string
pattern: ^DELETE$
GS1-Query-InitialRecordTime:
description: 'Used to specify a time to constrain what resources are considered when processing a query
subscription. This value only applies the first time a subscriber receives events. If omitted, the default
value is the current time.
'
type: string
format: date-time
example: '2020-04-04T20:33:31.116-06:00'
NextPageToken:
description: 'Parameter that points to the next list of results when requesting a list of events that is larger than the value
specified with the `perPage` parameter. Some technologies refer to this as scrolling.
A `nextPageToken` may be invalidated through timeout. It is up to the specific implementation to provide
the mechanisms for invalidating tokens.
'
type: string
example: 3A15506738749783AU6D7DENAKwM2gQRRwGrataeq
vocab-uri:
type: string
format: uri
time:
type: string
format: date-time
readPoint:
type: object
properties:
id:
$ref: '#/components/schemas/uri'
required:
- id
GS1-Query-DayOfWeek:
description: 'Specifies that the query time must have a matching day of week value. The range for this parameter is 1 through
7, inclusive, with 1 denoting Monday, 2 denoting Tuesday, and so forth, up to 7 denoting Sunday.
'
example: 1
type: string
pattern: (\g,)*\g|(?(\g|\g))|(?(\[\g\-\g\]))|(?([1-7]))
GS1-Query-Hour:
description: 'Specifies that the query time must have a matching hour value. The range for this parameter is 0 through 23,
inclusive, with 0 denoting the hour that begins at midnight, and 23 denoting the hour that ends at midnight.
'
example: 1
type: string
pattern: (\g,)*\g|(?(\g|\g))|(?(\[\g\-\g\]))|(?([0-23]))
EPCISXMLQueryDocument:
description: A collection of EPCIS resources.
type: object
xml:
name: EPCISQueryDocument
prefix: epcis
namespace: urn:epcglobal:epcis-query:xsd:2
externalDocs:
description: 'An EPCIS document that must be validated with the [XML Schema](../XSD/EPCglobal-epcis-query-2_0.xsd)
'
url: ../XSD/EPCglobal-epcis-query-2_0.xsd
GS1-Query-Min-Record-Time:
example: '2020-04-04T20:33:31.116-06:00'
description: "In the context of an active query subscription, its value is set initially to \n`initialRecordTime` and then updated to the most recent execution timestamp \nfor the standing query.\n"
type: string
format: date-time
id:
type: string
format: uri
uom:
type: string
pattern: ^[A-Z0-9]{2,3}$
GS1-Query-Second:
description: 'Specifies that the query time must have a matching seconds value. The range for this parameter is 0
through 59, inclusive.
'
example: 0
type: string
pattern: (\g,)*\g|(?(\g|\g))|(?(\[\g\-\g\]))|(?([0-59]))
source-dest-type:
anyOf:
- $ref: '#/components/schemas/vocab-other-uri'
- type: string
enum:
- owning_party
- possessing_party
- location
hexBinary:
type: string
pattern: ^[A-Fa-f0-9]+$
AbstractQuerySubscription:
example:
dest: https://client.example.com/queryCallback
signatureToken: 13df38d8275b13f05704629e5f1cf3d45d6132d5
type: object
description: 'This schema contains shared features of EPCIS query subscriptions. If the schema is used in a response, the
`secret` should not be fully revealed.
'
required:
- dest
- secret
properties:
dest:
$ref: '#/components/schemas/dest'
signatureToken:
example: 13df38d8275b13f05704629e5f1cf3d45d6132d5
type: string
description: Secret generated by the client for the server.
initialRecordTime:
$ref: '#/components/schemas/GS1-Query-InitialRecordTime'
sensorAlertType:
anyOf:
- $ref: '#/components/schemas/vocab-nonGS1WebVoc-uri'
- type: string
enum:
- ALARM_CONDITION
- ERROR_CONDITION
EPCISEvent:
description: "EPCIS Event. It must validate against the normative \nEPCIS JSON Schema or EPCIS SHACL. \n"
oneOf:
- $ref: '#/components/schemas/ObjectEvent'
- $ref: '#/components/schemas/AggregationEvent'
- $ref: '#/components/schemas/TransactionEvent'
- $ref: '#/components/schemas/TransformationEvent'
- $ref: '#/components/schemas/AssociationEvent'
- $ref: '#/components/schemas/Extended-Event'
decimal:
type: number
TransactionEvent:
allOf:
- $ref: '#/components/schemas/Event'
- type: object
properties:
type:
type: string
enum:
- TransactionEvent
bizTransactionList:
type: array
items:
$ref: '#/components/schemas/bizTransaction'
minItems: 1
parentID:
$ref: '#/components/schemas/uri'
epcList:
type: array
items:
$ref: '#/components/schemas/uri'
quantityList:
type: array
items:
$ref: '#/components/schemas/quantityElement'
action:
$ref: '#/components/schemas/action'
bizStep:
$ref: '#/components/schemas/bizStep'
disposition:
$ref: '#/components/schemas/disposition'
readPoint:
$ref: '#/components/schemas/readPoint'
bizLocation:
$ref: '#/components/schemas/bizLocation'
sourceList:
type: array
items:
$ref: '#/components/schemas/source'
destinationList:
type: array
items:
$ref: '#/components/schemas/destination'
sensorElementList:
type: array
items:
$ref: '#/components/schemas/sensorElement'
required:
- type
- bizTransactionList
- action
- anyOf:
- type: object
properties:
epcList:
type: array
minItems: 0
items:
$ref: '#/components/schemas/id'
required:
- epcList
- type: object
properties:
quantityList:
type: array
minItems: 1
items:
$ref: '#/components/schemas/quantityElement'
required:
- quantityList
- type: object
properties:
action:
type: string
pattern: ^DELETE$
GS1-EPCIS-Version:
allOf:
- example: 2.0.1
- $ref: '#/components/schemas/version'
quantityList:
type: array
items:
$ref: '#/components/schemas/quantityElement'
vocabularyList:
type: array
items:
$ref: '#/components/schemas/vocabulary'
destination:
type: object
properties:
type:
$ref: '#/components/schemas/source-dest-type'
destination:
$ref: '#/components/schemas/uri'
required:
- type
- destination
additionalProperties: false
sensorReportList:
type: array
items:
$ref: '#/components/schemas/sensorReport'
minItems: 1
bizLocation:
type: object
properties:
id:
$ref: '#/components/schemas/uri'
required:
- id
Connection:
example: Upgrade
description: The `Upgrade` and `Connection` headers are needed to open a Websocket for queries.
type: string
default: upgrade
eventList:
type: array
items:
$ref: '#/components/schemas/EPCISEvent'
quantityElement:
type: object
properties:
epcClass:
$ref: '#/components/schemas/uri'
quantity:
$ref: '#/components/schemas/decimal'
uom:
$ref: '#/components/schemas/uom'
required:
- epcClass
additionalProperties: false
bizTransaction:
type: object
properties:
type:
$ref: '#/components/schemas/bizTransaction-type'
bizTransaction:
$ref: '#/components/schemas/uri'
required:
- bizTransaction
additionalProperties: false
epcisQueryDocumentBody:
type: object
properties:
queryResults:
$ref: '#/components/schemas/queryResults'
required:
- queryResults
version:
type: string
pattern: ^\d+(\.\d+)*$
dest:
description: Callback URL to receive EPCIS resources and errors.
type: string
format: uri
example: https://client.example.com/queryCallback
RFC7807ProblemResponseBody:
description: A response as specified in [RFC 7807](https://tools.ietf.org/html/rfc7807).
type: object
required:
- type
- title
properties:
type:
type: string
format: uri
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string
format: uri
xml:
name: EPCISException
prefix: epcis
namespace: urn:epcglobal:epcis:xsd:2
source:
type: object
properties:
type:
$ref: '#/components/schemas/source-dest-type'
source:
$ref: '#/components/schemas/uri'
required:
- type
- source
additionalProperties: false
boolean:
type: boolean
uri:
type: string
format: uri
GS1-CBV-Min:
allOf:
- example: 1.2.0
- $ref: '#/components/schemas/version'
GS1-Query-Stream:
type: boolean
description: 'If no schedule is specified and `stream` is `true`, the standing subscription SHALL report immediately whenever a
captured EPCIS event matches the query criteria.
'
default: true
enum:
- true
QueryScheduleSubscription:
description: "A scheduled query subscription is a time-based query execution scheduler. EPCIS 2.0 scheduled queries are scheduled\nin the same manner as cron jobs.\nFor example, this query subscription is scheduled to trigger every morning at 1.05am. By setting\n`reportIfEmpty` to `true`, the client's callback URL will be called even if there are no new events that match\nthe query.\n```\nPOST /queries/MyQuery/subscriptions\n{\n \"dest\": \"https://client.example.com/queryCallback\",\n \"signatureToken\": \"13df38d8275b13f05704629e5f1cf3d45d6132d5\",\n \"reportIfEmpty\": true,\n \"schedule\": {\n \"hour\":\"1\",\n \"minute\": \"5\"\n }\n}\n```\n"
type: object
example:
schedule:
hour: '1'
minute: '5'
required:
- schedule
properties:
reportIfEmpty:
$ref: '#/components/schemas/GS1-Query-ReportIfEmpty'
schedule:
type: object
properties:
second:
$ref: '#/components/schemas/GS1-Query-Second'
minute:
$ref: '#/components/schemas/GS1-Query-Minute'
hour:
$ref: '#/components/schemas/GS1-Query-Hour'
dayOfMonth:
$ref: '#/components/schemas/GS1-Query-DayOfMonth'
month:
$ref: '#/components/schemas/GS1-Query-Month'
dayOfWeek:
$ref: '#/components/schemas/GS1-Query-DayOfWeek'
GS1-CBV-Max:
allOf:
- example: 2.0.1
- $ref: '#/components/schemas/version'
persistentDisposition:
allOf:
- type: object
properties:
set:
type: array
items:
$ref: '#/components/schemas/disposition'
minItems: 1
uniqueItems: true
unset:
type: array
items:
$ref: '#/components/schemas/disposition'
minItems: 1
uniqueItems: true
additionalProperties: false
- anyOf:
- type: object
required:
- set
- type: object
required:
- unset
LDContext:
description: JSON-LD @context.
anyOf:
- type: array
items:
anyOf:
- type: string
format: uri
- type: object
- type: string
format: uri
- type: object
vocabularyElement:
type: object
properties:
id:
$ref: '#/components/schemas/uri'
attributes:
type: array
items:
$ref: '#/components/schemas/attribute'
children:
type: array
items:
$ref: '#/components/schemas/uri'
required:
- id
measurementType:
anyOf:
- $ref: '#/components/schemas/vocab-nonGS1WebVoc-uri'
- type: string
enum:
- AbsoluteHumidity
- AbsorbedDose
- AbsorbedDoseRate
- Acceleration
- Radioactivity
- Altitude
- AmountOfSubstance
- AmountOfSubstancePerUnitVolume
- Angle
- AngularAcceleration
- AngularMomentum
- AngularVelocity
- Area
- Capacitance
- Conductance
- Conductivity
- Count
- Density
- Dimensionless
- DoseEquivalent
- DoseEquivalentRate
- DynamicViscosity
- ElectricCharge
- ElectricCurrent
- ElectricCurrentDensity
- ElectricFieldStrength
- Energy
- Exposure
- Force
- Frequency
- Illuminance
- Inductance
- Irradiance
- KinematicViscosity
- Length
- LinearMomentum
- Luminance
- LuminousFlux
- LuminousIntensity
- MagneticFlux
- MagneticFluxDensity
- MagneticVectorPotential
- Mass
- MassConcentration
- MassFlowRate
- MassPerAreaTime
- MemoryCapacity
- MolalityOfSolute
- MolarEnergy
- MolarMass
- MolarVolume
- Power
- Pressure
- RadiantFlux
- RadiantIntensity
- RelativeHumidity
- Resistance
- Resistivity
- SolidAngle
- SpecificVolume
- Speed
- SurfaceDensity
- SurfaceTension
- Temperature
- Time
- Torque
- Voltage
- Volume
- VolumeFlowRate
- VolumeFraction
- VolumetricFlux
- Wavenumber
EPCISEventsQuery:
type: object
description: An EPCIS event query.
example:
eventType:
- ObjectEvent
EQ_bizStep:
- shipping
- receiving
externalDocs:
url: query-schema.json
items:
type: object
epcisQueryDocument:
type: object
properties:
'@context':
$ref: '#/components/schemas/LDContext'
id:
$ref: '#/components/schemas/id'
type:
type: string
enum:
- EPCISQueryDocument
schemaVersion:
$ref: '#/components/schemas/version'
creationDate:
$ref: '#/components/schemas/time'
epcisBody:
$ref: '#/components/schemas/epcisQueryDocumentBody'
required:
- '@context'
- type
- epcisBody
Extended-Event:
allOf:
- $ref: '#/components/schemas/Event'
- type: object
properties:
type:
$ref: '#/components/schemas/vocab-uri'
required:
- type
GS1-CBV-XML-Format:
example: Always_Web_URI
type: string
enum:
- No_Preference
- Always_Web_URI
- Always_URN
- Never_Translates
sensorMetadata:
type: object
properties:
time:
$ref: '#/components/schemas/time'
deviceID:
$ref: '#/components/schemas/uri'
deviceMetadata:
$ref: '#/components/schemas/uri'
rawData:
$ref: '#/components/schemas/uri'
startTime:
$ref: '#/components/schemas/time'
endTime:
$ref: '#/components/schemas/time'
dataProcessingMethod:
$ref: '#/components/schemas/uri'
bizRules:
$ref: '#/components/schemas/uri'
GS1-EPCIS-Min:
allOf:
- example: 1.0.0
- $ref: '#/components/schemas/version'
QueryDefinition:
example:
name: UniqueQueryName
query:
eventType:
- ObjectEvent
EQ_bizStep:
- shipping
- receiving
description: 'Creating a new query with query body.
'
type: object
required:
- name
- query
properties:
name:
type: string
query:
$ref: '#/components/schemas/EPCISEventsQuery'
PerPage:
description: 'This parameter helps to control the amount of data returned to the client through pagination.
In the case of EPCIS events, `perPage` specifies the maximum number of events in a response to the client.
It does not mandate that the server reaches this limit. For example, if the server sees that some EPCIS events are very
large, the server can decide to return fewer events to avoid creating an error because the response body is too
large.
As long as there are more resources to retrieve, the `Link` header contains the URL of the next page and
the attribute `rel="next"`. The last page is indicated by the absence of the `rel="next"`. Depending on the
implementation, there can be a global upper limit for the `perPage` value that the client cannot override,
which should be stated in the documentation.
'
type: integer
default: 30
vocabulary:
type: object
properties:
type:
$ref: '#/components/schemas/uri'
vocabularyElementList:
type: array
items:
$ref: '#/components/schemas/vocabularyElement'
required:
- type
vocab-nonGS1WebVoc-uri:
type: string
format: uri
pattern: ^(?!(https?:\/\/gs1\.org\/voc\/|https?:\/\/www\.gs1\.org\/voc\/))
GS1-Query-Minute:
description: 'Specifies that the query time must have a matching minute value. The range for this parameter is 0 through 59,
inclusive.
'
example: 5
type: string
pattern: (\g,)*\g|(?(\g|\g))|(?(\[\g\-\g\]))|(?([0-59]))
Event:
type: object
properties:
'@context':
$ref: '#/components/schemas/LDContext'
eventTime:
$ref: '#/components/schemas/time'
recordTime:
$ref: '#/components/schemas/time'
eventTimeZoneOffset:
type: string
pattern: ^([+]|[-])((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$
eventID:
$ref: '#/components/schemas/eventID'
certificationInfo:
$ref: '#/components/schemas/certificationInfo'
errorDeclaration:
$ref: '#/components/schemas/errorDeclaration'
required:
- eventTime
- eventTimeZoneOffset
epcList:
type: array
items:
$ref: '#/components/schemas/uri'
uniqueItems: true
action:
type: string
enum:
- OBSERVE
- ADD
- DELETE
GS1-Query-Month:
description: 'Specifies that the query time must have a matching month value. The range for this parameter is 1 through 12,
inclusive.
'
example: 1
type: string
pattern: (\g,)*\g|(?(\g|\g))|(?(\[\g\-\g\]))|(?([1-12]))
subscriptionID:
description: The ID of a WebHook subscription.
example: df5a33e3-5aa3-4403-ae01-99b83234e27b
type: string
string:
type: string
GS1-CBV-Version:
allOf:
- example: 2.0.1
- $ref: '#/components/schemas/version'
Link:
description: 'A pagination header link. This header works together with the `perPage` and `nextPageToken` query string
parameters.
'
type: string
format: uri
example: ; rel="next"
TransformationEvent:
allOf:
- $ref: '#/components/schemas/Event'
- type: object
properties:
type:
type: string
enum:
- TransformationEvent
inputEPCList:
$ref: '#/components/schemas/epcList'
inputQuantityList:
$ref: '#/components/schemas/quantityList'
outputEPCList:
$ref: '#/components/schemas/epcList'
outputQuantityList:
$ref: '#/components/schemas/quantityList'
transformationID:
$ref: '#/components/schemas/uri'
bizStep:
$ref: '#/components/schemas/bizStep'
disposition:
$ref: '#/components/schemas/disposition'
persistentDisposition:
$ref: '#/components/schemas/persistentDisposition'
readPoint:
$ref: '#/components/schemas/readPoint'
bizLocation:
$ref: '#/components/schemas/bizLocation'
bizTransactionList:
type: array
items:
$ref: '#/components/schemas/bizTransaction'
sourceList:
type: array
items:
$ref: '#/components/schemas/source'
destinationList:
type: array
items:
$ref: '#/components/schemas/destination'
sensorElementList:
type: array
items:
$ref: '#/components/schemas/sensorElement'
ilmd:
$ref: '#/components/schemas/ilmd'
required:
- type
- anyOf:
- allOf:
- anyOf:
- type: object
properties:
inputEPCList:
type: array
minItems: 1
items:
type: string
required:
- inputEPCList
- type: object
properties:
inputQuantityList:
type: array
minItems: 1
items:
type: object
required:
- inputQuantityList
- anyOf:
- type: object
properties:
outputEPCList:
type: array
minItems: 1
items:
type: string
required:
- outputEPCList
- type: object
properties:
outputQuantityList:
type: array
minItems: 1
items:
type: object
required:
- outputQuantityList
- anyOf:
- type: object
properties:
inputEPCList:
type: array
minItems: 1
items:
type: string
required:
- inputEPCList
- type: object
properties:
inputQuantityList:
type: array
minItems: 1
items:
type: object
required:
- inputQuantityList
- type: object
properties:
outputEPCList:
type: array
minItems: 1
items:
type: string
required:
- outputEPCList
- type: object
properties:
outputQuantityList:
type: array
minItems: 1
items:
type: object
required:
- outputQuantityList
type: object
required:
- transformationID
GS1-Query-ReportIfEmpty:
example: false
type: boolean
default: false
description: Flag to specify subscribed clients should be notified if the query result is empty.
responses:
501NotImplemented:
description: Functionality not supported by server.
content:
application/problem+json:
schema:
example:
type: epcisException:ImplementationException
title: Functionality not supported by server
status: 501
allOf:
- properties:
status:
type: integer
enum:
- 501
default: 501
type:
type: string
format: uri
enum:
- epcisException:ImplementationException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:ImplementationException
title: Functionality not supported by server
status: 501
allOf:
- properties:
status:
type: integer
enum:
- 501
default: 501
type:
type: string
format: uri
enum:
- epcisException:ImplementationException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
413QueryScopeOrSize:
description: Query result is too large.
content:
application/problem+json:
schema:
example:
type: epcisException:QueryTooComplexException
title: Capture Payload too large
status: 413
allOf:
- properties:
status:
type: integer
enum:
- 413
default: 413
type:
type: string
format: uri
enum:
- epcisException:QueryTooLargeException
- epcisException:QueryTooComplexException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:QueryTooComplexException
title: Capture Payload too large
status: 413
allOf:
- properties:
status:
type: integer
enum:
- 413
default: 413
type:
type: string
format: uri
enum:
- epcisException:QueryTooLargeException
- epcisException:QueryTooComplexException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
406NotAcceptable:
description: "The server cannot return the response as requested. \n"
content:
application/problem+json:
schema:
example:
type: epcisException:NotAcceptableException
title: Conflicting request and response headers
status: 406
allOf:
- properties:
status:
type: integer
enum:
- 406
default: 406
type:
type: string
format: uri
enum:
- epcisException:NotAcceptableException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:NotAcceptableException
title: Conflicting request and response headers
status: 406
allOf:
- properties:
status:
type: integer
enum:
- 406
default: 406
type:
type: string
format: uri
enum:
- epcisException:NotAcceptableException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
200EPCISQueryDocument:
headers:
GS1-EPCIS-Version:
$ref: '#/components/headers/GS1-EPCIS-Version'
GS1-CBV-Version:
$ref: '#/components/headers/GS1-CBV-Version'
GS1-Extensions:
$ref: '#/components/headers/GS1-Extensions'
Link:
$ref: '#/components/headers/Link'
GS1-Next-Page-Token-Expires:
$ref: '#/components/headers/GS1-Next-Page-Token-Expires'
description: Contains EPCIS events.
content:
application/json:
schema:
$ref: '#/components/schemas/epcisQueryDocument'
example:
'@context':
- https://ref.gs1.org/standards/epcis/epcis-context.jsonld
- example: http://ns.example.com/epcis/
id: https://id.example.org/document1
type: EPCISQueryDocument
schemaVersion: '2.0'
creationDate: '2005-07-11T11:30:47.0Z'
epcisBody:
queryResults:
subscriptionID: 32d2aec1-a6d2-46d9-900a-24124288cce1
queryName: SimpleEventQuery
resultsBody:
eventList:
- eventID: ni:///sha-256;df7bb3c352fef055578554f09f5e2aa41782150ced7bd0b8af24dd3ccb30ba69?ver=CBV2.0
type: ObjectEvent
action: OBSERVE
bizStep: shipping
disposition: in_transit
epcList:
- urn:epc:id:sgtin:0614141.107346.2017
- urn:epc:id:sgtin:0614141.107346.2018
eventTime: '2005-04-03T20:33:31.116000-06:00'
eventTimeZoneOffset: -06:00
readPoint:
id: urn:epc:id:sgln:0614141.07346.1234
bizTransactionList:
- type: po
bizTransaction: http://transaction.acme.com/po/12345678
- eventID: ni:///sha-256;00e1e6eba3a7cc6125be4793a631f0af50f8322e0ab5f2c0bab994a11cec1d79?ver=CBV2.0
type: ObjectEvent
action: OBSERVE
bizStep: receiving
disposition: in_progress
epcList:
- urn:epc:id:sgtin:0614141.107346.2018
eventTime: '2005-04-04T20:33:31.116-06:00'
eventTimeZoneOffset: -06:00
readPoint:
id: urn:epc:id:sgln:0012345.11111.400
bizLocation:
id: urn:epc:id:sgln:0012345.11111.0
bizTransactionList:
- type: po
bizTransaction: http://transaction.acme.com/po/12345678
- type: desadv
bizTransaction: urn:epcglobal:cbv:bt:0614141073467:1152
example:myField: Example of a vendor/user extension
application/xml:
schema:
$ref: '#/components/schemas/EPCISXMLQueryDocument'
example: "\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t2020-06-07T17:10:16Z\n\t\t\t\t+02:00\n\t\t\t\turn:epc:id:sgtin:952001.1012345.22222223333\n\t\t\t\t\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001001\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001002\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001003\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001004\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001005\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001006\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001007\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001008\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001009\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001010\n\t\t\t\t\n\t\t\t\tOBSERVE\n\t\t\t\turn:epcglobal:cbv:bizstep:receiving\n\t\t\t\turn:epcglobal:cbv:disp:in_progress\n\t\t\t\t\n\t\t\t\t\turn:epc:id:sgln:9529999.99999.0\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epc:id:sgln:9529999.99999.0\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epcglobal:cbv:bt:9520011111116:A123\n\t\t\t\t\turn:epcglobal:cbv:bt:9529999999991:XYZ567\n\t\t\t\t\t\n\t\t\t\t\turn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epc:id:pgln:9520001.11111\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epc:id:pgln:9520999.99999\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epcglobal:cbv:disp:completeness_inferred\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t2020-06-08T18:11:16Z\n\t\t\t\t+02:00\n\t\t\t\turn:epc:id:sgtin:952001.1012345.22222223333\n\t\t\t\t\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001001\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001002\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001003\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001004\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001005\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001006\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001007\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001008\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001009\n\t\t\t\t\turn:epc:id:sgtin:9520001.012346.10000001010\n\t\t\t\t\n\t\t\t\tDELETE\n\t\t\t\turn:epcglobal:cbv:bizstep:unpacking\n\t\t\t\turn:epcglobal:cbv:disp:in_progress\n\t\t\t\t\n\t\t\t\t\turn:epc:id:sgln:9529999.99999.0\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epc:id:sgln:9529999.99999.0\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epcglobal:cbv:bt:9520011111116:A123\n\t\t\t\t\turn:epcglobal:cbv:bt:9529999999991:XYZ567\n\t\t\t\t\t\n\t\t\t\t\turn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epc:id:pgln:9520001.11111\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epc:id:pgln:9520999.99999\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\turn:epcglobal:cbv:disp:completeness_inferred\n\t\t\t\t\turn:epcglobal:cbv:disp:completeness_verified\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\n"
409ResourceAlreadyExistsException:
description: 'A resource with the provided identifier already exists. E.g., a named query or an event.
'
content:
application/problem+json:
schema:
example:
type: epcisException:ResourceAlreadyExistsException
title: A resource with the provided identifier already exists.
status: 409
allOf:
- properties:
status:
type: integer
enum:
- 406
default: 406
type:
type: string
format: uri
enum:
- epcisException:ResourceAlreadyExistsException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:ResourceAlreadyExistsException
title: A resource with the provided identifier already exists.
status: 409
allOf:
- properties:
status:
type: integer
enum:
- 406
default: 406
type:
type: string
format: uri
enum:
- epcisException:ResourceAlreadyExistsException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
101WebsocketCreated:
description: 'Create a WebSocket connection to subscribe to queries. Upon subscription, the server SHALL send all new events
to subscribing clients. If multiple clients have the same query, each client will receive events which they are
authorized to see.
'
headers:
Upgrade:
required: true
schema:
type: string
default: websocket
Connection:
required: true
schema:
type: string
default: upgrade
GS1-Query-Min-Record-Time:
required: false
schema:
$ref: '#/components/schemas/GS1-Query-Min-Record-Time'
204QueryDeleted:
description: Query deleted and clients disconnected.
401UnauthorizedRequest:
description: Authorization information is missing or invalid.
content:
application/problem+json:
schema:
example:
type: epcisException:SecurityException
title: Unauthorised request
status: 401
allOf:
- properties:
status:
type: integer
enum:
- 401
default: 401
type:
type: string
format: uri
enum:
- epcisException:SecurityException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:SecurityException
title: Unauthorised request
status: 401
allOf:
- properties:
status:
type: integer
enum:
- 401
default: 401
type:
type: string
format: uri
enum:
- epcisException:SecurityException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
415UnsupportedMediaType:
description: 'The client sent data in a format that is not supported by the server.
'
content:
application/problem+json:
schema:
example:
type: epcisException:UnsupportedMediaTypeException
title: Unsupported Media Type
status: 415
allOf:
- properties:
status:
type: integer
enum:
- 415
default: 415
type:
type: string
format: uri
enum:
- epcisException:UnsupportedMediaTypeException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:UnsupportedMediaTypeException
title: Unsupported Media Type
status: 415
allOf:
- properties:
status:
type: integer
enum:
- 415
default: 415
type:
type: string
format: uri
enum:
- epcisException:IUnsupportedMediaTypeException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
400SubscriptionIssues:
description: An issue with a subscription occurred.
content:
application/json:
schema:
example:
type: epcisException:SubscriptionControlsException
title: Subscription error
status: 400
allOf:
- properties:
status:
type: integer
enum:
- 400
default: 400
type:
type: string
format: uri
enum:
- epcisException:SubscriptionControlsException
- epcisException:ValidationException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/xml:
schema:
example:
type: epcisException:SubscriptionControlsException
title: Subscription error
status: 400
allOf:
- properties:
status:
type: integer
enum:
- 400
default: 400
type:
type: string
format: uri
enum:
- epcisException:SubscriptionControlsException
- epcisException:ValidationException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
404ResourceNotFound:
description: At least one resource was not found. For example, the EPCIS event does not exist or the query does not exist.
content:
application/problem+json:
schema:
example:
type: epcisException:NoSuchResourceException
title: Resource not found
status: 404
allOf:
- properties:
status:
type: integer
enum:
- 404
default: 404
type:
type: string
format: uri
enum:
- epcisException:NoSuchNameException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:NoSuchNameException
title: Resource not found
status: 404
allOf:
- properties:
status:
type: integer
enum:
- 404
default: 404
type:
type: string
format: uri
enum:
- epcisException:NoSuchNameException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
500ImplementationException:
description: An error occurred on the backend.
content:
application/problem+json:
schema:
example:
type: epcisException:ImplementationException
title: A server-side error occurred
status: 500
allOf:
- properties:
status:
type: integer
enum:
- 500
default: 500
type:
type: string
format: uri
enum:
- epcisException:ImplementationException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:ImplementationException
title: A server-side error occurred
status: 500
allOf:
- properties:
status:
type: integer
enum:
- 500
default: 500
type:
type: string
format: uri
enum:
- epcisException:ImplementationException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
204NextPageTokenInvalidated:
description: nextPageToken invalidated successfully.
414URLTooLong:
description: URL is too long. This is usually a problem with large EPCIS queries in the URL.
content:
application/problem+json:
schema:
example:
type: epcisException:URITooLongException
title: URI Too Long
status: 414
allOf:
- properties:
status:
type: integer
enum:
- 414
default: 414
type:
type: string
format: uri
enum:
- epcisException:URITooLongException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:URITooLongException
title: URI Too Long
status: 414
allOf:
- properties:
status:
type: integer
enum:
- 414
default: 414
type:
type: string
format: uri
enum:
- epcisException:URITooLongException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
403ClientUnauthorized:
description: Client is unauthorized to access this resource.
content:
application/problem+json:
schema:
example:
type: epcisException:SecurityException
title: Access to resource forbidden
status: 403
allOf:
- properties:
status:
type: integer
enum:
- 403
default: 403
type:
type: string
format: uri
enum:
- epcisException:SecurityException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
application/problem+xml:
schema:
example:
type: epcisException:SecurityException
title: Access to resource forbidden
status: 403
allOf:
- properties:
status:
type: integer
enum:
- 403
default: 403
type:
type: string
format: uri
enum:
- epcisException:SecurityException
- $ref: '#/components/schemas/RFC7807ProblemResponseBody'
headers:
Link:
description: 'A pagination header link. This header works together with the `perPage` and `nextPageToken` query string
parameters.
As long as there are more resources to retrieve, the `Link` header contains the URL of the next page and
the attribute `rel="next"`. The last page is indicated by the absence of the `rel="next"`.
'
schema:
$ref: '#/components/schemas/Link'
GS1-Extensions:
description: Specific EPCIS or CBV extensions supported (e.g., for FIT).
schema:
$ref: '#/components/schemas/GS1-Extensions'
GS1-EPCIS-Version:
description: The EPCIS version.
schema:
$ref: '#/components/schemas/GS1-EPCIS-Version'
GS1-CBV-Version:
description: The Core Business Vocabulary version.
schema:
$ref: '#/components/schemas/GS1-CBV-Version'
GS1-Next-Page-Token-Expires:
description: The expiry time for `nextPageToken`.
schema:
$ref: '#/components/schemas/GS1-Next-Page-Token-Expires'
parameters:
PerPage:
in: query
name: perPage
schema:
$ref: '#/components/schemas/PerPage'
GS1-CBV-XML-Format:
in: header
name: GS1-CBV-XML-Format
description: 'When requesting XML content-type only, users can use this header to request
receiving events with CBV values in either URN or Web URI format.
This option is not available for JSON/JSON-LD.
- No_Preference: The server chooses the representation.
- Always_Web_URI: CBV values are returned as Web URI.
- Always_URN: CBV values are returned as URNs.
- Never_Translates: The original format is kept.
'
schema:
$ref: '#/components/schemas/GS1-CBV-XML-Format'
QueryName:
in: path
name: queryName
description: The name of an EPCIS event query.
required: true
schema:
$ref: '#/components/schemas/QueryName'
GS1-EPCIS-Max:
in: header
name: GS1-EPCIS-Max
description: The highest EPCIS version supported.
schema:
$ref: '#/components/schemas/GS1-EPCIS-Max'
GS1-Query-ReportIfEmpty:
in: query
name: reportIfEmpty
required: false
schema:
$ref: '#/components/schemas/GS1-Query-ReportIfEmpty'
GS1-Extensions:
in: header
name: GS1-Extensions
description: 'Specific EPCIS or CBV extensions supported (e.g., for FIT).
'
schema:
$ref: '#/components/schemas/GS1-Extensions'
style: simple
explode: true
GS1-EPCIS-Version:
in: header
name: GS1-EPCIS-Version
description: 'The EPCIS version.
'
schema:
$ref: '#/components/schemas/GS1-EPCIS-Version'
GS1-Query-Hour:
in: query
name: hour
required: false
schema:
$ref: '#/components/schemas/GS1-Query-Hour'
GS1-Query-Stream:
in: query
name: stream
schema:
$ref: '#/components/schemas/GS1-Query-Stream'
GS1-Query-Minute:
in: query
name: minute
required: false
schema:
$ref: '#/components/schemas/GS1-Query-Minute'
NextPageToken:
in: query
name: nextPageToken
schema:
$ref: '#/components/schemas/NextPageToken'
GS1-Query-Second:
in: query
name: second
required: false
schema:
$ref: '#/components/schemas/GS1-Query-Second'
Connection:
in: header
name: Connection
required: false
schema:
$ref: '#/components/schemas/Connection'
Upgrade:
in: header
name: Upgrade
required: false
schema:
$ref: '#/components/schemas/Upgrade'
GS1-EPCIS-Min:
in: header
name: GS1-EPCIS-Min
description: 'The lowest EPCIS version supported.
'
schema:
$ref: '#/components/schemas/GS1-EPCIS-Min'
GS1-CBV-Min:
in: header
name: GS1-CBV-Min
description: 'The lowest Core Business Vocabulary version supported.
'
schema:
$ref: '#/components/schemas/GS1-CBV-Min'
GS1-Signature:
in: header
name: GS1-Signature
description: Header containing the signature of events sent by the respository to a subscriber.
required: false
schema:
$ref: '#/components/schemas/GS1-Signature'
GS1-EPC-Format:
in: header
name: GS1-EPC-Format
description: "Header used by the client to indicate whether EPCs are expressed as GS1 Digital Link URIs or as EPC URNs.\nIt is also used by the server to announce which EPC formats are supported. \nIf absent the default value is `Always_GS1_Digital_Link`:\n - No_Preference: No preference in the representation, i.e. any format is accepted.\n - Always_GS1_Digital_Link: URIs are returned as GS1 Digital Link.\n - Always_EPC_URN: URIs are returned as URN.\n - Never_Translates: EPCs are never translated, i.e. the original format is kept.\n"
schema:
$ref: '#/components/schemas/GS1-EPC-Format'
GS1-Query-DayOfMonth:
in: query
name: dayOfMonth
required: false
schema:
$ref: '#/components/schemas/GS1-Query-DayOfMonth'
GS1-Query-InitialRecordTime:
in: query
name: initialRecordTime
required: false
schema:
$ref: '#/components/schemas/GS1-Query-InitialRecordTime'
Token:
in: path
name: token
required: true
schema:
$ref: '#/components/schemas/NextPageToken'
GS1-CBV-Version:
in: header
name: GS1-CBV-Version
description: 'The Core Business Vocabulary version.
'
schema:
$ref: '#/components/schemas/GS1-CBV-Version'
GS1-CBV-Max:
in: header
name: GS1-CBV-Max
description: 'The highest Core Business Vocabulary version supported.
'
schema:
$ref: '#/components/schemas/GS1-CBV-Max'
GS1-Query-Month:
in: query
name: month
required: false
schema:
$ref: '#/components/schemas/GS1-Query-Month'
GS1-Query-DayOfWeek:
in: query
name: dayOfWeek
required: false
schema:
$ref: '#/components/schemas/GS1-Query-DayOfWeek'
requestBodies:
CreateQuery:
description: Creates and executes new EPCIS events query.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/QueryDefinition'