Get Full Bill
The card machine subscribes to the GetFullBill
operation when it is ready to print out the bill at the end of a meal. This bill includes all charges, items, taxes, and
service charges. Unlike the GetBillItems
response, the full bill also includes a range of configuration options, including text, logos, QR codes, and restaurant contact information.
API operations
- SUB /GetFullBill
- PUB /GetFullBill
- Receive a
getFullBillRequest
from Dojo. - 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": "3899e951-ce44-4233-a900-31b637705747",
"method": "GetFullBill",
"params": {
"sessionId": "6c133121-8423-48af-b9c1-ce6741f224da",
"requestorInfo": {
"requestorType": "REQUESTOR_TYPE_CARD_MACHINE",
"cardMachineRequestorInfo": {
"terminalId": "123123",
"waiterId": 1
}
}
}
}
In response to the GetFullBill
request, the EPOS publishes a comprehensive bill breakdown to the card machine. The response
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,.
Expand to see an example of a full bill JSON response body
Note that in this example, the svgImage
sample value has been abbreviated.
{
"jsonrpc": "2.0",
"id": "3899e951-ce44-4233-a900-31b637705747",
"result": {
"fullBill": {
"header": {
"receiptLines": [
{
"receiptLineType": "RECEIPT_LINE_TYPE_LOGO",
"receiptLogo": {
"svgImage": "<path d=\\\"M127.230822,29.0095321 --- Z\\\" id=\\\"Combined-Shape-Copy-87\\\"></path>\n"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_MERCHANT_NAME",
"receiptMerchantName": {
"merchantName": "Bob's Shop"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_MERCHANT_PHONE_NUMBER",
"receiptMerchantPhoneNumber": {
"phoneNumber": "01234 567890"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_MERCHANT_EMAIL_ADDRESS",
"receiptMerchantEmailAddress": {
"emailAddress": "info@bobsshop.com"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_MERCHANT_ADDRESS",
"receiptMerchantAddress": {
"addressLines": [
"1",
"High Street",
"London"
],
"postcode": "ABC 123"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_TEXT",
"receiptText": {
"value": "Here is your bill",
"size": "SIZE_HEADER_2",
"align": "ALIGN_CENTER"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_HORIZONTAL_LINE",
"receiptHorizontalLine": {
"type": "HORIZONTAL_LINE_SINGLE"
}
}
]
},
"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": "6c133121-8423-48af-b9c1-ce6741f224da"
},
"footer": {
"receiptLines": [
{
"receiptLineType": "RECEIPT_LINE_TYPE_HORIZONTAL_LINE",
"receiptHorizontalLine": {
"type": "HORIZONTAL_LINE_DOUBLE"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_TEXT",
"receiptText": {
"value": "Thanks for dining with us!",
"size": "SIZE_BODY",
"align": "ALIGN_CENTER"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_TEXT",
"receiptText": {
"value": "Scan below to enter a survey",
"size": "SIZE_BODY",
"align": "ALIGN_CENTER"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_URL",
"receiptURL": {
"description": "Voucher code!",
"showQR": true,
"url": "https://bobs-shop.com/voucher-link"
}
},
{
"receiptLineType": "RECEIPT_LINE_TYPE_VAT_NUMBER",
"receiptVATNumber": {
"vatNumber": "123456789"
}
}
]
}
}
}
}
Printing
Printing the bill on your Dojo card machine organizes the itemized bill information from your POS using preconfigured templates.
The fullBill
schema manages all the available templating options. You have the following options:
fullBill.header
: formatting for the bill headerfullBill.billItems
: the bill item datafullBill.footer
: formatting for the bill footer
You can use any number of receiptSection
options in the header and footer:
receiptHorizontalLine
: Adds either a single or double horizontal line to break up contentreceiptImage
: Adds an SVG representation of an image with alignment optionsreceiptLogo
: Adds a centre-aligned SVG representation of an imagereceiptMerchantAddress
: Adds a pre-formatted version of the full address belonging to the merchantreceiptMerchantEmailAddress
: Adds the pre-formatted email address of the merchantreceiptMerchantName
: Adds the pre-formatted name of the merchantreceiptMerchantPhoneNumber
: Adds a pre-formatted phone number belonging to the merchantreceiptText
: Includes a generic text line with customizable options. There are three available sizes:SIZE_HEADER_1
(20 characters per line),SIZE_HEADER_2
(24 characters per line), andSIZE_BODY
(28 characters per line). Additionally, you can choose the alignment, and there's an option to embolden the text if desired.receiptURL
: Adds a URL with the option to display it as a QR code along with any descriptive textreceiptVATNumber
: Adds a pre-formatted VAT number belonging to the merchant
An visual example of a full bill including each piece of preformatting is available here.