Skip to main content

Placing orders

This guide walks you through the process of adding a new order to the system, either as an online order or an order linked to a table. It covers the necessary API endpoints and best practices for each step of the ordering flow.

Product list

To re-use the existing product list information (name, price, category) from Winston in your ordering application, you can fetch the list of products from the API. Additionally the categories can be queried to build a category-based navigation in your storefront.

Entries in the product list include a category_id field that links the individual product to its category. You can use this to group products by category in your UI.

Categories are hierarchical. Categories can contain a parent_id field that links to another category. If parent_id is null, the category is a top-level category.

There are several different types of products with differing behaviors. For example, the 'option' product type is used to create product modifiers (e.g., "Extra cheese" for a pizza), while the 'menu' type is used to create product bundles (e.g., "Burger meal" that includes a burger, fries, and a drink). Make sure to check the type field of each product to understand how it should be handled in your ordering flow.

Verify (online) order

Our API supports validating an order before it is placed. This allows you to check if the products in the order are still available and if the prices are correct, ensuring a smooth checkout experience for your customers.

Available tables

Orders can be placed on a specific table or on 'noTable'. To get a list of all available tables, use the /tables endpoint. This will return an array of tables with their current status (e.g., occupied, available) and other relevant information.

Creating (online) order

An order has to either be placed on a specific table (not pre-paid) or on 'noTable' (pre-paid).

If an order is placed on 'noTable', it is required to set "paid": true in the request body. Setting "paid": true automatically creates a payment and finalizes the bill. This is ideal for online orders where the customer pays upfront.

Table status

To check the current status of a table, including any unpaid orders currently active on it, use the /tables/orders endpoint.

Pay a table

If you want to settle the outstanding bill of a table (e.g., after the customer finishes their meal), use the /tables/pay endpoint.