openapi: 3.0.2
info:
  title: Track and Trace Ledger API. Powered by IOTA
  version: 1.2.0
  description: The Track and Trace Ledger API provides users the ability to publish device transactions (read, scan, print) or EPCIS 2.0 Business Events to the IOTA Tangle
servers:
  - url: https://sandbox-api.zebra.com/v2/ledger/tangle
paths:
  /api/docs:
    get:
      summary: Get the documentation for the API
      operationId: getDocs
      tags:
        - Version
      responses:
        '200':
          description: Success
          content:
            text/html:
              schema:
                type: string
                example: <b>example</b>
      security:
        - apikey: []
  /operation-log/{logId}:
    get:
      summary: API to get the log details of an operation so that its progress can be monitored.
      operationId: logDetails
      tags:
        - Operation Log
      parameters:
        - name: logId
          in: path
          description: The ID of the log to retrieve.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: Operation Log Details
          content:
            application/json:
              schema:
                type: object
                description: Operation Log Entry details
                properties:
                  created:
                    type: string
                    format: date-time
                  completed:
                    type: string
                    format: date-time
                  id:
                    type: string
                  epcOrValue:
                    type: string
                  operationType:
                    type: string
                    enum:
                      - read
                      - scan
                      - print
                      - EPCIS
                  subOperationType:
                    type: string
                    enum:
                      - publish
                      - initialize
                  status:
                    type: string
                    enum:
                      - ok
                      - error
                      - pending
                  operationResult:
                    type: string
              example:
                created: '2021-08-05T06:59:14.376Z'
                completed: '2021-08-05T06:59:46.577Z'
                id: 774b824637986de4394abb671de9ceb045d381d1eea0b24b7d674f2528b1b688
                epcOrValue: urn:epc:id:sgtin:0614141.112345.591
                operationType: read
                subOperationType: publish
                status: ok
                operationResult: '{"transactionId":"8f66478e4c9c75f1b56f2b3e","locator":"urn:iota-streams:devnet:0773c093968256faeeafbe38bca9b86044eab6f81e25b60f7021d58b93a0e5c00000000000000000:6ca9c4b217ce9510ab1311c8:ea3451da6be1b53bcaeddbdf"}'
        '404':
          description: Operation Log Not found
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /scan:
    post:
      summary: API to add a Scan transaction (Barcode) to the Track and Trace Ledger.
      operationId: scanTransactionPost
      tags:
        - Device Events / Barcode Scan
      requestBody:
        required: true
        description: The Scan transaction to record.
        content:
          application/json:
            schema:
              type: object
              required:
                - symbology
                - value
                - timestamp
                - deviceId
                - type
              properties:
                symbology:
                  type: string
                  description: The barcode symbology used, for instance EAN-13.
                value:
                  type: string
                  description: The scanned barcode ID, for instance a GTIN-13 code.
                location:
                  oneOf:
                    - type: object
                      description: The Reader location.
                      properties:
                        latitude:
                          type: number
                          description: The Latitude.
                        longitude:
                          type: number
                          description: The Longitude.
                    - type: string
                      description: A Geo URI string.
                      format: uri
                timestamp:
                  type: string
                  format: date-time
                  description: The transaction timestamp generated from the device (ISO 8601).
                deviceId:
                  type: string
                  description: The Scanner Device Id.
                type:
                  type: string
                  enum:
                    - scanTransaction
                  description: The transaction type.
                jsonData:
                  type: object
                  description: Additional scanned information.
      responses:
        '202':
          description: The scan transaction has been accepted and it is being recorded
          headers:
            location:
              description: The operation log's resource that allows to follow progress
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    get:
      summary: API to get a list of all scan Barcode Track & Trace.
      operationId: scanTransactionsGetAll
      tags:
        - Device Events / Barcode Scan
      responses:
        '200':
          description: A list of all scan barcode values.
          content:
            application/json:
              schema:
                title: A list of barcode values.
                type: array
                items:
                  type: object
                  required:
                    - value
                    - created
                    - updated
                    - totalEventNumber
                  properties:
                    value:
                      type: string
                      description: The barcode value.
                    created:
                      type: string
                      description: The created timestamp (ISO 8601).
                      format: date-time
                    updated:
                      type: string
                      description: The updated timestamp (ISO 8601).
                      format: date-time
                    totalEventNumber:
                      type: integer
                      description: The total value events number.
                      minimum: 1
              example:
                - created: '2021-03-08T17:14:24.458Z'
                  updated: '2021-03-08T17:15:27.751Z'
                  totalEventNumber: 1
                  value: '991614924950378'
                - created: '2021-03-08T15:10:56.738Z'
                  updated: '2021-03-08T15:11:06.324Z'
                  totalEventNumber: 2
                  value: '991614924950348'
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /scan/{value}:
    get:
      summary: API to get a list of all scan transactions of a given barcode value
      operationId: scanTransactionsGetByValue
      tags:
        - Device Events / Barcode Scan
      parameters:
        - name: value
          in: path
          description: The Barcode value.
          schema:
            type: string
          style: simple
          required: true
        - name: limit
          in: query
          description: Maximum number of elements to be retrieved.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
        - name: lastN
          in: query
          description: Only retrieve the last number of elements.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
      responses:
        '200':
          description: A list of all transactions of an associated Barcode value
          content:
            application/json:
              schema:
                title: An array of Scan Transactions.
                type: array
                items:
                  allOf:
                    - type: object
                      required:
                        - symbology
                        - value
                        - timestamp
                        - deviceId
                        - type
                      properties:
                        symbology:
                          type: string
                          description: The barcode symbology used, for instance EAN-13.
                        value:
                          type: string
                          description: The scanned barcode ID, for instance a GTIN-13 code.
                        location:
                          oneOf:
                            - type: object
                              description: The Reader location.
                              properties:
                                latitude:
                                  type: number
                                  description: The Latitude.
                                longitude:
                                  type: number
                                  description: The Longitude.
                            - type: string
                              description: A Geo URI string.
                              format: uri
                        timestamp:
                          type: string
                          format: date-time
                          description: The transaction timestamp generated from the device (ISO 8601).
                        deviceId:
                          type: string
                          description: The Scanner Device Id.
                        type:
                          type: string
                          enum:
                            - scanTransaction
                          description: The transaction type.
                        jsonData:
                          type: object
                          description: Additional scanned information.
              example:
                - symbology: LABEL-TYPE-UPCA
                  value: '0123456789011'
                  location:
                    latitude: 42.186957
                    longitude: -87.931306
                  timestamp: 2020-10-02T11:24:08.926+0000
                  deviceId: SCAN-DEMO-DESK-ZEBRA
                  type: scanTransaction
                  jsonData:
                    dummy: dummy
                    originDid: did:iota:test
                    timestamp: 1602002517193
                  id: XT9EW9SMCJHVRVMMZKADNDAKPDMTXETZEQVKHSFDJXLIF9GBIGWETKKFWHLFWDSZIGEM9EAQXFHFGWFKH
                - symbology: LABEL-TYPE-UPCA
                  value: '0123456789011'
                  location:
                    latitude: 42.186957
                    longitude: -87.931306
                  timestamp: 2020-10-02T11:24:08.926+0000
                  deviceId: SCAN-DEMO-DESK-ZEBRA
                  type: scanTransaction
                  jsonData:
                    dummy: dummy
                    originDid: did:iota:test
                    timestamp: 1602004477959
                  id: KAQZLNQNEUZXYOQEYKNZOVNKRCXHTUDRIXNRTFFBD9PSE9YQBVHYQCKNGX9T9YTARXJIVSTRDRYQUI9SC
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /scan/channels/{value}:
    get:
      summary: API to get the details of the IOTA Streams Channel associated to a scan value.
      operationId: scanValueChannelDetails
      tags:
        - Device Events / Barcode Scan
      parameters:
        - name: value
          in: path
          description: The Barcode value.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: Locator of the IOTA Streams Channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams:devnet:5944c1cdf300c64b0146756706e7a3606b08ccf4af2e0dbbaa6dcff62e027dde0000000000000000:0d78d3f711f7522eccfeb359:dc5b48088955f20e481eb874
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    post:
      summary: API to start using an IOTA Streams Channel to trace a barcode value.
      operationId: scanValueChannelInit
      tags:
        - Device Events / Barcode Scan
      parameters:
        - name: value
          in: path
          description: The Barcode value.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: When an IOTA Streams channel to track the value already exists, the locator of such channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams:devnet:5944c1cdf300c64b0146756706e7a3606b08ccf4af2e0dbbaa6dcff62e027dde0000000000000000:0d78d3f711f7522eccfeb359:dc5b48088955f20e481eb874
        '202':
          description: Indicates that the creation of the Channel is ongoing
          headers:
            location:
              description: The operation log's resource that allows to follow progress.
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /scan/transaction/{value}/{transactionId}:
    get:
      summary: API to get a Barcode transaction from the Track and Trace Ledger.
      operationId: scanTransactionGet
      tags:
        - Device Events / Barcode Scan
      parameters:
        - name: value
          in: path
          description: The Barcode value.
          schema:
            type: string
          style: simple
          required: true
        - name: transactionId
          in: path
          description: The transaction Id.
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          description: The requested transaction
          content:
            application/json:
              schema:
                type: object
                required:
                  - symbology
                  - value
                  - timestamp
                  - deviceId
                  - type
                properties:
                  symbology:
                    type: string
                    description: The barcode symbology used, for instance EAN-13.
                  value:
                    type: string
                    description: The scanned barcode ID, for instance a GTIN-13 code.
                  location:
                    oneOf:
                      - type: object
                        description: The Reader location.
                        properties:
                          latitude:
                            type: number
                            description: The Latitude.
                          longitude:
                            type: number
                            description: The Longitude.
                      - type: string
                        description: A Geo URI string.
                        format: uri
                  timestamp:
                    type: string
                    format: date-time
                    description: The transaction timestamp generated from the device (ISO 8601).
                  deviceId:
                    type: string
                    description: The Scanner Device Id.
                  type:
                    type: string
                    enum:
                      - scanTransaction
                    description: The transaction type.
                  jsonData:
                    type: object
                    description: Additional scanned information.
              example:
                symbology: LABEL-TYPE-UPCA
                value: '0123456789011'
                location:
                  latitude: 42.186957
                  longitude: -87.931306
                timestamp: 2020-10-02T11:24:08.926+0000
                deviceId: SCAN-DEMO-DESK-ZEBRA
                type: scanTransaction
                jsonData:
                  dummy: dummy
                  originDid: did:iota:test
                  timestamp: 1602002517193
                id: XT9EW9SMCJHVRVMMZKADNDAKPDMTXETZEQVKHSFDJXLIF9GBIGWETKKFWHLFWDSZIGEM9EAQXFHFGWFKH
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /scan/device:
    get:
      summary: API to get a list of Barcode scanners (devices).
      operationId: scanGetDevices
      tags:
        - Device Events / Barcode Scan
      responses:
        '200':
          description: A list of barcode scanners.
          content:
            application/json:
              schema:
                title: A list of devices.
                type: array
                items:
                  type: object
                  required:
                    - deviceId
                    - created
                    - updated
                    - totalEventNumber
                  properties:
                    deviceId:
                      type: string
                      description: The device id.
                    created:
                      type: string
                      description: The created timestamp (ISO 8601).
                      format: date-time
                    updated:
                      type: string
                      description: The updated timestamp (ISO 8601).
                      format: date-time
                    totalEventNumber:
                      type: integer
                      description: The total device events number.
                      minimum: 1
              example:
                - deviceId: FX9600EF95C1
                  created: '2021-03-08T22:04:40.014Z'
                  updated: '2021-03-08T22:05:07.530Z'
                  totalEventNumber: 1
      security:
        - apikey: []
  /scan/device/{deviceId}:
    get:
      summary: API to get a list of all Barcode Track & Trace scanned by the given device from the Track and Trace Ledger.
      operationId: scanTransactionsGetByDevice
      tags:
        - Device Events / Barcode Scan
      parameters:
        - name: deviceId
          in: path
          description: The Barcode Scanner Device ID.
          required: true
          schema:
            type: string
          style: simple
        - name: limit
          in: query
          description: Maximum number of elements to be retrieved.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
        - name: lastN
          in: query
          description: Only retrieve the last number of elements.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
      responses:
        '200':
          description: A list of all Barcode Track & Trace associated with a Barcode scanner device id
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    value:
                      type: string
                    type:
                      type: string
                    transactionId:
                      type: string
                    deviceId:
                      type: string
              example:
                - transactionId: 52c459b6af03b627266589ce
                  value: '991616510605633'
                  deviceId: scan-1616510605633
                  id: ca2507d37e53ff9d1bd54f02
                  type: scanTransaction
                - transactionId: 2635f2f952234b7a1ef1d82c
                  value: '991616510605633'
                  deviceId: scan-1616510605633
                  id: 2482cd5cd80e0420e1ba39d1
                  type: scanTransaction
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /read:
    post:
      summary: API to add a Read transaction (RFID) to the Track and Trace Ledger
      operationId: readTransactionPost
      tags:
        - Device Events / RFID Read
      requestBody:
        required: true
        description: The Read transaction to record.
        content:
          application/json:
            schema:
              type: object
              required:
                - deviceId
                - antennaId
                - peakRSSI
                - epc
                - type
                - timestamp
              properties:
                deviceId:
                  type: string
                  description: The Reader Device Id.
                antennaId:
                  type: string
                  description: The Reader Antenna Id.
                peakRSSI:
                  type: number
                  description: The Reader peak RSSI.
                epc:
                  type: string
                  format: uri
                  description: The RFID tag EPC.
                location:
                  oneOf:
                    - type: object
                      description: The Reader location.
                      properties:
                        latitude:
                          type: number
                          description: The Latitude.
                        longitude:
                          type: number
                          description: The Longitude.
                    - type: string
                      description: A Geo URI string.
                      format: uri
                timestamp:
                  type: string
                  format: date-time
                  description: The transaction timestamp generated from the device (ISO 8601).
                type:
                  type: string
                  description: The transaction type.
                  enum:
                    - readTransaction
                jsonData:
                  type: object
                  description: Additional read information.
      responses:
        '202':
          description: The read transaction has been accepted and it is being recorded
          headers:
            location:
              description: The operation log's resource that allows to follow operation progress
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    get:
      summary: API to get a list of all RFID Track & Trace in the Track and Trace Ledger.
      operationId: readTransactionsGetAll
      tags:
        - Device Events / RFID Read
      responses:
        '200':
          description: A list of all RFID tags.
          content:
            application/json:
              schema:
                title: A list of RFID tags.
                type: array
                items:
                  type: object
                  required:
                    - epc
                    - created
                    - updated
                    - totalEventNumber
                  properties:
                    epc:
                      type: string
                      format: uri
                      description: The RFID tag EPC.
                    created:
                      type: string
                      description: The created timestamp (ISO 8601).
                      format: date-time
                    updated:
                      type: string
                      description: The updated timestamp (ISO 8601).
                      format: date-time
                    totalEventNumber:
                      type: integer
                      description: The total epc events number.
                      minimum: 1
              example:
                - created: '2021-03-08T18:04:23.638Z'
                  updated: '2021-03-08T18:04:33.454Z'
                  totalEventNumber: 1
                  epc: 30083355ddd9014000000000
                - created: '2021-03-08T18:03:45.189Z'
                  updated: '2021-03-08T18:03:57.265Z'
                  totalEventNumber: 2
                  epc: 300833b2ddd9014000000000
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /read/{epc}:
    get:
      summary: API to get a list of all RFID Track & Trace of a given RFID tag EPC.
      operationId: readTransactionsGetByEpc
      tags:
        - Device Events / RFID Read
      parameters:
        - name: epc
          in: path
          description: The EPC.
          schema:
            type: string
          style: simple
          required: true
        - name: limit
          in: query
          description: Maximum number of elements to be retrieved.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
        - name: lastN
          in: query
          description: Only retrieve the last number of elements.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
      responses:
        '200':
          description: A list of all transactions of the RFID tag EPC.
          content:
            application/json:
              schema:
                title: An array of Read Transactions.
                type: array
                items:
                  allOf:
                    - type: object
                      required:
                        - deviceId
                        - antennaId
                        - peakRSSI
                        - epc
                        - type
                        - timestamp
                      properties:
                        deviceId:
                          type: string
                          description: The Reader Device Id.
                        antennaId:
                          type: string
                          description: The Reader Antenna Id.
                        peakRSSI:
                          type: number
                          description: The Reader peak RSSI.
                        epc:
                          type: string
                          format: uri
                          description: The RFID tag EPC.
                        location:
                          oneOf:
                            - type: object
                              description: The Reader location.
                              properties:
                                latitude:
                                  type: number
                                  description: The Latitude.
                                longitude:
                                  type: number
                                  description: The Longitude.
                            - type: string
                              description: A Geo URI string.
                              format: uri
                        timestamp:
                          type: string
                          format: date-time
                          description: The transaction timestamp generated from the device (ISO 8601).
                        type:
                          type: string
                          description: The transaction type.
                          enum:
                            - readTransaction
                        jsonData:
                          type: object
                          description: Additional read information.
              example:
                - deviceId: FX9600EF95C1
                  antennaId: '1'
                  peakRssi: -42
                  epc: 300833b2ddd9014000000000
                  type: readTransaction
                  timestamp: '2020-08-17T16:59:49.659'
                  jsonData:
                    originDid: did:iota:test
                    timestamp: 1602001998035
                  id: KYWBKFIDTXRJKGUHZ9UAIEIKQG9OCULVSYFPQSGTV9MOJMWFYCUWBUIUQUYZUYGGKBEYWZKUWKIBJSYLD
                - deviceId: FX9600EF95C1
                  antennaId: '1'
                  peakRssi: -42
                  epc: 300833b2ddd9014000000000
                  type: readTransaction
                  timestamp: '2020-08-17T16:59:49.659'
                  jsonData:
                    originDid: did:iota:test
                    timestamp: 1602004556856
                  id: QAPBURSEYIUKHPXXKRTXQCBFLDHO9QYEWBNUSOLBFSLCMVARYNDLUWKXINHHUHDUCVDNUIRX9MYNCVLJL
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /read/channels/{epc}:
    get:
      summary: API to get the details of the IOTA Streams Channel associated to an RFID EPC.
      operationId: readEpcChannelDetails
      tags:
        - Device Events / RFID Read
      parameters:
        - name: epc
          in: path
          description: The EPC.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: Locator of the IOTA Streams Channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams:devnet:5944c1cdf300c64b0146756706e7a3606b08ccf4af2e0dbbaa6dcff62e027dde0000000000000000:0d78d3f711f7522eccfeb359:dc5b48088955f20e481eb874
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    post:
      summary: API to start using an IOTA Streams Channel to trace an RFID EPC.
      operationId: readEpcChannelInit
      tags:
        - Device Events / RFID Read
      parameters:
        - name: epc
          in: path
          description: The EPC.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: When an IOTA Streams channel to track the RFID EPC already exists, the locator of such channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams:devnet:5944c1cdf300c64b0146756706e7a3606b08ccf4af2e0dbbaa6dcff62e027dde0000000000000000:0d78d3f711f7522eccfeb359:dc5b48088955f20e481eb874
        '202':
          description: The creation of the Channel is ongoing.
          headers:
            location:
              description: The operation log's resource that allows to follow progress.
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /read/transaction/{epc}/{transactionId}:
    get:
      summary: API to get a RFID transaction
      operationId: readTransactionGet
      tags:
        - Device Events / RFID Read
      parameters:
        - name: epc
          in: path
          description: The EPC.
          schema:
            type: string
          style: simple
          required: true
        - name: transactionId
          in: path
          description: The transaction Id.
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          description: The requested RFID read transaction
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    required:
                      - deviceId
                      - antennaId
                      - peakRSSI
                      - epc
                      - type
                      - timestamp
                    properties:
                      deviceId:
                        type: string
                        description: The Reader Device Id.
                      antennaId:
                        type: string
                        description: The Reader Antenna Id.
                      peakRSSI:
                        type: number
                        description: The Reader peak RSSI.
                      epc:
                        type: string
                        format: uri
                        description: The RFID tag EPC.
                      location:
                        oneOf:
                          - type: object
                            description: The Reader location.
                            properties:
                              latitude:
                                type: number
                                description: The Latitude.
                              longitude:
                                type: number
                                description: The Longitude.
                          - type: string
                            description: A Geo URI string.
                            format: uri
                      timestamp:
                        type: string
                        format: date-time
                        description: The transaction timestamp generated from the device (ISO 8601).
                      type:
                        type: string
                        description: The transaction type.
                        enum:
                          - readTransaction
                      jsonData:
                        type: object
                        description: Additional read information.
              example:
                deviceId: FX9600EF95C1
                antennaId: '1'
                peakRssi: -42
                epc: 300833b2ddd9014000000000
                type: readTransaction
                timestamp: '2020-08-17T16:59:49.659'
                jsonData:
                  originDid: did:iota:test
                  timestamp: 1602001998035
                id: KYWBKFIDTXRJKGUHZ9UAIEIKQG9OCULVSYFPQSGTV9MOJMWFYCUWBUIUQUYZUYGGKBEYWZKUWKIBJSYLD
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /read/device:
    get:
      summary: API to get a list of RFID readers (devices).
      operationId: readGetDevices
      tags:
        - Device Events / RFID Read
      responses:
        '200':
          description: A list of RFID readers.
          content:
            application/json:
              schema:
                title: A list of devices.
                type: array
                items:
                  type: object
                  required:
                    - deviceId
                    - created
                    - updated
                    - totalEventNumber
                  properties:
                    deviceId:
                      type: string
                      description: The device id.
                    created:
                      type: string
                      description: The created timestamp (ISO 8601).
                      format: date-time
                    updated:
                      type: string
                      description: The updated timestamp (ISO 8601).
                      format: date-time
                    totalEventNumber:
                      type: integer
                      description: The total device events number.
                      minimum: 1
              example:
                - deviceId: FX9600EF95C1
                  created: '2021-03-08T22:04:40.014Z'
                  updated: '2021-03-08T22:05:07.530Z'
                  totalEventNumber: 1
      security:
        - apikey: []
  /read/device/{deviceId}:
    get:
      summary: API to get a list of all RFID Track & Trace given the RFID Reader Device Id.
      operationId: readTransactionsGetByDevice
      tags:
        - Device Events / RFID Read
      parameters:
        - name: deviceId
          in: path
          description: The RFID Reader Device ID.
          required: true
          schema:
            type: string
          style: simple
        - name: limit
          in: query
          description: Maximum number of elements to be retrieved.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
        - name: lastN
          in: query
          description: Only retrieve the last number of elements.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
      responses:
        '200':
          description: A list of all RFID Track & Trace associated with a Reader device id
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    epc:
                      type: string
                    type:
                      type: string
                    transactionId:
                      type: string
                    deviceId:
                      type: string
              example:
                - transactionId: 52c459b6af03b627266589ce
                  deviceId: RFMD-1616510561323
                  epc: 4ae80b6a6c81616510561323
                  id: ca2507d37e53ff9d1bd54f02
                  type: readTransaction
                - transactionId: 2635f2f952234b7a1ef1d82c
                  deviceId: RFMD-1616510561323
                  epc: 4ae80b6a6c81616510561323
                  id: 2482cd5cd80e0420e1ba39d1
                  type: readTransaction
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /print:
    post:
      summary: API to add a Print transaction to the Track and Trace Ledger
      operationId: printTransactionPost
      tags:
        - Device Events / Print
      requestBody:
        required: true
        description: The print transaction to record.
        content:
          application/json:
            schema:
              type: object
              allOf:
                - required:
                    - type
                    - deviceId
                    - timestamp
                - oneOf:
                    - required:
                        - epc
                    - required:
                        - value
                        - symbology
              properties:
                type:
                  type: string
                  description: The transaction type.
                  enum:
                    - printTransaction
                value:
                  type: string
                  description: The Barcode Value
                symbology:
                  type: string
                  description: The barcode symbology used, for instance EAN-13.
                epc:
                  type: string
                  format: uri
                  description: The RFID tag EPC.
                deviceId:
                  type: string
                  description: The Print Device Id.
                timestamp:
                  type: string
                  format: date-time
                  description: The transaction timestamp generated from the device (ISO 8601).
                jsonData:
                  type: object
                  description: Additional print information.
      responses:
        '202':
          description: The print transaction recording has been accepted and it is being recorded
          headers:
            location:
              description: The operation log's resource location that allows to follow progress.
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    get:
      summary: API to get a list of all Print Track & Trace in the Track and Trace Ledger.
      operationId: printTransactionsGetAll
      tags:
        - Device Events / Print
      responses:
        '200':
          description: A list of print epc's and values.
          content:
            application/json:
              schema:
                title: A list of EPC or Values printed.
                type: array
                items:
                  type: object
                  required:
                    - epcOrValue
                    - created
                    - updated
                    - totalEventNumber
                  properties:
                    epcOrValue:
                      type: string
                      description: An RFID tag epc or Barcode value.
                    created:
                      type: string
                      description: The created timestamp (ISO 8601).
                      format: date-time
                    updated:
                      type: string
                      description: The updated timestamp (ISO 8601).
                      format: date-time
                    totalEventNumber:
                      type: integer
                      description: The total value or epc events number.
                      minimum: 1
              example:
                - created: '2021-03-18T07:30:04.210Z'
                  updated: '2021-03-18T07:30:13.686Z'
                  totalEventNumber: 1
                  epcOrValue: 1ae00b6a6c81616052590344
                - created: '2021-03-18T07:29:50.919Z'
                  updated: '2021-03-18T07:30:04.060Z'
                  totalEventNumber: 1
                  epcOrValue: '881616052590344'
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /print/{epcOrValue}:
    get:
      summary: API to get a list of all Print Track & Trace of a given RFID tag EPC or Barcode Value.
      operationId: printTransactionsGetByEpcOrValue
      tags:
        - Device Events / Print
      parameters:
        - name: epcOrValue
          in: path
          description: The RFID EPC or Barcode Value.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: A list of all print transactions of the RFID tag EPC or Barcode Value.
          content:
            application/json:
              schema:
                title: An array of Print Transactions.
                type: array
                items:
                  allOf:
                    - type: object
                      allOf:
                        - required:
                            - type
                            - deviceId
                            - timestamp
                        - oneOf:
                            - required:
                                - epc
                            - required:
                                - value
                                - symbology
                      properties:
                        type:
                          type: string
                          description: The transaction type.
                          enum:
                            - printTransaction
                        value:
                          type: string
                          description: The Barcode Value
                        symbology:
                          type: string
                          description: The barcode symbology used, for instance EAN-13.
                        epc:
                          type: string
                          format: uri
                          description: The RFID tag EPC.
                        deviceId:
                          type: string
                          description: The Print Device Id.
                        timestamp:
                          type: string
                          format: date-time
                          description: The transaction timestamp generated from the device (ISO 8601).
                        jsonData:
                          type: object
                          description: Additional print information.
              example:
                - type: printTransaction
                  value: '881616052590344'
                  symbology: LABEL-TYPE-PRINTER
                  deviceId: print-1616052604760
                  timestamp: '2021-03-15T12:00:00Z'
                  jsonData:
                    originDid: did:iota:1616404135825
                    timestamp: 1616424881469
                  id: ZBPWXNEYPEJIJXFWMBIPYLEVWIUTWEXQRV9ADOFVOTGPLAIHWOFLJJMZSRPGHKKERXTTUMPNAXISOKXZE
                - type: printTransaction
                  epc: 1ae00b6a6c81616052590344
                  deviceId: print-1616052604760
                  timestamp: '2021-03-15T12:00:00Z'
                  jsonData:
                    originDid: did:iota:1616404135825
                    timestamp: 1616424930854
                  id: LP9SHLSCZOCFUEKBWLCQKKALJYKFROQLXUUSUKKFRLFDKYKSUZFLSWZSVUFOJZULAVIBO9YCXWK9JSABO
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /print/channels/{epcOrValue}:
    get:
      summary: API to get the details of the IOTA Streams Channel associated to a Print RFID EPC of Barcode Value.
      operationId: printEpcOrValueChannelDetails
      tags:
        - Device Events / Print
      parameters:
        - name: epcOrValue
          in: path
          description: The RFID EPC or Barcode Value.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: Locator of the IOTA Streams Channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams:devnet:0773c093968256faeeafbe38bca9b86044eab6f81e25b60f7021d58b93a0e5c00000000000000000:6ca9c4b217ce9510ab1311c8:ea3451da6be1b53bcaeddbdf
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    post:
      summary: API to start using an IOTA Streams Channel to trace a Print transaction of an RFID EPC or Barcode Value.
      operationId: printEpcOrValueChannelInit
      tags:
        - Device Events / Print
      parameters:
        - name: epcOrValue
          in: path
          description: The RFID EPC or Barcode Value.
          schema:
            type: string
          style: simple
          required: true
      responses:
        '200':
          description: When an IOTA Streams channel to track the Print RFID EPC or Barcode Value already exists, the locator of such channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams-v0:devnet/QONVJPNUIKYCEICLDNKBFQYTUCQOLLLBZQKNGJGLYLIBFVX9ZYNKOFTICVIGRN9UQGOFTQBNBQNGFQCCF/restricted/KVHVEITBQLBNHSKVUQVFPIA9XQN
        '202':
          description: The creation of the channel is ongoing
          headers:
            location:
              description: The operation log's resource location that allows to follow progress.
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /print/transaction/{epcOrValue}/{transactionId}:
    get:
      summary: API to get an RFID or Barcode print transaction
      operationId: printTransactionGet
      tags:
        - Device Events / Print
      parameters:
        - name: epcOrValue
          in: path
          description: The RFID EPC or Barcode Value.
          schema:
            type: string
          style: simple
          required: true
        - name: transactionId
          in: path
          description: The transaction Id.
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          description: The requested RFID or Barcode print transaction
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - required:
                      - type
                      - deviceId
                      - timestamp
                  - oneOf:
                      - required:
                          - epc
                      - required:
                          - value
                          - symbology
                properties:
                  type:
                    type: string
                    description: The transaction type.
                    enum:
                      - printTransaction
                  value:
                    type: string
                    description: The Barcode Value
                  symbology:
                    type: string
                    description: The barcode symbology used, for instance EAN-13.
                  epc:
                    type: string
                    format: uri
                    description: The RFID tag EPC.
                  deviceId:
                    type: string
                    description: The Print Device Id.
                  timestamp:
                    type: string
                    format: date-time
                    description: The transaction timestamp generated from the device (ISO 8601).
                  jsonData:
                    type: object
                    description: Additional print information.
              example:
                type: printTransaction
                epc: 1ae00b6a6c81616052590344
                deviceId: print-1616052590344
                timestamp: '2021-03-18T07:29:50.344Z'
                jsonData:
                  timestamp: 1616052604760
                id: FIPVYJGXIWNBFQJY9IQRTTGS9KBHNTZVHURSUKSYZXDOYNC9HPRXTACCPBXPWVWTNXPB9XYPKFWFXXLH9
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /print/device:
    get:
      summary: API to get a list of Printers (devices).
      operationId: printGetDevices
      tags:
        - Device Events / Print
      responses:
        '200':
          description: A list of Printers.
          content:
            application/json:
              schema:
                title: A list of devices.
                type: array
                items:
                  type: object
                  required:
                    - deviceId
                    - created
                    - updated
                    - totalEventNumber
                  properties:
                    deviceId:
                      type: string
                      description: The device id.
                    created:
                      type: string
                      description: The created timestamp (ISO 8601).
                      format: date-time
                    updated:
                      type: string
                      description: The updated timestamp (ISO 8601).
                      format: date-time
                    totalEventNumber:
                      type: integer
                      description: The total device events number.
                      minimum: 1
              example:
                - deviceId: FX9600EF95C1
                  created: '2021-03-08T22:04:40.014Z'
                  updated: '2021-03-08T22:05:07.530Z'
                  totalEventNumber: 1
      security:
        - apikey: []
  /print/device/{deviceId}:
    get:
      summary: API to get a list of all Print Track & Trace given the Printer Device Id.
      operationId: printTransactionsGetByDevice
      tags:
        - Device Events / Print
      parameters:
        - name: deviceId
          in: path
          description: The Printer Device ID.
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          description: A list of all Print Track & Trace associated with a Printing device id
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    epc:
                      type: string
                    type:
                      type: string
                    value:
                      type: string
                    transactionId:
                      type: string
                    deviceId:
                      type: string
              example:
                - transactionId: 52c459b6af03b627266589ce
                  value: '881616510652463'
                  deviceId: print-1616510652463
                  type: printTransaction
                  id: ca2507d37e53ff9d1bd54f02
                - transactionId: 2635f2f952234b7a1ef1d82c
                  deviceId: print-1616510652463
                  epc: 1ae00b6a6c81616510652463
                  type: printTransaction
                  id: 2482cd5cd80e0420e1ba39d1
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /events:
    post:
      summary: API to record a new GS1 EPCIS 2.0 Event.
      operationId: epcis20Record
      tags:
        - Business Events / GS1 EPCIS 2.0
      requestBody:
        required: true
        description: The EPCIS Event.
        content:
          application/json:
            schema:
              type: object
              properties:
                '@context':
                  anyOf:
                    - type: string
                      format: uri
                    - type: object
                    - type: array
                      uniqueItems: true
                      items:
                        anyOf:
                          - type: string
                            format: uri
                          - type: object
                isA:
                  type: string
                  enum:
                    - ObjectEvent
                eventTime:
                  type: string
                  format: date-time
                eventTimeZoneOffset:
                  type: string
                  pattern: ^(\+|\-)((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$
                action:
                  type: string
                  enum:
                    - OBSERVE
                    - ADD
                    - DELETE
                epcList:
                  type: array
                  items:
                    type: string
                    format: uri
                quantityList:
                  type: array
                  items:
                    type: object
                    properties:
                      epcClass:
                        type: string
                        format: uri
                      quantity:
                        type: number
                      uom:
                        type: string
                        pattern: ^[A-Z0-9]{2,3}$
                    required:
                      - epcClass
                      - quantity
                bizStep:
                  type: string
                bizLocation:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uri
                  required:
                    - id
                readPoint:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uri
                  required:
                    - id
                sourceList:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        format: uri
                      source:
                        type: string
                        format: uri
                    required:
                      - type
                      - source
                destinationList:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        format: uri
                      destination:
                        type: string
                        format: uri
                    required:
                      - type
                      - destination
                disposition:
                  type: string
                  format: uri
                bizTransactionList:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        format: uri
                      bizTransaction:
                        type: string
                        format: uri
                    required:
                      - bizTransaction
              allOf:
                - required:
                    - '@context'
                    - isA
                    - eventTime
                    - eventTimeZoneOffset
                    - action
                - anyOf:
                    - required:
                        - epcList
                    - required:
                        - quantityList
      responses:
        '202':
          description: Accepted. The event is being recorded
          headers:
            location:
              description: The operation log's resource location that allows to follow progress.
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /events/{epc}:
    get:
      summary: API to fetch the GS1 EPCIS 2.0 Events of an EPC.
      operationId: epcis20Fetch
      tags:
        - Business Events / GS1 EPCIS 2.0
      parameters:
        - name: epc
          in: path
          description: The EPC
          required: true
          schema:
            type: string
            format: uri
          style: simple
        - name: limit
          in: query
          description: Maximum number of elements to be retrieved.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
        - name: lastN
          in: query
          description: Only retrieve the last number of elements.
          schema:
            type: integer
            minimum: 1
          style: form
          explode: false
          required: false
      responses:
        '200':
          description: EPCIS Document with the Events.
          content:
            application/json:
              schema:
                type: object
                properties:
                  '@context':
                    anyOf:
                      - type: string
                        format: uri
                      - type: object
                      - type: array
                        uniqueItems: true
                        items:
                          anyOf:
                            - type: string
                              format: uri
                            - type: object
                  isA:
                    type: string
                    enum:
                      - EPCISDocument
                  eventList:
                    type: array
                    items:
                      type: object
                      properties:
                        '@context':
                          anyOf:
                            - type: string
                              format: uri
                            - type: object
                            - type: array
                              uniqueItems: true
                              items:
                                anyOf:
                                  - type: string
                                    format: uri
                                  - type: object
                        isA:
                          type: string
                          enum:
                            - ObjectEvent
                        eventTime:
                          type: string
                          format: date-time
                        eventTimeZoneOffset:
                          type: string
                          pattern: ^(\+|\-)((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$
                        action:
                          type: string
                          enum:
                            - OBSERVE
                            - ADD
                            - DELETE
                        epcList:
                          type: array
                          items:
                            type: string
                            format: uri
                        quantityList:
                          type: array
                          items:
                            type: object
                            properties:
                              epcClass:
                                type: string
                                format: uri
                              quantity:
                                type: number
                              uom:
                                type: string
                                pattern: ^[A-Z0-9]{2,3}$
                            required:
                              - epcClass
                              - quantity
                        bizStep:
                          type: string
                        bizLocation:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uri
                          required:
                            - id
                        readPoint:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uri
                          required:
                            - id
                        sourceList:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                format: uri
                              source:
                                type: string
                                format: uri
                            required:
                              - type
                              - source
                        destinationList:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                format: uri
                              destination:
                                type: string
                                format: uri
                            required:
                              - type
                              - destination
                        disposition:
                          type: string
                          format: uri
                        bizTransactionList:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                format: uri
                              bizTransaction:
                                type: string
                                format: uri
                            required:
                              - bizTransaction
                      allOf:
                        - required:
                            - '@context'
                            - isA
                            - eventTime
                            - eventTimeZoneOffset
                            - action
                        - anyOf:
                            - required:
                                - epcList
                            - required:
                                - quantityList
                required:
                  - '@context'
                  - isA
                  - eventList
              example:
                '@context':
                  - https://gs1.github.io/EPCIS/epcis-context.jsonld
                isA: EPCISDocument
                eventList:
                  - isA: ObjectEvent
                    epcList:
                      - urn:epc:id:sgtin:123456.7890002.55
                    action: OBSERVE
                    eventTime: '2020-10-22T10:25:53.276Z'
                    eventTimeZoneOffset: '+01:00'
                    readPoint:
                      id: urn:epc:id:sgln:0614141.11111.978
                    bizLocation:
                      id: urn:epc:id:sgln:0614141.11111.0
                    bizStep: shipping
                    recordTime: '2021-02-26T08:40:27.305Z'
                    eventID: SYDWCQZDMPNYYXZYNNWIGUYERPVQPMQSKPEGKUVEIMEGCHAZUSNTGGYRMOGLGZDZBFVCPUOKNVODNSMYM
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /events/channels/{epc}:
    get:
      summary: API to obtain the details of the Streams Channel associated to an EPC.
      operationId: epcis20ChannelDetails
      tags:
        - Business Events / GS1 EPCIS 2.0
      parameters:
        - name: epc
          in: path
          description: The EPC
          required: true
          schema:
            type: string
            format: uri
          style: simple
      responses:
        '200':
          description: Locator of the IOTA Streams Channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams:devnet:0773c093968256faeeafbe38bca9b86044eab6f81e25b60f7021d58b93a0e5c00000000000000000:6ca9c4b217ce9510ab1311c8:ea3451da6be1b53bcaeddbdf
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    post:
      summary: API to start using an IOTA Streams Channel to start receiving EPCIS Events.
      operationId: epcis20ChannelInit
      tags:
        - Business Events / GS1 EPCIS 2.0
      parameters:
        - name: epc
          in: path
          description: The EPC
          required: true
          schema:
            type: string
            format: uri
          style: simple
      responses:
        '200':
          description: When an IOTA Streams channel to track the EPC already exists, the locator of such channel in the form of a URN.
          content:
            application/json:
              schema:
                type: object
                properties:
                  locator:
                    type: string
                    format: uri
                    description: Resource Locator's URI.
              example:
                locator: urn:iota-streams:devnet:0773c093968256faeeafbe38bca9b86044eab6f81e25b60f7021d58b93a0e5c00000000000000000:6ca9c4b217ce9510ab1311c8:ea3451da6be1b53bcaeddbdf
        '202':
          description: A new IOTA Streams Channel is being created to track the EPC.
          headers:
            location:
              description: The operation log's resource location that allows to follow progress.
              schema:
                type: string
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /actor/identity:
    post:
      summary: API to create a Decentralized Identity associated to an API Key.
      operationId: identityPost
      tags:
        - Identity
      requestBody:
        required: true
        description: The Decentralized Identity.
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - credential
              properties:
                id:
                  type: string
                  title: The DID
                  description: The Decentralized Identity.
                  pattern: /^did:[\da-z]+:[\w.-]+/
                credential:
                  description: The Verifiable Credential or Verifiable Presentation presented as a proof of DID ownership and other possible claims
                  anyOf:
                    - type: object
                      additionalProperties: true
                    - type: string
      responses:
        '201':
          description: Success
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '409':
          description: Conflict Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    put:
      summary: API to update a Decentralized Identity associated to an API Key.
      operationId: identityPut
      tags:
        - Identity
      requestBody:
        required: true
        description: The Decentralized Identity.
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - credential
              properties:
                id:
                  type: string
                  title: The DID
                  description: The Decentralized Identity.
                  pattern: /^did:[\da-z]+:[\w.-]+/
                credential:
                  description: The Verifiable Credential or Verifiable Presentation presented as a proof of DID ownership and other possible claims
                  anyOf:
                    - type: object
                      additionalProperties: true
                    - type: string
      responses:
        '200':
          description: Success
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    get:
      summary: API to query a Decentralized Identity. Either associated to the API Key or to a known claim.
      operationId: identityGet
      tags:
        - Identity
      parameters:
        - name: claimName
          in: query
          description: Name of the claim for which the DID is a subject.
          schema:
            type: string
            minLength: 1
          style: form
          explode: false
          required: false
        - name: claimValue
          in: query
          description: Value of the claim for which the DID is a subject.
          schema:
            type: string
            minLength: 1
          style: form
          explode: false
          required: false
      responses:
        '200':
          description: The Decentralized Identities.
          content:
            application/json:
              schema:
                title: An array of DIDs.
                description: A list of Decentralized Identities.
                type: array
                items:
                  title: The DID
                  type: string
                  description: The Decentralized Identity.
                  pattern: /^did:[\da-z]+:[\w.-]+/
              example:
                - id: did:iota:FTcKpHtWSkLtA4kyF8SQKhqXPKqBdtkayD6LL2FXaSjB
                  isTrusted: true
                  isTrustedIssuer: true
        '404':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /actor/claims:
    get:
      summary: API to get claims associated with the API Key.
      operationId: claimsGet
      tags:
        - Identity
      responses:
        '200':
          description: The claims associated with the API Key.
          content:
            application/json:
              example:
                type: Organization
                name:
                  type: PropertyValue
                  value: Good Wines Maker
                gs1CompanyPrefix:
                  type: identifier
                  value: '9524678'
        '404':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /actor/claims/{DID}:
    get:
      summary: API to get claims associated with the supplied DID.
      operationId: claimsGetByDid
      tags:
        - Identity
      parameters:
        - name: DID
          in: path
          description: Value of the DID to retrieve subject claims.
          schema:
            title: The DID
            type: string
            description: The Decentralized Identity.
            pattern: /^did:[\da-z]+:[\w.-]+/
          explode: false
          required: true
      responses:
        '200':
          description: The claims associated with the supplied DID.
          content:
            application/json:
              example:
                type: Organization
                name:
                  type: PropertyValue
                  value: Good Wines Maker
                gs1CompanyPrefix:
                  type: identifier
                  value: '9524678'
        '404':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /master-data:
    post:
      summary: API to create a new referential master data entity.
      operationId: masterDataPost
      tags:
        - Reference ("Master") Data
      requestBody:
        required: true
        description: The entity object.
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - name
                - type
              properties:
                id:
                  type: string
                  description: The Entity's Uniform Resource Name.
                  format: uri
                type:
                  type: string
                  description: The Entity Type
                  enum:
                    - BizLocation
                name:
                  type: string
                  description: The Entity's name.
                description:
                  type: string
                  description: The Entity's description.
                geo:
                  type: object
                  description: The Entity's geo location.
                  properties:
                    type:
                      type: string
                      description: The geo coordinates type.
                      enum:
                        - GeoCoordinates
                    address:
                      type: string
                      description: The Entity's address.
                      minLength: 1
                    addressCountry:
                      type: string
                      description: The Entity's ISO 3166-1 alpha-2 country code.
                      maxLength: 2
                      minLength: 2
                    latitude:
                      type: number
                      description: The Entity's latitude.
                    longitude:
                      type: number
                      description: The Entity's longitude.
                site:
                  type: string
                  description: The Entity's site URN.
                  format: uri
                sst:
                  type: string
                  description: The Entity's Sub-Site Type code.
      responses:
        '201':
          description: Success
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '409':
          description: Conflict Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    put:
      summary: API to update an existing referential master data entity.
      operationId: masterDataPut
      tags:
        - Reference ("Master") Data
      requestBody:
        required: true
        description: The entity object.
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - name
                - type
              properties:
                id:
                  type: string
                  description: The Entity's Uniform Resource Name.
                  format: uri
                type:
                  type: string
                  description: The Entity Type
                  enum:
                    - BizLocation
                name:
                  type: string
                  description: The Entity's name.
                description:
                  type: string
                  description: The Entity's description.
                geo:
                  type: object
                  description: The Entity's geo location.
                  properties:
                    type:
                      type: string
                      description: The geo coordinates type.
                      enum:
                        - GeoCoordinates
                    address:
                      type: string
                      description: The Entity's address.
                      minLength: 1
                    addressCountry:
                      type: string
                      description: The Entity's ISO 3166-1 alpha-2 country code.
                      maxLength: 2
                      minLength: 2
                    latitude:
                      type: number
                      description: The Entity's latitude.
                    longitude:
                      type: number
                      description: The Entity's longitude.
                site:
                  type: string
                  description: The Entity's site URN.
                  format: uri
                sst:
                  type: string
                  description: The Entity's Sub-Site Type code.
      responses:
        '204':
          description: Success
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
    get:
      summary: API to get a referential master data entity by query params.
      operationId: masterDataQuery
      tags:
        - Reference ("Master") Data
      parameters:
        - name: type
          in: query
          description: The type of entity.
          schema:
            type: string
          required: true
        - name: latitude
          in: query
          description: The latitude.
          schema:
            type: number
          required: false
        - name: longitude
          in: query
          description: The longitude.
          schema:
            type: number
          required: false
      responses:
        '200':
          description: The entity details.
          content:
            application/json:
              schema:
                title: An array of the entities
                type: array
                items:
                  type: object
                  required:
                    - id
                    - name
                    - type
                  properties:
                    id:
                      type: string
                      description: The Entity's Uniform Resource Name.
                      format: uri
                    type:
                      type: string
                      description: The Entity Type
                      enum:
                        - BizLocation
                    name:
                      type: string
                      description: The Entity's name.
                    description:
                      type: string
                      description: The Entity's description.
                    geo:
                      type: object
                      description: The Entity's geo location.
                      properties:
                        type:
                          type: string
                          description: The geo coordinates type.
                          enum:
                            - GeoCoordinates
                        address:
                          type: string
                          description: The Entity's address.
                          minLength: 1
                        addressCountry:
                          type: string
                          description: The Entity's ISO 3166-1 alpha-2 country code.
                          maxLength: 2
                          minLength: 2
                        latitude:
                          type: number
                          description: The Entity's latitude.
                        longitude:
                          type: number
                          description: The Entity's longitude.
                    site:
                      type: string
                      description: The Entity's site URN.
                      format: uri
                    sst:
                      type: string
                      description: The Entity's Sub-Site Type code.
              example:
                - site: urn:epc:id:sgln:0614141.67890.200
                  sst: '201'
                  name: Factory 1 Storage
                  description: Parts Factory at the Storage Area
                  id: urn:epc:id:sgln:0614141.12345.406
                  type: BizLocation
                  geo:
                    addressCountry: US
                    address: 22nd A Street, New Jersey
                    type: GeoCoordinates
                    latitude: 44
                    longitude: -44
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
  /master-data/{id}:
    get:
      summary: API to get a referential master data entity by id
      operationId: masterDataGet
      tags:
        - Reference ("Master") Data
      parameters:
        - name: id
          in: path
          description: The Location's URN.
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          description: The entity details.
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - type
                properties:
                  id:
                    type: string
                    description: The Entity's Uniform Resource Name.
                    format: uri
                  type:
                    type: string
                    description: The Entity Type
                    enum:
                      - BizLocation
                  name:
                    type: string
                    description: The Entity's name.
                  description:
                    type: string
                    description: The Entity's description.
                  geo:
                    type: object
                    description: The Entity's geo location.
                    properties:
                      type:
                        type: string
                        description: The geo coordinates type.
                        enum:
                          - GeoCoordinates
                      address:
                        type: string
                        description: The Entity's address.
                        minLength: 1
                      addressCountry:
                        type: string
                        description: The Entity's ISO 3166-1 alpha-2 country code.
                        maxLength: 2
                        minLength: 2
                      latitude:
                        type: number
                        description: The Entity's latitude.
                      longitude:
                        type: number
                        description: The Entity's longitude.
                  site:
                    type: string
                    description: The Entity's site URN.
                    format: uri
                  sst:
                    type: string
                    description: The Entity's Sub-Site Type code.
              example:
                site: urn:epc:id:sgln:0614141.67890.200
                sst: '201'
                name: Factory 1 Storage
                description: Parts Factory at the Storage Area
                id: urn:epc:id:sgln:0614141.12345.406
                type: BizLocation
                geo:
                  addressCountry: US
                  address: 22nd A Street, New Jersey
                  type: GeoCoordinates
                  latitude: 44
                  longitude: -44
        '400':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
        '500':
          description: Error
          content:
            application/json:
              schema:
                properties:
                  type:
                    description: The type of the error.
                    type: string
                  details:
                    description: The error details.
                    type: string
      security:
        - apikey: []
components:
  schemas:
    ReadTransaction:
      allOf:
        - type: object
          required:
            - deviceId
            - antennaId
            - peakRSSI
            - epc
            - type
            - timestamp
          properties:
            deviceId:
              type: string
              description: The Reader Device Id.
            antennaId:
              type: string
              description: The Reader Antenna Id.
            peakRSSI:
              type: number
              description: The Reader peak RSSI.
            epc:
              type: string
              format: uri
              description: The RFID tag EPC.
            location:
              oneOf:
                - type: object
                  description: The Reader location.
                  properties:
                    latitude:
                      type: number
                      description: The Latitude.
                    longitude:
                      type: number
                      description: The Longitude.
                - type: string
                  description: A Geo URI string.
                  format: uri
            timestamp:
              type: string
              format: date-time
              description: The transaction timestamp generated from the device (ISO 8601).
            type:
              type: string
              description: The transaction type.
              enum:
                - readTransaction
            jsonData:
              type: object
              description: Additional read information.
    RFIDTags:
      title: A list of RFID tags.
      type: array
      items:
        type: object
        required:
          - epc
          - created
          - updated
          - totalEventNumber
        properties:
          epc:
            type: string
            format: uri
            description: The RFID tag EPC.
          created:
            type: string
            description: The created timestamp (ISO 8601).
            format: date-time
          updated:
            type: string
            description: The updated timestamp (ISO 8601).
            format: date-time
          totalEventNumber:
            type: integer
            description: The total epc events number.
            minimum: 1
    ReadTransactionList:
      title: An array of Read Transactions.
      type: array
      items:
        allOf:
          - type: object
            required:
              - deviceId
              - antennaId
              - peakRSSI
              - epc
              - type
              - timestamp
            properties:
              deviceId:
                type: string
                description: The Reader Device Id.
              antennaId:
                type: string
                description: The Reader Antenna Id.
              peakRSSI:
                type: number
                description: The Reader peak RSSI.
              epc:
                type: string
                format: uri
                description: The RFID tag EPC.
              location:
                oneOf:
                  - type: object
                    description: The Reader location.
                    properties:
                      latitude:
                        type: number
                        description: The Latitude.
                      longitude:
                        type: number
                        description: The Longitude.
                  - type: string
                    description: A Geo URI string.
                    format: uri
              timestamp:
                type: string
                format: date-time
                description: The transaction timestamp generated from the device (ISO 8601).
              type:
                type: string
                description: The transaction type.
                enum:
                  - readTransaction
              jsonData:
                type: object
                description: Additional read information.
    ScanTransaction:
      allOf:
        - type: object
          required:
            - symbology
            - value
            - timestamp
            - deviceId
            - type
          properties:
            symbology:
              type: string
              description: The barcode symbology used, for instance EAN-13.
            value:
              type: string
              description: The scanned barcode ID, for instance a GTIN-13 code.
            location:
              oneOf:
                - type: object
                  description: The Reader location.
                  properties:
                    latitude:
                      type: number
                      description: The Latitude.
                    longitude:
                      type: number
                      description: The Longitude.
                - type: string
                  description: A Geo URI string.
                  format: uri
            timestamp:
              type: string
              format: date-time
              description: The transaction timestamp generated from the device (ISO 8601).
            deviceId:
              type: string
              description: The Scanner Device Id.
            type:
              type: string
              enum:
                - scanTransaction
              description: The transaction type.
            jsonData:
              type: object
              description: Additional scanned information.
    ScanTransactionList:
      title: An array of Scan Transactions.
      type: array
      items:
        allOf:
          - type: object
            required:
              - symbology
              - value
              - timestamp
              - deviceId
              - type
            properties:
              symbology:
                type: string
                description: The barcode symbology used, for instance EAN-13.
              value:
                type: string
                description: The scanned barcode ID, for instance a GTIN-13 code.
              location:
                oneOf:
                  - type: object
                    description: The Reader location.
                    properties:
                      latitude:
                        type: number
                        description: The Latitude.
                      longitude:
                        type: number
                        description: The Longitude.
                  - type: string
                    description: A Geo URI string.
                    format: uri
              timestamp:
                type: string
                format: date-time
                description: The transaction timestamp generated from the device (ISO 8601).
              deviceId:
                type: string
                description: The Scanner Device Id.
              type:
                type: string
                enum:
                  - scanTransaction
                description: The transaction type.
              jsonData:
                type: object
                description: Additional scanned information.
    BarcodeValues:
      title: A list of barcode values.
      type: array
      items:
        type: object
        required:
          - value
          - created
          - updated
          - totalEventNumber
        properties:
          value:
            type: string
            description: The barcode value.
          created:
            type: string
            description: The created timestamp (ISO 8601).
            format: date-time
          updated:
            type: string
            description: The updated timestamp (ISO 8601).
            format: date-time
          totalEventNumber:
            type: integer
            description: The total value events number.
            minimum: 1
    PrintTransaction:
      allOf:
        - type: object
          allOf:
            - required:
                - type
                - deviceId
                - timestamp
            - oneOf:
                - required:
                    - epc
                - required:
                    - value
                    - symbology
          properties:
            type:
              type: string
              description: The transaction type.
              enum:
                - printTransaction
            value:
              type: string
              description: The Barcode Value
            symbology:
              type: string
              description: The barcode symbology used, for instance EAN-13.
            epc:
              type: string
              format: uri
              description: The RFID tag EPC.
            deviceId:
              type: string
              description: The Print Device Id.
            timestamp:
              type: string
              format: date-time
              description: The transaction timestamp generated from the device (ISO 8601).
            jsonData:
              type: object
              description: Additional print information.
    PrintTransactionList:
      title: An array of Print Transactions.
      type: array
      items:
        allOf:
          - type: object
            allOf:
              - required:
                  - type
                  - deviceId
                  - timestamp
              - oneOf:
                  - required:
                      - epc
                  - required:
                      - value
                      - symbology
            properties:
              type:
                type: string
                description: The transaction type.
                enum:
                  - printTransaction
              value:
                type: string
                description: The Barcode Value
              symbology:
                type: string
                description: The barcode symbology used, for instance EAN-13.
              epc:
                type: string
                format: uri
                description: The RFID tag EPC.
              deviceId:
                type: string
                description: The Print Device Id.
              timestamp:
                type: string
                format: date-time
                description: The transaction timestamp generated from the device (ISO 8601).
              jsonData:
                type: object
                description: Additional print information.
    EpcOrValuePrints:
      title: A list of EPC or Values printed.
      type: array
      items:
        type: object
        required:
          - epcOrValue
          - created
          - updated
          - totalEventNumber
        properties:
          epcOrValue:
            type: string
            description: An RFID tag epc or Barcode value.
          created:
            type: string
            description: The created timestamp (ISO 8601).
            format: date-time
          updated:
            type: string
            description: The updated timestamp (ISO 8601).
            format: date-time
          totalEventNumber:
            type: integer
            description: The total value or epc events number.
            minimum: 1
    Resource:
      type: object
      properties:
        locator:
          type: string
          format: uri
          description: Resource Locator's URI.
    Devices:
      title: A list of devices.
      type: array
      items:
        type: object
        required:
          - deviceId
          - created
          - updated
          - totalEventNumber
        properties:
          deviceId:
            type: string
            description: The device id.
          created:
            type: string
            description: The created timestamp (ISO 8601).
            format: date-time
          updated:
            type: string
            description: The updated timestamp (ISO 8601).
            format: date-time
          totalEventNumber:
            type: integer
            description: The total device events number.
            minimum: 1
    id:
      type: object
      required:
        - id
        - credential
      properties:
        id:
          type: string
          title: The DID
          description: The Decentralized Identity.
          pattern: /^did:[\da-z]+:[\w.-]+/
        credential:
          description: The Verifiable Credential or Verifiable Presentation presented as a proof of DID ownership and other possible claims
          anyOf:
            - type: object
              additionalProperties: true
            - type: string
    DID:
      title: The DID
      type: string
      description: The Decentralized Identity.
      pattern: /^did:[\da-z]+:[\w.-]+/
    EpcisEvent:
      type: object
      properties:
        '@context':
          anyOf:
            - type: string
              format: uri
            - type: object
            - type: array
              uniqueItems: true
              items:
                anyOf:
                  - type: string
                    format: uri
                  - type: object
        isA:
          type: string
          enum:
            - ObjectEvent
        eventTime:
          type: string
          format: date-time
        eventTimeZoneOffset:
          type: string
          pattern: ^(\+|\-)((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$
        action:
          type: string
          enum:
            - OBSERVE
            - ADD
            - DELETE
        epcList:
          type: array
          items:
            type: string
            format: uri
        quantityList:
          type: array
          items:
            type: object
            properties:
              epcClass:
                type: string
                format: uri
              quantity:
                type: number
              uom:
                type: string
                pattern: ^[A-Z0-9]{2,3}$
            required:
              - epcClass
              - quantity
        bizStep:
          type: string
        bizLocation:
          type: object
          properties:
            id:
              type: string
              format: uri
          required:
            - id
        readPoint:
          type: object
          properties:
            id:
              type: string
              format: uri
          required:
            - id
        sourceList:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                format: uri
              source:
                type: string
                format: uri
            required:
              - type
              - source
        destinationList:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                format: uri
              destination:
                type: string
                format: uri
            required:
              - type
              - destination
        disposition:
          type: string
          format: uri
        bizTransactionList:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                format: uri
              bizTransaction:
                type: string
                format: uri
            required:
              - bizTransaction
      allOf:
        - required:
            - '@context'
            - isA
            - eventTime
            - eventTimeZoneOffset
            - action
        - anyOf:
            - required:
                - epcList
            - required:
                - quantityList
    EpcisDocument:
      type: object
      properties:
        '@context':
          anyOf:
            - type: string
              format: uri
            - type: object
            - type: array
              uniqueItems: true
              items:
                anyOf:
                  - type: string
                    format: uri
                  - type: object
        isA:
          type: string
          enum:
            - EPCISDocument
        eventList:
          type: array
          items:
            type: object
            properties:
              '@context':
                anyOf:
                  - type: string
                    format: uri
                  - type: object
                  - type: array
                    uniqueItems: true
                    items:
                      anyOf:
                        - type: string
                          format: uri
                        - type: object
              isA:
                type: string
                enum:
                  - ObjectEvent
              eventTime:
                type: string
                format: date-time
              eventTimeZoneOffset:
                type: string
                pattern: ^(\+|\-)((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$
              action:
                type: string
                enum:
                  - OBSERVE
                  - ADD
                  - DELETE
              epcList:
                type: array
                items:
                  type: string
                  format: uri
              quantityList:
                type: array
                items:
                  type: object
                  properties:
                    epcClass:
                      type: string
                      format: uri
                    quantity:
                      type: number
                    uom:
                      type: string
                      pattern: ^[A-Z0-9]{2,3}$
                  required:
                    - epcClass
                    - quantity
              bizStep:
                type: string
              bizLocation:
                type: object
                properties:
                  id:
                    type: string
                    format: uri
                required:
                  - id
              readPoint:
                type: object
                properties:
                  id:
                    type: string
                    format: uri
                required:
                  - id
              sourceList:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      format: uri
                    source:
                      type: string
                      format: uri
                  required:
                    - type
                    - source
              destinationList:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      format: uri
                    destination:
                      type: string
                      format: uri
                  required:
                    - type
                    - destination
              disposition:
                type: string
                format: uri
              bizTransactionList:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      format: uri
                    bizTransaction:
                      type: string
                      format: uri
                  required:
                    - bizTransaction
            allOf:
              - required:
                  - '@context'
                  - isA
                  - eventTime
                  - eventTimeZoneOffset
                  - action
              - anyOf:
                  - required:
                      - epcList
                  - required:
                      - quantityList
      required:
        - '@context'
        - isA
        - eventList
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: apikey
      description: API Key is determined by the consuming client.
