Joining a table

To get access to the information on a bill in real-time, you'll use the following endpoint

// GET to https://api.flypaythis.com/v2/bill/join/tableNumber`
with the following url parameters:
* locationId (the Flyt location id)
* tableCode (the table number)

which will respond synchronously back with the latest known Bill object for that table.

A couple of important things to note:

  • At the moment, this operation is done live and synchronously to the POS, which depending on availability might take between 5 and 20 seconds to execute.
  • Also you can rely on BillId being kept the same between sessions. A session starts the moment a table is opened by either a waiter or an API call - and ends when all payments have been made to cover (or exceed) the total amount in the Bill
  • Flyt will auto-update the bill on the background every few minutes, and you can get whatever the latest data is by calling /v2/bill/{billId}

The response to joining a table is below

{
    "bill": {
        "billId": 5102142,
        "table": {
            "tableId": 27339,
            "tableCode": "10",
            "location": { ... }
        },
        "billStatusId": 2,
        "isOpen": true,
        "total": 15.97,
        "outstanding": 5.97,
        "tips": 0,
        "serviceCharge": 1.77,
        "outstandingServiceCharge": 0.66,
        "servicePaidAsTip": 0,
        "discount": 0,
        "outstandingDiscount": 0,
        "created": 1525889959,
        "vat": 2.37,
        "items": [
            {
                "itemId": 8875095,
                "active": true,
                "price": 1,
                "priceSold": 1,
                "priceSoldIncludingModifiers": 1,
                "menuItem": {
                    "itemId": 1216672,
                    "name": "Test Starter",
                    "description": "",
                    "created": 0,
                    "posMenuId": "",
                    "active": true,
                    "modifier": 0,
                    "category": {
                        "categoryId": 943,
                        "name": "Starters",
                        "items": [],
                        "availability": {
                            "regular": {
                                "monday": [],
                                "tuesday": [],
                                "wednesday": [],
                                "thursday": [],
                                "friday": [],
                                "saturday": [],
                                "sunday": []
                            },
                            "special": {}
                        }
                    },
                    "prices": [
                        {
                            "name": "default",
                            "price": 1
                        }
                    ],
                    "featured": false,
                    "featureImages": [],
                    "stockLevel": 1,
                    "vatable": true
                },
                "checkNumber": "104706",
                "voided": false,
                "splitValue": {
                    "serviceCharge": 0.13,
                    "price": 1.13,
                    "discount": 0
                }
            },
            {
                "itemId": 8875096,
                "active": true,
                "price": 1,
                "priceSold": 1,
                "priceSoldIncludingModifiers": 1,
                "menuItem": {
                    "itemId": 1216672,
                    "name": "Test Starter",
                    "description": "",
                    "created": 0,
                    "posMenuId": "",
                    "active": true,
                    "modifier": 0,
                    "category": {
                        "categoryId": 943,
                        "name": "Starters",
                        "items": [],
                        "availability": {
                            "regular": {
                                "monday": [],
                                "tuesday": [],
                                "wednesday": [],
                                "thursday": [],
                                "friday": [],
                                "saturday": [],
                                "sunday": []
                            },
                            "special": {}
                        }
                    },
                    "prices": [
                        {
                            "name": "default",
                            "price": 1
                        }
                    ],
                    "featured": false,
                    "featureImages": [],
                    "stockLevel": 1,
                    "vatable": true
                },
                "checkNumber": "104706",
                "voided": false,
                "splitValue": {
                    "serviceCharge": 0.13,
                    "price": 1.13,
                    "discount": 0
                }
            },
            {
                "itemId": 8875097,
                "active": true,
                "price": 1.1,
                "priceSold": 1.1,
                "priceSoldIncludingModifiers": 1.1,
                "menuItem": {
                    "itemId": 1273308,
                    "name": "Cheese Nachos",
                    "description": "",
                    "created": 0,
                    "posMenuId": "",
                    "active": true,
                    "modifier": 0,
                    "category": {
                        "categoryId": 943,
                        "name": "Starters",
                        "items": [],
                        "availability": {
                            "regular": {
                                "monday": [],
                                "tuesday": [],
                                "wednesday": [],
                                "thursday": [],
                                "friday": [],
                                "saturday": [],
                                "sunday": []
                            },
                            "special": {}
                        }
                    },
                    "prices": [
                        {
                            "name": "default",
                            "price": 1.1
                        }
                    ],
                    "featured": false,
                    "featureImages": [],
                    "stockLevel": 1,
                    "vatable": true
                },
                "checkNumber": "104706",
                "voided": false,
                "splitValue": {
                    "serviceCharge": 0.14,
                    "price": 1.24,
                    "discount": 0
                }
            },
            {
                "itemId": 8875098,
                "active": true,
                "price": 1.1,
                "priceSold": 1.1,
                "priceSoldIncludingModifiers": 1.1,
                "menuItem": {
                    "itemId": 1273308,
                    "name": "Cheese Nachos",
                    "description": "",
                    "created": 0,
                    "posMenuId": "",
                    "active": true,
                    "modifier": 0,
                    "category": {
                        "categoryId": 943,
                        "name": "Starters",
                        "items": [],
                        "availability": {
                            "regular": {
                                "monday": [],
                                "tuesday": [],
                                "wednesday": [],
                                "thursday": [],
                                "friday": [],
                                "saturday": [],
                                "sunday": []
                            },
                            "special": {}
                        }
                    },
                    "prices": [
                        {
                            "name": "default",
                            "price": 1.1
                        }
                    ],
                    "featured": false,
                    "featureImages": [],
                    "stockLevel": 1,
                    "vatable": true
                },
                "checkNumber": "104706",
                "voided": false,
                "splitValue": {
                    "serviceCharge": 0.14,
                    "price": 1.24,
                    "discount": 0
                }
            },
            {
                "itemId": 8875099,
                "active": true,
                "price": 5,
                "priceSold": 5,
                "priceSoldIncludingModifiers": 5,
                "menuItem": {
                    "itemId": 1216673,
                    "name": "Test Main",
                    "description": "",
                    "created": 0,
                    "posMenuId": "",
                    "active": true,
                    "modifier": 0,
                    "category": {
                        "categoryId": 944,
                        "name": "Mains",
                        "items": [],
                        "availability": {
                            "regular": {
                                "monday": [],
                                "tuesday": [],
                                "wednesday": [],
                                "thursday": [],
                                "friday": [],
                                "saturday": [],
                                "sunday": []
                            },
                            "special": {}
                        }
                    },
                    "prices": [
                        {
                            "name": "default",
                            "price": 5
                        }
                    ],
                    "featured": false,
                    "featureImages": [],
                    "stockLevel": 1,
                    "vatable": true
                },
                "checkNumber": "104706",
                "voided": false,
                "splitValue": {
                    "serviceCharge": 0.63,
                    "price": 5.63,
                    "discount": 0
                }
            },
            {
                "itemId": 8875100,
                "active": true,
                "price": 5,
                "priceSold": 5,
                "priceSoldIncludingModifiers": 5,
                "menuItem": {
                    "itemId": 1216673,
                    "name": "Test Main",
                    "description": "",
                    "created": 0,
                    "posMenuId": "",
                    "active": true,
                    "modifier": 0,
                    "category": {
                        "categoryId": 944,
                        "name": "Mains",
                        "items": [],
                        "availability": {
                            "regular": {
                                "monday": [],
                                "tuesday": [],
                                "wednesday": [],
                                "thursday": [],
                                "friday": [],
                                "saturday": [],
                                "sunday": []
                            },
                            "special": {}
                        }
                    },
                    "prices": [
                        {
                            "name": "default",
                            "price": 5
                        }
                    ],
                    "featured": false,
                    "featureImages": [],
                    "stockLevel": 1,
                    "vatable": true
                },
                "checkNumber": "104706",
                "voided": false,
                "splitValue": {
                    "serviceCharge": 0.63,
                    "price": "5.60",
                    "discount": 0
                }
            }
        ],
        "checkNumbers": [
            "104706"
        ],
        "guests": 1,
        "confirmedGuests": 0,
        "flytPaymentsTip": 0,
        "flytPaymentsTotalExcludingTip": 0,
        "payments": [],
        "splitType": "unsplit",
        "allowedSplitType": {
            "items": true,
            "equal": true
        },
        "orderNumber": null,
        "users": [],
        "billType": "PayAtTable",
        "loyaltyCards": [],
        "vouchers": [],
        "nonFlytPayments": [],
        "nonFlytPaymentsTotalExcludingTip": 0,
        "nonFlytPaymentsTip": 0
    },
    "pusher": {
        "channel": "bill-5102142",
        "type": "public"
    },
    "realtimeToken": null,
    "requestInfo": {
        "accessTokenStatus": "anonymous",
        "serverTime": 1525889978,
        "requestId": null,
        "apiVersion": 2
    }
}