Digital Menu Board Order Data API
The Digital Menu Board Order Data API transmits order data from the point of sale (POS) to an Digital Menu Board device over a WebSocket. The WebSocket server on the Digital Menu Board device listens on port 55555.
Each request requires a complete Order Object.
Things to Know
- When the order starts, does the POS send data to Order Data API?
- When does the POS send data to Order Data API?
- When items are added to the order, what data does the POS send to Order Data API?
- What are the order states?
- Does our system calculate line item amounts for totals?
- For required number fields, will 0.00 amounts be displayed to the customer?
When the order starts, does the POS send data to Order Data API? | |
No, the POS sends data to Order Data API after the first item is added to the order. | |
When does the POS send data to Order Data API? | |
After the order has started, the POS sends data every time the order taker or customer presses a key or speaks, if voice controlled. | |
When items are added to the order, what data does the POS send to Order Data API? | |
Each time an item is added to the order, the POS sends the entire order to Order Data API. | |
What are the order states? | |
The
NoteThe | |
Does our system calculate line item amounts for totals? | |
No, our system does not make calculations with the data. Our system displays the exact numbers it receives for each field. | |
For required number fields, will 0.00 amounts be displayed to the customer? | |
No, 0.00 amounts are not displayed. For example, if lettuce is added to an order and there is no charge for the addition, the charge field is blank in the line item for |
Order Object
The Order Object represents an order placed through the POS system. This object contains information such as ordered items, discounts, taxes, and payment details.
Field Name | Type | Required | Description |
|---|---|---|---|
| number | No | The remaining balance due for the order |
| number | No | The change due from the order tender |
| [Discount] array | Yes | The discounts applied to the order |
| [OrderItem] array | Yes | The items included in the order |
| number | No | The drive thru lane number |
| string | No | The order identifier |
| string | Yes | The timestamp of the order initiation |
| No | The URL and payment provider information | |
| [Payment] array | No | The payment information for the order |
| string | Yes | The current state of the order. The possible values are as follows:
NoteThe |
| string | No | The event which triggered the message. The possible values are as follows:
NoteThe |
| number | Yes | The subtotal amount for the order |
| number | Yes | The total tax amount for the order |
| number | No | The tax amount excluding tax-inclusive items |
| [OrderTax] array | Yes | The individual taxes applied to the order |
| number | Yes | The total amount of the order |
| number | Yes | The total discount amount applied to the order |
| number | No | The total amount of payments applied to the order |
| number | No | The total tip amount indicated for the order |
OrderItem Object
The OrderItem Object represents a single item included in the order.
Field Name | Type | Required | Description |
|---|---|---|---|
| string|number | Yes | The product identifier |
| [OrderItem] array | No | The sub-items or modifiers associated with the order item |
| string | Yes | The product name |
| [Qualifier] array | No | The qualifiers or attributes associated with the item |
| number | Yes | |
| number | Yes | The price of the item |
| [Discount] array | No |
|
Qualifier Object
The Qualifier Object represents a qualifier or attribute associated with an OrderItem.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | number | Yes | The product identifier |
| string | Yes | The product name |
| number | Yes | |
| number | Yes | The price of the item |
Discount Object
The Discount Object represents a discount applied to an OrderItem or the entire Order.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | number | Yes | The product identifier |
| string | Yes | The product name |
| number | Yes | |
| number | Yes | The price of the item |
Tax Object
The Tax Object represents the individual tax applied to the Order.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The name or description of the tax |
| number | Yes | The tax amount |
PaymentUrl Object
The PaymentUrl Object represents URL and payment provider information.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The URL for the payment provider |
| string | Yes | The payment provider or service name |
Payment Object
The Payment Object represents a single payment made for the Order.
Field Name | Type | Required | Description |
|---|---|---|---|
| number | Yes | The payment amount |
| string | Yes | The name or description of the payment |
ErrorResponse Object
The ErrorResponse Object represents the Error information.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The error message |
| [Error] | [ValidationError] array | any | Yes | The error details |
Error Object
The Error Object represents the error name and message.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The error name |
| string | Yes | The error message |
ValidationError Object
The ValidationError Object represents the Error details.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | |
| string | Yes | |
| string | Yes | |
| object | Yes | |
| string | No | |
| string | No | |
| string | No | |
| string | No | |
| string | No |
Example Request
An example of an Order Data request:
const host = '192.168.0.102'; // IP address of the DMB device
const port = 55555; // Port of the OCU end point
const order = {
balanceDue: 10.0,
change: 5.0,
discounts: [
{
id: 'discount-10',
name: '10% Off',
price: 2.0,
quantity: 1,
},
],
items: [
{
id: 1,
name: 'Item 1',
price: 8.0,
quantity: 2,
},
{
id: 2,
name: 'Item 2',
price: 5.0,
quantity: 1,
},
],
orderTime: '2023-06-20T10:30:00Z',
paymentUrl: {
url: 'https://example.com/payment',
provider: 'Stripe',
},
payments: [
{
amount: 15.0,
name: 'Credit Card',
},
],
orderState: 'paid',
subtotal: 21.0,
tax: 2.0,
taxes: [
{
name: 'Sales Tax',
amount: 2.0,
},
],
total: 18.0,
totalDiscount: 2.0,
totalPayments: 15.0,
totalTips: 0,
};
const socket = new WebSocket('ws://'+ host + ':' + port);
socket.addEventListener('open', (event) => {
console.log('Connection: ws://' + host + ':' + port);
//Convert the Order object to string
const orderJson = JSON.stringify(order);
//Send the Order data over the socket
socket.send(orderJson);
});
// Server only message if error occurred
socket.addEventListener('message', (event) => {
console.error('Error from the server:', JSON.parse(event.data));
});