Get Bill Items
The GetBillItems
operation retrieves information about the bill items attached to a session from the EPOS. It is
not a full bill, because it does not include additional assets like logos and other receipt configuration.
A waiter could make a GetBillItems
request in any situation where they need to check the current bill without printing a physical receipt.
- SUB /GetBillItems
- PUB /GetBillItems
At the end of a session, when a table of customers is ready to pay for a meal, a waiter will use a Dojo card machine to subscribe to GetBillItems
and
send a request to the EPOS system:
- The Dojo system subscribes to the
GetBillItems
operation, providing the session ID and requestor information in thegetBillItemsRequest
. - If the specified session does not exist, the EPOS responds with a
SESSION_NO_SUCH_SESSION
error. - If the session exists but no bill is associated with it, the EPOS responds with a
BILL_NO_SUCH_BILL
error. - If both the session and the bill exist and match, the EPOS responds with a PUB message.
{
"jsonrpc": "2.0",
"id": "123e4567-e89b-12d3-a456-426614174000",
"method": "GetBillItems",
"params": {
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"requestorInfo": {
"requestorType": "REQUESTOR_TYPE_CARD_MACHINE",
"cardMachineRequestorInfo": {
"terminalId": "123123",
"waiterId": 1
}
}
}
}
In response to the GetBillItems
request, the EPOS processes the information and constructs a bill breakdown. The getBillItemsresponse
includes the items ordered by the customer, and their prices and quantities, expressed in ISO-4217 alpha-3 units, as well as any applicable modifiers.
{
"jsonrpc": "2.0",
"id": "123e4567-e89b-12d3-a456-426614174000",
"result": {
"billItems": {
"totalAmount": 950,
"paidAmount": 100,
"taxAmount": 190,
"currency": "GBP",
"items": [
{
"id": "123456789",
"name": "Classic Burger",
"category": [
"mains",
"burgers"
],
"quantity": 1,
"amountPerItem": 1000,
"lastOrderedAt": "2021-01-01T15:00:00.123+02:00",
"modifiers": [
{
"id": "mod-987654321",
"name": "Extra Cheddar Cheese",
"amountPerModifier": 100,
"quantity": 3
}
]
},
{
"id": "987654321",
"name": "Peroni",
"category": [
"drinks",
"beer",
"lager"
],
"quantity": 1,
"amountPerItem": 450,
"lastOrderedAt": "2021-01-01T15:00:00.123+02:00"
},
{
"id": "987654321",
"name": "Peroni",
"category": [
"drinks",
"beer",
"lager"
],
"quantity": 1,
"amountPerItem": 0,
"lastOrderedAt": "2021-01-01T15:00:00.123+02:00",
"modifiers": [
{
"id": "mod-123123",
"name": "Buy 1 get 1 free!",
"amountPerModifier": -450,
"quantity": 1
}
]
},
{
"id": "00000001",
"name": "£5 Voucher",
"category": [
"discounts",
"vouchers"
],
"quantity": 1,
"amountPerItem": -500,
"lastOrderedAt": "2021-01-01T15:00:00.123+02:00"
}
],
"sessionId": "123e4567-e89b-12d3-a456-426614174000"
}
}
}