Dojo · AsyncAPI Specification

EPOS Data API (WebSockets)

Version 1.0.0

The Async Websocket API to enable Dojo integrated products. Core modules: - Tables - Areas - Orders - Parties - Reservations API modules can generally be implemented independently, with a small number of interdependent fields affected by other modules (for example, if Parties are implemented & the information is known, a `partyId` should be attached to an Order's `dineInDetails`). All requests are made in the form of a JSONRPCRequest, and data that is specific to a request is stored in its `params` field. A `headers` field is also included inside every `params` field, this contains details about the requestor that can be used for logging purposes or EPOS business logic (such as waiter id based access to entities). ## Connecting The EPOS opens a single WebSocket connection to the URL listed under `servers` below and keeps it open. Dojo multiplexes every JSON-RPC method invocation (for example `SearchOrdersV1`, `GetOrderByIdV1`, `RecordOrderPaymentByIdV1`) over that one connection. Three handshake headers are required: | Header | Required | Description | | --- | --- | --- | | `Authorization` | Yes | `Basic ` (literal `Basic ` prefix; the API key is sent as-is and is **not** base64-encoded). Use a key starting with `sk_sandbox_` or `sk_prod_`. | | `software-house-id` | Yes | Identifies the EPOS company. Provided by Dojo. | | `reseller-id` | Optional | Identifies the reseller. Provided by Dojo. | Before Dojo will route any request to your EPOS, you must register the capabilities you implement with `PUT /epos/integrations/ws` on the Dojo API. See the EPOS Data API guide for the full registration flow.

View Spec View on GitHub PaymentsUnited KingdomPayment GatewayPayment ProcessingAcquiringCard PaymentsIn-Person PaymentsTerminalsPoint of SaleWebhooksAsyncAPIWebhooksEvents

Channels

HandleEventV1
publish HandleEventV1_Response
Handle events from Dojo. Capabilities: - `HandleEvent:payment_intent.created` - `HandleEvent:payment_intent.status_updated`
SearchOrdersV1
publish SearchOrdersV1_Response
Searches through the orders on the EPOS. Capability: `SearchOrders`
GetOrderByIdV1
publish GetOrderByIdV1_Response
Retrieve details of an order using the order ID. Capability: `GetOrderById`
CancelOrderByIdV1
publish CancelOrderByIdV1_Response
Cancels an order by ID. Capability: `CancelOrderById`
CreateOrderV1
publish CreateOrderV1_Response
Create an order on the EPOS. Capability: `CreateOrder`
CreateOrderLockV1
publish CreateOrderLockV1_Response
Request a Dojo write lock on an EPOS Order, returning the latest version of the Order once locked. Capability: CreateOrderLock
DeleteOrderLockV1
publish DeleteOrderLockV1_Response
Request to release a Dojo write lock on an EPOS Order, returning the latest version of the Order once unlocked. Capability: `DeleteOrderLock`
ExtendOrderLockV1
publish ExtendOrderLockV1_Response
Request a Dojo write lock on an EPOS Order is extended, returning the latest version of the Order. Capability: `ExtendOrderLock`
GetOrderBillByIdV1
publish GetOrderBillByIdV1_Response
Retrieve a printable version of the Order, specifying the Header and Footer sections as it should be printed on the terminal. Capability: `GetOrderBill`
RecordOrderPaymentByIdV1
publish RecordOrderPaymentByIdV1_Response
Request to record a payment against this order. If the payment cannot be recorded, use the error messages and Dojo will reverse/release/refund the payment. Capability: `RecordOrderPayment`
ListAreasV1
publish ListAreasV1_Response
Retrieves all areas that are being served. Capability: `ListAreas`
DeletePartyByIdV1
publish DeletePartyByIdV1_Response
Deletes a specific party. Capability: `DeletePartyById`
CreatePartyV1
publish CreatePartyV1_Response
Create a new party in the POS domain. Capability: `CreateParty`
GetPartyByIdV1
publish GetPartyByIdV1_Response
Retrieves a specific party. Capability: `GetPartyById`
UpdatePartyV1
publish UpdatePartyV1_Response
Sets the party's details to those provided. Capability: `UpdatePartyById`
DeleteReservationByIdV1
publish DeleteReservationByIdV1_Response
Deletes a specific reservation. Capability: `DeleteReservationById`
CreateReservationV1
publish CreateReservationV1_Response
Create a new reservation in the POS domain. Capability: `CreateReservation`
GetReservationByIdV1
publish GetReservationByIdV1_Response
Retrieves a specific reservation. Capability: `GetReservationById`
UpdateReservationV1
publish UpdateReservationV1_Response
Sets the reservation's details to those provided. Capbility: `UpdateReservationById`
SearchPartiesV1
publish SearchPartiesV1_Response
Searches through parties on the EPOS. By default, this endpoint should exclude parties with `endTime` set, including them only when `completedOnly: true`. Capability: `SearchParties`
SearchReservationsV1
publish SearchReservationsV1_Response
Search through reservations on the EPOS. Capability: `SearchReservations`
SearchTablesV1
publish SearchTablesV1_Response
Search through tables on the EPOS. Capability: `SearchTables`

Servers

wss
production eu.ws.dojo.tech/epos
Single endpoint for both sandbox and production. The environment is determined by the API key prefix (`sk_sandbox_…` vs `sk_prod_…`) sent in the `Authorization` handshake header.

AsyncAPI Specification

Raw ↑
info:
  title: EPOS Data API (WebSockets)
  version: 1.0.0
  description: |-
    The Async Websocket API to enable Dojo integrated products.

    Core modules:
    - Tables
    - Areas
    - Orders
    - Parties
    - Reservations

    API modules can generally be
    implemented independently, with a small number of interdependent fields affected
    by other modules (for example, if Parties are implemented & the information is
    known, a `partyId` should be attached to an Order's `dineInDetails`).
    All requests are made in the form of a JSONRPCRequest,
    and data that is specific to a request is stored in its `params` field.
    A `headers` field is also included inside every `params` field,
    this contains details about the requestor that can be used for
    logging purposes or EPOS business logic (such as waiter id based access to entities).

    ## Connecting

    The EPOS opens a single WebSocket connection to the URL listed under `servers`
    below and keeps it open. Dojo multiplexes every JSON-RPC method invocation
    (for example `SearchOrdersV1`, `GetOrderByIdV1`, `RecordOrderPaymentByIdV1`)
    over that one connection.

    Three handshake headers are required:

    | Header | Required | Description |
    | --- | --- | --- |
    | `Authorization` | Yes | `Basic <api_key>` (literal `Basic ` prefix; the API key is sent as-is and is **not** base64-encoded). Use a key starting with `sk_sandbox_` or `sk_prod_`. |
    | `software-house-id` | Yes | Identifies the EPOS company. Provided by Dojo. |
    | `reseller-id` | Optional | Identifies the reseller. Provided by Dojo. |

    Before Dojo will route any request to your EPOS, you must register the
    capabilities you implement with `PUT /epos/integrations/ws` on the Dojo API.
    See the EPOS Data API guide for the full registration flow.
servers:
  production:
    url: eu.ws.dojo.tech/epos
    protocol: wss
    description: |-
      Single endpoint for both sandbox and production. The environment is
      determined by the API key prefix (`sk_sandbox_…` vs `sk_prod_…`) sent in
      the `Authorization` handshake header.
    security:
      - basicAuth: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: |-
        Pass `Authorization: Basic <api_key>` on the WebSocket handshake.

        Despite the `Basic` scheme name, the API key is sent as-is — do **not**
        base64-encode it. Use a key starting with `sk_sandbox_` (sandbox) or
        `sk_prod_` (production). The `software-house-id` header is also required;
        `reseller-id` is optional. See the connection guide for details.
  schemas:
    Headers:
      title: Headers
      required:
        - headers
      description: ''
      type: object
      properties:
        headers:
          $ref: '#/components/schemas/RequestHeaders'
    RequestHeaders:
      type: object
      properties:
        waiterId:
          type: string
          description: The ID of the waiter making the request, if known
        dojoRequestingProduct:
          type: string
          description: The dojo product making the request, if known
        deviceId:
          type: string
          description: The ID of the device making the request, if known
        deviceType:
          type: string
          description: The device making the request, if known
    Id:
      description: ''
      required:
        - id
      type: object
      properties:
        id:
          description: ''
          type: string
    JsonrpcRequestV1:
      description: ''
      required:
        - method
        - jsonrpc
        - id
      type: object
      properties:
        id:
          description: ''
          type: string
        method:
          description: ''
          type: string
        jsonrpc:
          description: ''
          type: string
    JsonrpcResponseV1:
      description: ''
      required:
        - method
        - jsonrpc
        - id
      type: object
      properties:
        id:
          description: ''
          type: string
        error:
          $ref: '#/components/schemas/EPOSError'
          description: ''
        jsonrpc:
          description: ''
          type: string
    Error:
      description: ''
      type: object
    OrderResult:
      description: ''
      required:
        - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/Order'
          description: ''
    OrderBillResult:
      description: ''
      required:
        - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/OrderBill'
          description: ''
    ExtendOrderLockJsonrpcResponseV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcResponseV1'
        - $ref: '#/components/schemas/EmptyResult'
    RecordOrderPaymentJsonrpcResponseV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcResponseV1'
        - $ref: '#/components/schemas/OrderResult'
    OrderJsonrpcResponseV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcResponseV1'
        - $ref: '#/components/schemas/OrderResult'
    OrderBillJsonrpcResponseV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcResponseV1'
        - $ref: '#/components/schemas/OrderBillResult'
    CreateOrderWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/CreateOrderRequest'
        - $ref: '#/components/schemas/Headers'
    CreateOrderParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/CreateOrderWithHeaders'
          description: ''
    CreateOrderJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/CreateOrderParams'
    CreateOrderLockRequest:
      type: object
      required:
        - orderId
        - expiry
        - lockId
      properties:
        orderId:
          description: The EPOS order ID of the order to lock
          type: string
        lockId:
          description: The unique ID of a lock generated by Dojo. Consuming this isn't strictly required as Dojo will create at most one lock per order, but it can be useful for tracking the lifecycle of any lock.
          type: string
        expiry:
          description: |
            The lock expiry time. If this time has been reached and no UnlockOrder has been received the lock can be considered stale and released.
            This may be extended by the ExtendOrderLockRequest if registered. It is optional to consume this expiry.
            Dojo will always attempt to release or extend the lock before this expiry is reached, it exists to avoid stale locks if there is a full loss of communication between the EPOS and Dojo.
          type: string
          format: date-time
    LockOrderWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/CreateOrderLockRequest'
        - $ref: '#/components/schemas/Headers'
    LockOrderParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/LockOrderWithHeaders'
    LockOrderJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/LockOrderParams'
    DeleteOrderLockRequest:
      type: object
      required:
        - orderId
        - lockId
      properties:
        orderId:
          description: The EPOS order ID of the order to unlock
          type: string
        lockId:
          description: The unique ID of a lock generated by Dojo. Consuming this isn't strictly required as Dojo will create at most one lock per order, but it can be useful for tracking the lifecycle of any lock.
          type: string
    DeleteOrderLockWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/DeleteOrderLockRequest'
        - $ref: '#/components/schemas/Headers'
    DeleteOrderLockParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/DeleteOrderLockWithHeaders'
    DeleteOrderLockJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/DeleteOrderLockParams'
    ExtendOrderLockRequest:
      type: object
      required:
        - orderId
        - lockId
        - expiry
      properties:
        orderId:
          description: The EPOS order ID of the order to unlock
          type: string
        lockId:
          description: The unique ID of a lock generated by Dojo. Consuming this isn't strictly required as Dojo will create at most one lock per order, but it can be useful for tracking the lifecycle of any lock.
          type: string
        expiry:
          description: |
            The lock expiry time. If this time has been reached and no UnlockOrder has been received the lock can be considered stale and released.
            This may be extended by the ExtendOrderLockRequest if registered. It is optional to consume this expiry.
            Dojo will always attempt to release or extend the lock before this expiry is reached, it exists to avoid stale locks if there is a full loss of communication between the EPOS and Dojo.
          type: string
          format: date-time
    ExtendOrderLockWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/ExtendOrderLockRequest'
        - $ref: '#/components/schemas/Headers'
    ExtendOrderLockParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/ExtendOrderLockWithHeaders'
    ExtendOrderLockJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/ExtendOrderLockParams'
    RecordOrderPaymentRequest:
      type: object
      required:
        - paymentIntentId
        - paidAmount
        - orderId
      properties:
        paymentIntentId:
          description: The UID of the payment-intent associated with this payment
          type: string
        paidAmount:
          $ref: '#/components/schemas/Money'
          description: Indicates the paid amount of this specific payment, excluding `tipsAmount` but includes eventual service charges.
        tipsAmount:
          $ref: '#/components/schemas/Money'
          description: The tip amount added to this specific payment. It is not included in `paidAmount`.
        lockId:
          description: The unique ID of a lock generated by Dojo. Consuming this isn't strictly required as Dojo will create at most one lock per order, but it can be useful for tracking the lifecycle of any lock.
          type: string
        orderId:
          type: string
    RecordOrderPaymentWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/RecordOrderPaymentRequest'
        - $ref: '#/components/schemas/Headers'
    RecordOrderPaymentParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/RecordOrderPaymentWithHeaders'
    RecordOrderPaymentJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/RecordOrderPaymentParams'
    SearchOrdersWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/SearchOrdersRequest'
        - $ref: '#/components/schemas/Headers'
    SearchOrdersParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SearchOrdersWithHeaders'
          description: ''
    SearchOrdersJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/SearchOrdersParams'
    PagedOrdersJsonrpcResponseV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcResponseV1'
        - $ref: '#/components/schemas/PagedOrdersResult'
    PagedOrdersResult:
      description: ''
      required:
        - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/PagedOrdersResponse'
          description: ''
    GetOrdersJsonrpcRequestV1:
      description: ''
      type: object
    SearchTablesParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/SearchTablesWithHeaders'
          description: ''
    SearchTablesJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/SearchTablesParams'
    TableId:
      description: ''
      required:
        - tableId
      type: object
      properties:
        tableId:
          description: ''
          type: string
    TableIdParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/TableId'
    ListAreasParams:
      description: ''
      type: object
      properties:
        params:
          $ref: '#/components/schemas/Headers'
    ListAreasJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/ListAreasParams'
    AreasResult:
      description: ''
      required:
        - result
      type: object
      properties:
        result:
          description: ''
          type: array
          items:
            $ref: '#/components/schemas/Area'
    HandleEventJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/HandleEventParams'
    EventWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/Event'
        - $ref: '#/components/schemas/Headers'
    HandleEventParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/EventWithHeaders'
    HandleEventJsonrpcResponseV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcResponseV1'
        - $ref: '#/components/schemas/EmptyResult'
    Event:
      title: Event
      type: object
      required:
        - id
        - accountId
        - event
        - data
        - createdAt
      properties:
        id:
          type: string
        accountId:
          type: string
        event:
          type: string
          description: one of EventType
        data:
          type: object
          anyOf:
            - $ref: '#/components/schemas/PaymentIntentEvent'
        createdAt:
          type: string
          format: date-time
    EventType:
      title: EventType
      type: string
      enum:
        - payment_intent.created
        - payment_intent.status_updated
    PaymentIntentEvent:
      type: object
      required:
        - paymentIntentId
        - paymentStatus
        - captureMode
      properties:
        paymentIntentId:
          type: string
        paymentStatus:
          $ref: '#/components/schemas/PaymentIntentStatus'
        captureMode:
          $ref: '#/components/schemas/CaptureMode'
    PaymentIntentStatus:
      type: string
      enum:
        - Created
        - Authorized
        - Captured
        - Reversed
        - Refunded
        - Canceled
    CaptureMode:
      type: string
      enum:
        - Auto
        - Manual
    OrderIdWithHeaders:
      type: object
      description: ''
      allOf:
        - $ref: '#/components/schemas/OrderId'
        - $ref: '#/components/schemas/Headers'
    OrderIdParams:
      description: ''
      required:
        - params
      type: object
      properties:
        params:
          $ref: '#/components/schemas/OrderIdWithHeaders'
          description: ''
    OrderId:
      description: ''
      required:
        - orderId
      type: object
      properties:
        orderId:
          description: ''
          type: string
    GetOrderByIdJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/OrderIdParams'
    CancelOrderByIdJsonrpcRequestV1:
      type: object
      allOf:
        - $ref: '#/components/schemas/JsonrpcRequestV1'
        - $ref: '#/components/schemas/OrderIdParams'
    JsonrpcNotification:
      description: ''
      required:
        - method
        - jsonrpc
      type: object
      properties:
        method:
          description: ''
          type: string
        jsonrpc:
          description: ''
          type: string
    CreateOrderRequest:
      title: CreateOrderRequest
      description: ''
      required:
        - items
        - totalAmount
        - dojoOrderId
        - payments
        - details
      type: object
      properties:
        items:
          description: The line items purchased by the customer.
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
        note:
          description: Order note
          type: string
        customer:
          $ref: '#/components/schemas/Customer'
        discounts:
          description: List of discounts applied to the order
          type: array
          items:
            $ref: '#/components/schemas/Discount'
          x-stoplight:
            id: 8ldf6i31rv859
        totalAmount:
          oneOf:
            - $ref: '#/components/schemas/Money'
          description: The total amount of the order, after discount and taxes. Includes `serviceChargeAmount` but not `tipsAmount`.
        taxLines:
          description: Taxes applied to the order
          type: array
          items:
            $ref: '#/components/schemas/TaxLine'
        serviceChargeAmount:
          oneOf:
            - $ref: '#/components/schemas/Money'
        reference:
          description: Human readable order ID
          type: string
        dojoOrderId:
          description: The Dojo API order ID
          type: string
        payments:
          description: ''
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        details:
          $ref: '#/components/schemas/OrderDetails'
        displayName:
          description: The display name of the order
          type: string
    OrderDetails:
      description: Details about the order including the type and the details.
      required:
        - orderType
      type: object
      anyOf:
        - title: Dine In
          required:
            - dineIn
        - title: Collection
          required:
            - collection
      properties:
        dineIn:
          $ref: '#/components/schemas/DineInDetails'
        collection:
          $ref: '#/components/schemas/CollectionDetails'
        orderType:
          $ref: '#/components/schemas/OrderType'
    Cursor:
      title: Cursor
      description: A cursor for use in pagination.
      type: object
      properties:
        limit:
          description: The maximum number of results to be returned in a single page.
          maximum: 100
          type: integer
          x-stoplight:
            id: l5tzcxdo5qbt1
        before:
          description: A cursor for use in pagination for the previous page. before and after are mutually exclusive. Only one of these may be used.
          type: string
          x-stoplight:
            id: 8vxj9sdmbby14
        after:
          description: A cursor for use in pagination for the next page. before and after are mutually exclusive. Only one of these may be used.
          type: string
          x-stoplight:
            id: 1jsibbqp1zdti
      x-stoplight:
        id: m8ixmhyvzw3oo
    Customer:
      title: Customer
      type: object
      properties:
        id:
          description: The unique identifier of the customer.
          type: string
        emailAddress:
          description: The customer's email address.
          maxLength: 254
          type: string
        phoneNumber:
          description: The customer's phone number.
          maxLength: 50
          type: string
        name:
          description: The customer's name.
          type: string
          x-stoplight:
            id: rvqovaxl33c9q
      additionalProperties: false
      example:
        emailAddress: support@dojo.com
        phoneNumber: 448000443550
    DineInDetails:
      description: Details for an order-in order
      type: object
      properties:
        tableId:
          type: string
        waiterId:
          type: string
        partyId:
          description: ''
          type: string
        reservationId:
          description: ''
          type: string
        readyAt:
          format: date-time
          description: Specify timestamp in ISO8601 UTC standard when a pre-order should be ready. Only applicable for pre-orders.
          type: string
      x-examples:
        Example 1:
          tableId: test
          waiterId: test
    SearchDineInDetails:
      description: Details to search for an order-in order
      type: object
      properties:
        tableId:
          type: string
        waiterId:
          type: string
        partyId:
          description: ''
          type: string
        reservationId:
          description: ''
          type: string
      x-examples:
        Example 1:
          tableId: test
          waiterId: test
    Discount:
      description: ''
      required:
        - name
        - amountTotal
      type: object
      properties:
        name:
          description: The name that was given to the discount.
          type: string
        affectedPlu:
          description: Product plu for which the discount is applied to. Empty if discount is for the total amount
          type: string
        discountReference:
          description: Discount reference that uniquely identifies the discount
          type: string
        code:
          description: Discount code
          type: string
        amountTotal:
          oneOf:
            - $ref: '#/components/schemas/Money'
        amountPercentage:
          description: Percentage covered by the discount, which is stored with precision 2 (e.g., 25.1% ➜ 2510)
          type: integer
      example:
        isPercentage: true
        provider: Order & Pay app
        name: Spring Sale 25% off
        discountCode: SPRING2023
        discountReference: '123456'
        affectedPlu: item_123
        value: 2500
        amount: 500
      x-examples:
        Example 1:
          type: Percentage
          provider: provider
          name: Spring Sale
          channelDiscountCode: SPRING2023
          referenceId: 123456
          value: 1000
          amount: 500
    Modifier:
      title: Modifier
      required:
        - amountPerModifier
        - name
        - plu
        - quantity
      type: object
      properties:
        name:
          description: A human-readable name of the modifier.
          type: string
          x-stoplight:
            id: dbij8ceea0jui
        quantity:
          description: How many times this modifier is applied to the item. Please note that this amount is per single item, so if a customer orders two burgers each with double extra cheese, the quantity should be 2, not 4.
          type: integer
          x-stoplight:
            id: 0o2r5334l8vue
        amountPerModifier:
          description: The price of the single modifier.
          oneOf:
            - $ref: '#/components/schemas/Money'
          x-stoplight:
            id: 099x7cwdud7gp
        plu:
          description: ''
          type: string
      x-stoplight:
        id: a8zdtsiz5l6a8
    Money:
      title: Money
      required:
        - value
        - currencyCode
      type: object
      properties:
        value:
          format: int64
          description: The amount in the minor unit, for example '100' for 1.00 GBP.
          type: integer
        currencyCode:
          description: Three-letter currency code in ISO 4217 alpha-3 format.
          maxLength: 10
          minLength: 1
          type: string
      example:
        value: 1000
        currencyCode: GBP
      x-stoplight:
        id: c9op7zec1txu2
    Order:
      title: Order
      required:
        - status
        - details
      type: object
      properties:
        id:
          description: Order ID
          type: string
        items:
          description: The line items purchased by the customer.
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
        note:
          type: string
          x-stoplight:
            id: zya8zg3nxml7g
        customer:
          $ref: '#/components/schemas/Customer'
        discounts:
          description: List of discounts applied to the order
          type: array
          items:
            $ref: '#/components/schemas/Discount'
          x-stoplight:
            id: 8ldf6i31rv859
        taxLines:
          description: Taxes applied to the order
          type: array
          items:
            $ref: '#/components/schemas/TaxLine'
          x-stoplight:
            id: xsg3y0lftsyhl
        status:
          $ref: '#/components/schemas/OrderStatus'
          description: Order status
          default: New
          x-stoplight:
            id: hssxgnvst3s5l
        createdAt:
          format: date-time
          description: The creation date, in ISO 8601 UTC format.
          type: string
          x-stoplight:
            id: xu24ufyqm895l
        updatedAt:
          format: date-time
          description: The timestamp of the update date, in ISO 8601 UTC format.
          type: string
          x-stoplight:
            id: 9hvb1r8h1wgdq
        totalAmount:
          oneOf:
            - $ref: '#/components/schemas/Money'
          description: The total amount of the order, after discount and taxes. Includes `serviceChargeAmount` but not `tipsAmount`.
        payments:
          description: ''
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        payable:
          description: Flag to indicate if the order is able to be paid for.
          type: boolean
        paidAmount:
          oneOf:
            - $ref: '#/components/schemas/Money'
          description: |-
            Indicates the sum of all the payments made for the order, excluding `tipsAmount`.
            When this matches `totalAmount` the order is considered fully paid."
        serviceChargeAmount:
          description: The amount of service charge applied.
          oneOf:
            - $ref: '#/components/schemas/Money'
        reference:
          description: Human readable order ID
          type: string
        tipsAmount:
          description: The sum of all the `tipsAmount` in the payments array. This must not be included in `totalAmount` or `paidAmount`
          oneOf:
            - $ref: '#/components/schemas/Money'
        details:
          $ref: '#/components/schemas/OrderDetails'
        displayName:
          description: The display name of the order
          type: string
      x-stoplight:
        id: 2w4jh88mce9tz
      x-examples:
        - {}
      example:
        order:
          id: ord_12345678
          details:
            orderType: DineIn
            dineIn:
              tableId: Table 5
              waiterId: Becky
          items:
            - quantity: 2
              name: Pizza Pepperoni
              plu: '1234'
              amountPerItem:
                value: 1235
                currencyCode: GBP
            - quantity: 2
              name: Lager
              plu: '1245'
              amountPerItem:
                value: 510
                currencyCode: GBP
            - quantity: 1
              name: Water Still
              plu: '1'
              amountPerItem:
                value: 50
                currencyCode: GBP
            - quantity: 2
              name: Coca Cola
              plu: '2'
              amountPerItem:
                value: 249
                currencyCode: GBP
            - quantity: 1
              name: Burger
              plu: '234'
              amountPerItem:
                value: 1090
                currencyCode: GBP
              modifiers:
                - name: No Lettuce
                  quantity: 1
                  amountPerItem:
                    value: 0
                    currencyCode: GBP
                  plu: '74983'
            - quantity: 1
              name: Burger
              plu: '234'
              amountPerItem:
                value: 1090
                currencyCode: GBP
              modifiers:
                - name: Extra Cheese
                  quantity: 1
                  amountPerItem:
                    value: 0
                    currencyCode: GBP
                  plu: '10987'
                - name: Bacon
                  quantity: 1
                  amountPerItem:
                    value: 0
                    currencyCode: GBP
                  plu: '872'
          discounts:
            - name: 10% discount
              amountTotal:
                value: 621
                currencyCode: GBP
              amountPercentage: 1000
          serviceChargeAmount:
            value: 6295
            currencyCode: GBP
          taxLines:
            - id: VAT
              name: VAT
              amountPercentage: 20
              amountTotal:
                value: 6295
                currencyCode: GBP
          status: Created
          createdAt: '2022-03-15T20:00:00Z'
          updatedAt: '2022-03-15T20:00:00Z'
          totalAmount:
            value: 6295
            currencyCode: GBP
          payable: true
          paidAmount:
            value: 0
            currencyCode: GBP
          reference: Table 5
    OrderBill:
      required:
        - header
        - order
        - footer
      type: object
      properties:
        header:
          description: Header
          type: object
          $ref: '#/components/schemas/BillSection'
        order:
          description: Order
          type: object
          $ref: '#/components/schemas/Order'
        footer:
          description: Footer
          type: object
          $ref: '#/components/schemas/BillSection'
      example:
        header:
          lines:
            - logo:
                svgImage: |
                  <svg viewBox='0 0 389 100' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M146.7 100C119.754 100 97.8318 77.5807 97.8318 50.0245C97.8318 22.4682 119.754 0.0489248 146.7 0.0489248C173.645 0.0489248 195.568 22.4682 195.568 50.0245C195.568 77.5807 173.645 100 146.7 100ZM146.616 17.6737C129.155 17.6737 114.946 32.204 114.946 50.0612C114.946 67.9183 129.155 82.4486 146.616 82.4486C164.078 82.4486 178.286 67.9183 178.286 50.0612C178.286 32.204 164.078 17.6737 146.616 17.6737ZM339.182 100C312.237 100 290.314 77.5807 290.314 50.0245C290.314 22.4682 312.237 0.0489248 339.182 0.0489248C366.128 0.0489248 388.05 22.4682 388.05 50.0245C388.05 77.5807 366.128 100 339.182 100ZM339.098 17.6737C321.637 17.6737 307.429 32.204 307.429 50.0612C307.429 67.9183 321.637 82.4486 339.098 82.4486C356.56 82.4486 370.768 67.9183 370.768 50.0612C370.768 32.204 356.56 17.6737 339.098 17.6737ZM17.5212 100C7.85764 100 0 91.9643 0 82.0817V17.9795C0 8.09687 7.85764 0.0489248 17.5212 0.0489248H38.2716C65.2172 0.0489248 87.1397 22.4682 87.1397 50.0245C87.1397 77.5807 65.2172 100 38.2716 100H17.5212ZM17.4136 17.6676C17.4136 17.6709 17.4108 17.6737 17.4075 17.6738C17.2907 17.677 17.1983 17.7736 17.1983 17.8938V82.2285C17.1983 82.3508 17.294 82.4486 17.4136 82.4486H37.853C55.3742 82.4486 69.7739 68.0651 69.9414 50.3792C70.0251 41.683 66.7601 33.476 60.7682 27.275C54.7643 21.0739 46.7751 17.6615 38.2716 17.6615H17.4197C17.4163 17.6615 17.4136 17.6642 17.4136 17.6676V17.6676ZM242.917 100C252.688 100 261.885 96.0983 268.822 89.0166C275.747 81.9349 279.562 72.5171 279.562 62.5245L279.61 2.66634C279.61 1.19863 278.438 0 277.003 0H264.995C263.56 0 262.388 1.19863 262.388 2.66634L

# --- truncated at 32 KB (81 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/dojo/refs/heads/main/asyncapi/dojo-epos-data-asyncapi.yml