Skip to main content

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?

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 orderState includes the following possible values:

  • in-progress: The state of the order while items are added. This state begins when the first item is added to the order, continues for each item added to the order, and ends when the order is completed (saved) or canceled.

  • canceled: In this state, the order is removed from the digital menu board immediately.

  • saved: The state after the order is completed. This state signals Digital Menu Board to display a Thank You message and order confirmation, then return to the standard screen content.

  • paid: The state when the order is complete and the payment has been finalized.

Note

The orderState values are case-sensitive and must be sent to our system in lowercase.

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 lettuce.

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

balanceDue

number

No

The remaining balance due for the order

change

number

No

The change due from the order tender

discounts

[Discount] array

Yes

The discounts applied to the order

items

[OrderItem] array

Yes

The items included in the order

laneNumber

number

No

The drive thru lane number

orderID

string

No

The order identifier

orderTime

string

Yes

The timestamp of the order initiation

paymentUrl

PaymentUrl

No

The URL and payment provider information

payments

[Payment] array

No

The payment information for the order

orderState

string

Yes

The current state of the order. The possible values are as follows:

  • in-progress

  • paid

  • canceled

  • saved

Note

The orderState field is case-sensitive and the values must be sent to our system in lowercase.

orderEvent

string

No

The event which triggered the message. The possible values are as follows:

  • add-item

  • add-modifier

  • add-tips

  • cancel-order

  • clear-order

  • delete-item

  • delete-modifier

  • modify-order

  • order-end

  • order-start

Note

The orderEvent field is case-sensitive and the values must be sent to our system in lowercase.

subtotal

number

Yes

The subtotal amount for the order

tax

number

Yes

The total tax amount for the order

taxExclusive

number

No

The tax amount excluding tax-inclusive items

taxes

[OrderTax] array

Yes

The individual taxes applied to the order

total

number

Yes

The total amount of the order

totalDiscount

number

Yes

The total discount amount applied to the order

totalPayments

number

No

The total amount of payments applied to the order

totalTips

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

id

string|number

Yes

The product identifier

items

[OrderItem] array

No

The sub-items or modifiers associated with the order item

name

string

Yes

The product name

qualifiers

[Qualifier] array

No

The qualifiers or attributes associated with the item

quantity

number

Yes

price

number

Yes

The price of the item

discounts

[Discount] array

No

 

Qualifier Object

The Qualifier Object represents a qualifier or attribute associated with an OrderItem.

Field Name

Type

Required

Description

id

string | number

Yes

The product identifier

name

string

Yes

The product name

quantity

number

Yes

price

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

id

string | number

Yes

The product identifier

name

string

Yes

The product name

quantity

number

Yes

price

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

name

string

Yes

The name or description of the tax

amount

number

Yes

The tax amount

PaymentUrl Object

The PaymentUrl Object represents URL and payment provider information.

Field Name

Type

Required

Description

url

string

Yes

The URL for the payment provider

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

amount

number

Yes

The payment amount

name

string

Yes

The name or description of the payment

ErrorResponse Object

The ErrorResponse Object represents the Error information.

Field Name

Type

Required

Description

error

string

Yes

The error message

details

[Error] |

[ValidationError] array | any

Yes

The error details

Error Object

The Error Object represents the error name and message.

Field Name

Type

Required

Description

name

string

Yes

The error name

message

string

Yes

The error message

ValidationError Object

The ValidationError Object represents the Error details.

Field Name

Type

Required

Description

keyword

string

Yes

instancePath

string

Yes

schemaPath

string

Yes

params

object

Yes

propertyName

string

No

message

string

No

schema

string

No

parentSchema

string

No

data

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));
});