openapi: 3.2.0
info:
title: EPOS Data API (REST) Orders API
version: '1.0'
description: 'REST contract that an external POS/EPOS system implements so Dojo products can
fetch and update commerce entities (Orders, Tables, Areas, Parties, Reservations)
and record payments. Use this when the EPOS exposes its own publicly reachable
HTTP endpoints; for on-premise EPOSes that cannot accept inbound HTTP, use the
[WebSocket variant](/epos-data-asyncapi/bundled.yaml) of the same contract.
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 also contain special headers within the REST headers,
containing details about the requestor that can be used for logging purposes or EPOS business logic
(such as waiter id based access to entities).
Before any of these endpoints will be invoked by Dojo, register the capabilities you implement with `PUT /epos/integrations/rest`. See the EPOS Data API guide for the full registration flow.'
servers:
- url: https://your-epos.example.com
description: 'The EPOS Data REST API has no shared base URL: each EPOS provider hosts the
endpoints on their own domain and registers them against that base via
`PUT /epos/integrations/rest`. The placeholder `https://your-epos.example.com`
is illustrative — replace with your own publicly reachable HTTPS URL.'
tags:
- name: Orders
paths:
/v1/orders:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest'
required: true
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
description: .
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
operationId: v1-post-orders
summary: Create an order
description: 'Create an order on the EPOS. Capability: `CreateOrder`
'
parameters:
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
/v1/orders/{orderId}:
parameters:
- name: orderId
description: The ID of the order to retrieve.
schema:
type: string
in: path
required: true
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
get:
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
description: OK
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
operationId: v1-get-orders-orderId
summary: Get an order by id
description: 'Retrieve details of an order using the order ID. Capability: `GetOrderById`
'
delete:
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
description: OK
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
operationId: v1-delete-orders-orderId
summary: Cancel an order by id
description: 'Cancels an order by ID. Capability: `CancelOrderById`
'
/v1/orders/search:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SearchOrdersRequest'
required: true
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PagedOrdersResponse'
description: .
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
summary: Search orders
description: 'Searches through the orders on the EPOS. Capability: `SearchOrders`
'
parameters:
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
/v1/orders/{orderId}/lock:
parameters:
- name: orderId
description: The ID of the order to lock.
schema:
type: string
in: path
required: true
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderLockRequest'
required: true
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
description: Successful response with the order in its current state.
'409':
description: Conflict, order currently cannot be locked
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
example:
errorType: Conflict
debugMessage: The order is already locked by waiter Joe at till 123
traceId: some-internal-trace-guid
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
operationId: v1-post-order-lock
summary: Lock an EPOS Order
description: 'Request a Dojo write lock on an EPOS Order, returning the latest version of the Order once locked. Capability: CreateOrderLock
'
parameters:
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
/v1/orders/{orderId}/locks/{lockId}:
parameters:
- name: orderId
description: The ID of the order to unlock.
schema:
type: string
in: path
required: true
- name: 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.
schema:
type: string
in: path
required: true
delete:
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
description: The order in the state after the lock has been released
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
operationId: v1-delete-order-lock
summary: Unlock an EPOS Order
description: 'Request to release a Dojo write lock on an EPOS Order, returning the latest version of the Order once unlocked. Capability: `DeleteOrderLock`
'
parameters:
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
put:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExtendOrderLockRequest'
required: true
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ExtendOrderLockResponse'
description: .
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
operationId: v1-put-extend-order-lock
summary: Extend an EPOS Order Lock
description: 'Request a Dojo write lock on an EPOS Order is extended, returning the latest version of the Order. Capability: `ExtendOrderLock`
'
parameters:
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
/v1/orders/{orderId}/bill:
parameters:
- name: orderId
description: The ID of the order to get the bill for.
schema:
type: string
in: path
required: true
get:
tags:
- Orders
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OrderBill'
description: Successful response with the bill for an order.
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
operationId: v1-get-orders-bill
summary: Get a printable bill
description: 'Retrieve a printable version of the Order, specifying the Header and Footer sections as it should be printed on the terminal. Capability: `GetOrderBill`'
parameters:
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
/v1/orders/{orderId}/record-payment:
parameters:
- name: orderId
description: The ID of the order to record the payment against
schema:
type: string
in: path
required: true
post:
tags:
- Orders
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentWithLockId'
required: true
responses:
'200':
description: .
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
4XX:
description: Client Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
5XX:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/EPOSError'
summary: Record Payment Request
operationId: v1-post-record-order-payment
description: '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`'
parameters:
- $ref: '#/components/parameters/WaiterId'
- $ref: '#/components/parameters/DojoRequestingProduct'
- $ref: '#/components/parameters/DeviceId'
- $ref: '#/components/parameters/DeviceType'
components:
schemas:
BillLine:
title: BillLine
anyOf:
- title: Image
required:
- image
- title: Logo
required:
- logo
- title: Merchant Address
required:
- merchantAddress
- title: Merchant Email Address
required:
- merchantEmailAddress
- title: Merchant Name
required:
- merchantName
- title: Merchant Phone Number
required:
- merchantPhoneNumber
- title: Text
required:
- text
- title: URL/QR
required:
- url
- title: Horizontal Line
required:
- horizontalLine
- title: Tax Number
required:
- taxNumber
required:
- lineType
type: object
properties:
image:
$ref: '#/components/schemas/BillImage'
logo:
$ref: '#/components/schemas/BillLogo'
merchantAddress:
$ref: '#/components/schemas/BillMerchantAddress'
merchantEmailAddress:
$ref: '#/components/schemas/BillMerchantEmailAddress'
merchantName:
$ref: '#/components/schemas/BillMerchantName'
merchantPhoneNumber:
$ref: '#/components/schemas/BillMerchantPhoneNumber'
text:
$ref: '#/components/schemas/BillText'
url:
$ref: '#/components/schemas/BillURL'
horizontalLine:
$ref: '#/components/schemas/BillHorizontalLine'
taxNumber:
$ref: '#/components/schemas/BillTaxNumber'
lineType:
$ref: '#/components/schemas/BillLineType'
BillMerchantEmailAddress:
title: BillMerchantEmailAddress
required:
- emailAddress
type: object
properties:
emailAddress:
title: emailAddress
type: string
description: The email address
description: A predefined bill field, containing the merchants contact email address. This will be pre-formatted in the bill
example:
emailAddress: dojo@dojo.tech
Payment:
description: ''
required:
- paidAmount
- paymentIntentId
type: object
properties:
paymentIntentId:
description: ''
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`.
Align:
title: Align
type: string
enum:
- Center
- Left
- Right
example:
- Center
DineInDetails:
description: Details for an order-in order
type: object
properties:
tableId:
type: string
waiterId:
type: string
partyId:
description: The ID of the party that made this order, if known.
type: string
reservationId:
description: If this order is a pre-order for a reservation, the ID of that reservation.
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
OrderItem:
required:
- name
- amountPerItem
- plu
- quantity
type: object
properties:
amountPerItem:
description: The base price of the single item, before any modifiers, subitems or discounts are applied.
$ref: '#/components/schemas/Money'
quantity:
type: integer
note:
type: string
name:
description: A human-readable name of the item.
type: string
plu:
type: string
subItems:
description: Sub-items applied to the item
type: array
items:
$ref: '#/components/schemas/OrderSubItem'
modifiers:
description: Modifiers applied to the item
type: array
items:
$ref: '#/components/schemas/Modifier'
x-examples:
Example 1:
plu: UGG-BB-PUR-06
name: test
price: 0
quantity: 1073741824
note: string
modifiers: []
subItems: []
BillTaxNumber:
title: BillTaxNumber
required:
- name
- number
type: object
properties:
name:
title: name
type: string
description: The tax name
example: VAT
number:
title: number
type: string
description: The tax number
description: A predefined bill field, containing the merchants tax number. This will be pre-formatted in the bill, and shown at the bottom
example:
name: VAT
number: '12345678'
SearchDineInDetails:
description: Details for searching order-in orders
type: object
properties:
tableId:
type: string
waiterId:
type: string
partyId:
description: The ID of the party that made this order, if known.
type: string
reservationId:
description: If this order is a pre-order for a reservation, the ID of that reservation.
type: string
x-examples:
Example 1:
tableId: test
waiterId: test
BillHorizontalLine:
title: HorizontalLineType
type: object
properties:
line:
type: string
enum:
- Single
- Double
description: A bill line containing a horizontal line
example: Single
SearchOrdersRequest:
description: ''
type: object
properties:
dineIn:
$ref: '#/components/schemas/SearchDineInDetails'
payableOnly:
description: Return only orders where payable=true
type: boolean
cursor:
$ref: '#/components/schemas/Cursor'
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. Currently this accepts `GBP` and `EUR`.
maxLength: 10
minLength: 1
type: string
example:
value: 1000
currencyCode: GBP
x-stoplight:
id: c9op7zec1txu2
BillLineType:
title: BillLineType
type: string
enum:
- Image
- Logo
- MerchantAddress
- MerchantEmailAddress
- MerchantName
- MerchantPhoneNumber
- Text
- URL
- HorizontalLine
- TaxNumber
BillMerchantName:
title: BillMerchantName
required:
- name
type: object
properties:
name:
title: name
type: string
description: A predefined bill field, containing the merchants name. This will be pre-formatted in the bill
description: A predefined bill field, containing the merchants name. This will be pre-formatted in the bill
example:
name: Dojo
BillMerchantAddress:
title: BillMerchantAddress
required:
- addressLines
- postcode
type: object
properties:
addressLines:
title: addressLines
type: array
description: Lines of address
items:
type: string
postcode:
title: postcode
type: string
description: ZIP or postal code.
description: A predefined bill field, containing an address. This will be pre-formatted in the receipt
example:
addressLines:
- Brunel Building
- 1 & 2 Canalside Walk
postcode: W2 1DG
CollectionDetails:
title: CollectionDetails
description: ''
type: object
properties:
asap:
description: A boolean indicating whether order collection is as soon as possible
type: boolean
collectAt:
format: date-time
description: Order collection timestamp in ISO8601 UTC standard. Only applicable when asap is not set or false
type: string
example:
collectionTime: '2024-02-21T14:39:21.6050276Z'
asap: false
ExtendOrderLockRequest:
type: object
description: Request an extension to the write lock on an Order.
additionalProperties: false
title: ExtendOrderLockRequest
required:
- expiry
properties:
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
Size:
title: Size
type: string
enum:
- Body
- Header1
- Header2
BillMerchantPhoneNumber:
title: BillMerchantPhoneNumber
required:
- phoneNumber
type: object
properties:
phoneNumber:
title: phoneNumber
type: string
description: The phone number
description: A predefined bill field, containing the merchants contact phone number. This will be pre-formatted in the bill
example:
phoneNumber: 01234 567890
PaymentWithLockId:
description: ''
required:
- paidAmount
- paymentIntentId
type: object
properties:
paymentIntentId:
description: ''
type: string
paidAmount:
description: Indicates the paid amount of this specific payment, excluding `tipsAmount` but includes eventual service charges.
$ref: '#/components/schemas/Money'
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
Order:
title: Order
required:
- id
- 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:
$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:
$ref: '#/components/schemas/Money'
description: Indicates the paid amount of this specific payment, excluding `tipsAmount` but includes eventual service charges.
serviceChargeAmount:
$ref: '#/components/schemas/Money'
description: The amount of service charge applied.
reference:
description: Human readable order ID
type: string
tipsAmount:
$ref: '#/components/schemas/Money'
description: The sum of all the `tipsAmount` in the payments array. This must not be included in `totalAmount` or `paidAmount`
details:
$ref: '#/components/schemas/OrderDetails'
displayName:
description: The display name of the order
type: string
x-stoplight:
id: 2w4jh88mce9tz
example:
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
BillSection:
title: BillSection
type: object
required:
- lines
properties:
lines:
type: array
items:
$ref: '#/components/schemas/BillLine'
description: An object representing either a header or footer on a BillSection
EPOSError:
title: EPOSError
type: object
required:
- errorType
properties:
debugMessage:
type: string
traceId:
type: string
errorType:
$ref: '#/components/schemas/EPOSErrorType'
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
PagedOrdersResponse:
title: PagedOrder
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Order'
readOnly: false
x-stoplight:
id: ou7je7f6bizdg
before:
type: string
x-stoplight:
id: jutkpidtbhr6q
after:
type: string
x-stoplight:
id: vwlxjfle0yxqt
x-stoplight:
id: bjkxvbo62zl42
BillLogo:
title: BillLogo
required:
- svgImage
type: object
properties:
svgImage:
title: svgImage
type: string
description: SVG representation of an image
description: A predefined bill field, containing a logo. This will appear at the top of the bill
example:
svgImage:
OrderType:
description: ''
enum:
- DineIn
- Collection
type: string
OrderDetails:
anyOf:
- title: Dine In
required:
- dineIn
- title: Collection
required:
- collection
description: Details about the order including the type and the details.
required:
- orderType
type: object
properties:
dineIn:
$ref: '#/components/schemas/DineInDetails'
collection:
$ref: '#/components/schemas/CollectionDetails'
orderType:
$ref: '#/components/schemas/OrderType'
CreateOrderRequest:
title: CreateOrderRequest
description: ''
required:
- details
- items
- totalAmount
- dojoOrderId
- payments
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:
$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:
$ref: '#/components/schemas/Money'
description: The service charge amount applied to the order. This must already be included in `totalAmount`
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
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
OrderStatus:
description: ''
enum:
- New
- Submitted
- Confirmed
- Accepted
- Preparing
- Prepared
- Ready
- Finalized
- Canceled
- Failed
type: string
BillImage:
title: BillImage
required:
- svgImage
type: object
properties:
svgImage:
title: svgImage
type: string
description: SVG representation of an image
align:
$ref: '#/components/schemas/Align'
description: A bill line containing an image
example:
svgImage:
CreateOrderLockRequest:
type: object
description: Request a write lock on an Order, guaranteeing only Dojo can write changes to the order, until receiving the corresponding UnlockOrder request.
additionalProperties: false
title: CreateOrderLockRequest
required:
- lockId
- expiry
properties:
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
OrderSubItem:
required:
- name
- amountPerItem
- plu
- quantity
type: object
properties:
amountPerItem:
description: The base price of the single sub item, without its parent item, before any modifiers or discounts are applied.
$ref: '#/components/schemas/Money'
quantity:
type: integer
note:
type: string
name:
description: A human-readable name of the item.
type: string
plu:
type: string
modifiers:
description: Modifiers applied to the subitem
type: array
items:
$ref: '#/components/schemas/Modifier'
x-examples:
Example 1:
plu: UGG-BB-PUR-06
name: test
price: 0
quantity: 1073741824
note: string
modifiers: []
subItems: []
ExtendOrderLockResponse:
type: object
description: Response for a write lock extension request
additionalProperties: false
title: ExtendOrderLockResponse
OrderBill:
title: 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: '
'
lineType: Logo
- merchantName:
name: Dojo
lineType: MerchantName
- merchantAddress:
addressLines:
- Brunel Building
- 1 & 2 Canalside Walk
postcode: London W2 1DG
lineType: MerchantAddress
- merchantEmailAddress:
emailAddress: dojo@dojo.tech
lineType: MerchantEmailAddress
- text:
value: Welcome to Our Store!
size: Header1
align: Center
emphasisBold: true
lineType: Text
- image:
svgImage:
align: Left
lineType: Image
- horizontalLine:
line: Single
lineType: HorizontalLine
- text:
value: Table 5
size: Header2
align: Left
lineType: Text
- text:
value: Becky 15/03/2022 20:08
size: Body
align: Center
lineType: Text
- text:
value: Transaction:6328
size: Body
align: Right
lineType: Text
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: Finalized
createdAt: '2022-03-15T20:00:00Z'
updatedAt: '2022-03-15T20:05:00Z'
totalAmount:
value: 6295
currencyCode: GBP
payable: true
paidAmount:
value: 0
currencyCode: GBP
reference: Table 5
footer:
lines:
- text:
value: Thank you
size: Header1
align: Center
lineType: Text
- taxNumber:
name: VAT
number: 342 6287 32
lineType: TaxNumber
- url:
url: https://www.website.com
showQR: true
showURL: true
lineType: URL
- text:
value: Thank you for your business!
size: Body
align: Center
lineType: Text
BillURL:
title: BillURL
required:
- url
type: object
properties:
url:
title: url
type: string
description: The URL for the link
description:
title: description
type: string
description: Textual description of the URL, will be displayed if set
showQr:
title: showQR
type: boolean
description: If a QR code should be shown on the bill
showUrl:
title: showURL
type: boolean
description: If the URL should be shown on the bill
description: A bill line containing a URL. This can be printed as a QR code on bills, or a hyperlink with the text as the description, in digital format.
example:
url: https://www.website.com
showQR: true
showURL: true
description: Check out our website!
EPOSErrorType:
type: string
enum:
- NotFound
- UnexpectedError
- InvalidRequest
- Conflict
TaxLine:
title: TaxLine
description: The tax line object.
required:
- amountTotal
type: object
properties:
id:
description: Unique identifier for the object.
maxLength: 60
type: string
name:
description: A name of the tax.
maxLength: 100
type: string
affectedPlu:
description: Plu of a product, if it is product specific tax
type: string
amountPercentage:
description: Tax percentage, which is stored with precision 2 (e.g., 25.1% ➜ 2510)
type: integer
amountTotal:
$ref: '#/components/schemas/Money'
additionalProperties: false
BillText:
title: BillText
required:
- size
- value
type: object
properties:
value:
title: value
type: string
description: This is the text to be printed for this line. The maxLength of this string depends on the size options used
size:
$ref: '#/components/schemas/Size'
align:
$ref: '#/components/schemas/Align'
bold:
title: bold
type: boolean
description: Set this to true if you want the text to be bold. Compatible with all other flags
description: A bill line containing text, with optional conditional formatting
example:
value: Welcome to Our Store!
size: Header1
align: Center
bold: true
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:
$ref: '#/components/schemas/Money'
description: The price of the single modifier.
plu:
description: ''
type: string
x-stoplight:
id: a8zdtsiz5l6a8
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:
$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
parameters:
DeviceType:
in: header
name: device-type
required: false
schema:
type: string
example: Dojo Terminal
description: The device making the request, if known
DojoRequestingProduct:
name: dojo-requesting-product
in: header
required: false
schema:
type: string
example: Order&Pay
description: The dojo product making the request, if known.
DeviceId:
name: device-id
in: header
required: false
schema:
type: string
example: tm_sandbox_65c5fe8a104a1222b2d8b968
description: The ID of the device making the request, if known
WaiterId:
in: header
name: waiter-id
required: false
schema:
type: string
example: '42'
description: The ID of the waiter making the request, if known