Menuflow Go API Docs
  • Welcome
  • Rest API
    • Overview
    • Authentication
  • API REFERENCE
    • Menus
    • Orders
    • Payments
    • Printer
    • Tables
    • Terminals
    • Staff
  • POSTMAN
    • Download Collection
Powered by GitBook
  1. API REFERENCE

Tables

Working with tables in Menuflow

Tables define the number of seats, and type of seating, and a table is linked to all orders. A table_id is required to create a new order and request order details. A table can have two states: open (in-use) or available (not in-use). The factor that determines if a table is in use is the balance being greater than zero. It is essential that applications close the specific table after full payment is received. The following API calls allow you to manage tables on the Menuflow platform.


Get Tables

Call to retrieve a list of all tables at a specific location regardless of status

List Request

GET https://api.menuflow.dev/go/table/{location_id}

curl --location 'https://api.menuflow.dev/go/table/{location_id}' --header 'x-api-key: YOUR-API-KEY'

Path Parameters

Name
Type
Description

location_id*

integer

location_id

{
    "status": 200,
    "location_id": 1220,
    "records": 10,
    "result": [
        {
            "id": 1,
            "table_number": 1,
            "table_type": "Table",
            "seats": 4,
            "isOpen": 0
        },
        {
            "id": 2,
            "table_number": 2,
            "table_type": "Table",
            "seats": 6,
            "isOpen": 0
        },
        {
            "id": 3,
            "table_number": 3,
            "table_type": "Booth",
            "seats": 8,
            "isOpen": 0
        },
        {
            "id": 4,
            "table_number": 4,
            "table_type": "Booth",
            "seats": 8,
            "isOpen": 1
        },
        {
            "id": 5,
            "table_number": 5,
            "table_type": "Booth",
            "seats": 8,
            "isOpen": 0
        },
        {
            "id": 6,
            "table_number": 6,
            "table_type": "Table",
            "seats": 4,
            "isOpen": 0
        },
        {
            "id": 7,
            "table_number": 7,
            "table_type": "Table",
            "seats": 4,
            "isOpen": 0
        },
        {
            "id": 8,
            "table_number": 8,
            "table_type": "Bar",
            "seats": 2,
            "isOpen": 0
        },
        {
            "id": 9,
            "table_number": 9,
            "table_type": "Bar",
            "seats": 2,
            "isOpen": 0
        },
        {
            "id": 10,
            "table_number": 10,
            "table_type": "Table",
            "seats": 6,
            "isOpen": 0
        }
    ]
}
{
    "status_code": "404",
    "message": "no tables were found for this location"
}

Get Open Tables

Call to retrieve a list of open tables at a specific location regardless of status

List Open Tables

GET https://api.menuflow.dev/go/table/{location_id}/open

curl --location 'https://api.menuflow.dev/go/table/{location_id}/open' --header 'x-api-key: YOUR-API-KEY'

Path Parameters

Name
Type
Description

location_id*

String

location_id of tables to retrieve

{
    "status": 200,
    "location_id": "1220",
    "result": [
        {
            "table_id": 8,
            "table_number": 8,
            "table_type": "Bar",
            "seats": 2,
            "order": {
                "order_id": 34,
                "no_items": 0,
                "order_total": "0.00"
            },
            "server": {
                "staff_id": 4001,
                "server": "Pooja Kshetri"
            }
        },
        {
            "table_id": 4,
            "table_number": 4,
            "table_type": "Booth",
            "seats": 8,
            "order": {
                "order_id": 1,
                "no_items": 8,
                "order_total": "155.00"
            },
            "server": {
                "staff_id": 4002,
                "server": "Rajat Sharma"
            }
        }
    ]
}

Get Available Tables

Call to retrieve a list of available tables at a specific location regardless of status

List Available Tables

GET https://api.menuflow.dev/go/table/{location_id}/available

curl --location 'https://api.menuflow.dev/go/table/{location_id}/available' --header 'x-api-key: YOUR-API-KEY'

Path Parameters

Name
Type
Description

location_id*

String

location_id of table to retrieve

{
    "status": 200,
    "location_id": 1220,
    "records": 9,
    "result": [
        {
            "id": 1,
            "table_number": 1,
            "table_type": "Table",
            "seats": 4
        },
        {
            "id": 2,
            "table_number": 2,
            "table_type": "Table",
            "seats": 6
        },
        {
            "id": 3,
            "table_number": 3,
            "table_type": "Booth",
            "seats": 8
        },
        {
            "id": 5,
            "table_number": 5,
            "table_type": "Booth",
            "seats": 8
        },
        {
            "id": 6,
            "table_number": 6,
            "table_type": "Table",
            "seats": 4
        },
        {
            "id": 7,
            "table_number": 7,
            "table_type": "Table",
            "seats": 4
        },
        {
            "id": 8,
            "table_number": 8,
            "table_type": "Bar",
            "seats": 2
        },
        {
            "id": 9,
            "table_number": 9,
            "table_type": "Bar",
            "seats": 2
        },
        {
            "id": 10,
            "table_number": 10,
            "table_type": "Table",
            "seats": 6
        }
    ]
}

Open Table

Call to modify an available table to change the status to open and return an order_id for order management for the table.

Open Table

PUT https://api.menuflow.dev/go/table/{table_id}/open

curl

--location --request PUT'https://api.menuflow.dev/go/table/{table_id}/open' --header 'Content-Type: text/plain' --header 'x-api-key: YOUR-API-KEY' --data '{

"location_id": "1220",

"staff_id": 4001,

"allergens": 1

}'

Path Parameters

Name
Type
Description

table_id*

integer

table_id of the table to open

Request Body

Name
Type
Description

location_id*

integer

location_id where the table is located, sent as JSON

allergens*

integer

1 = yes | 0= no to define if guests have allergens

staff_id*

integer

staff_id of the server, sent as JSON

{
    "status": 201,
    "table_id": "9",
    "order_id": 33
}
{
    "status": 503,
    "message": "rejected: table is already open"
}

Close Table

Call to close an open table. Tables can only be closed if full payment has been made for the associated order_id.

Close Table

PUT https://api.menuflow.dev/go/table/{table_id}/close

curl --location --request PUT'https://api.menuflow.dev/go/table/{table_id}/close' --header 'x-api-key: YOUR-API-KEY'

Path Parameters

Name
Type
Description

table_id

integer

table_id that you wish to close

{
    "status": 201,
    "table_id": "9",
}

Add Table

Call to add a new table to a specific location.

Add Request

POST https://api.menuflow.dev/go/table/{location_id}

curl

--location 'https://api.menuflow.dev/go/table/{location_id}' --header 'Content-Type: text/plain' --header 'x-api-key: YOUR-API-KEY' --data '{

"table_number": "1",

"table_type": 3,

"seats": 12,

}'

Path Parameters

Name
Type
Description

location_id*

integer

location_id of new table

{
    "status": 201,
    "table_id": 219082109
}

Delete Table

Call to delete a specific staff member. Deleted staff members may still be shown in tipping reports.

Delete Request

DELETE https://api.menuflow.dev/go/table/{table_id}

curl

--location --request DELETE 'https://api.menuflow.dev/go/table/{table_id}' --header 'x-api-key: YOUR-API-KEY'

Path Parameters

Name
Type
Description

table_id*

integer

table_id of the table to delete

{ 
    "status": 200, 
    "table_id": 39083209, 
    "deleted": 1 
}
{
    "status_code": "404",
    "message": "table not found, deletion failed"
}

Last updated 1 year ago