GS1

GS1 Queries API

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.

Operations 10

GET /queries Returns a list of queries available.
POST /queries Creates a named EPCIS events query.
GET /queries/{queryName} Returns the query definition.
DELETE /queries/{queryName} Removes a named query and forcibly unsubscribes all active subscriptions, whether by WebSockets or Webhooks
GET /queries/{queryName}/subscriptions Returns active subscriptions with the option to use pagination if needed.
POST /queries/{queryName}/subscriptions Creates a query subscription.
GET /queries/{queryName}/subscriptions/{subscriptionID} Returns the details of a subscription. This method is useful to verify if a subscription is still active.
DELETE /queries/{queryName}/subscriptions/{subscriptionID} Unsubscribes a client by deleting the query subscription. #
GET /queries/{queryName}/events Returns EPCIS events with the option to use pagination if needed. This endpoint supports query subscriptions using WebSockets.
DELETE /nextPageToken/{token} Optional endpoint that allows on-demand release of any resources associated with `nextPageToken`.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gs1-queries-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gs1-queries-api-openapi.yml Raw ↑
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 <a href=\"https://ref.gs1.org/standards/epcis/2.0.1/query-schema.json\">EPCIS Query Language</a>. 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 <a href="https://ref.gs1.org/standards/epcis/2.0.1/query-schema.json">EPCIS Query Language</a>. 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

# --- truncated at 32 KB (94 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gs1/refs/heads/main/openapi/gs1-queries-api-openapi.yml