Getting all closed Bills within a date range

To have the below endpoint working, you will have to ask our team to provide you an API key.

It's possible to get all closed bills within a date range for any given location.

Retrieve bill IDs

NOTE The query parameters to and from DateTimes are in ISO 8601 format. For example: 2018-06-25T09:01:15+00:00

curl "https://api.flypaythis.com/v3/location/{locationId}/bills/closed?to=2018-06-25T09:01:15%2B00:00&from=2018-05-25T09:01:15%2B00:00" \
     -H 'X-Flypay-API-Key: apiKey'

The response:

{
  "bills": [
    {
      "billId": "219873912873",
      "status": "closed",
      "lastUpdated": "2018-06-12 12:00:00"
    },
    {
      "billId": "565125678012",
      "status": "closed",
      "lastUpdated": "2018-06-12 12:30:00"
    }
  ]
}

Retrieve bill data

Next, you call an endpoint to retrieve bill data for each bill ID in the previous response.

curl "https://api.flypaythis.com/v3/bill/{billId}?scope=bill.table,bill.items,bill.users" \
     -H 'X-Flypay-API-Key: apiKey'

The response: See API reference.

NOTE Add a scope query parameter to receive more detail in the response:

Scope Description Scope that depends on
bill.items Include in the response the list of the items for the bill
bill.payments Include in the response the payment details for the bill
bill.users Include in the response the details for the users that joined the bill
bill.table Include in the response the details for table assigned to the bill
table.location Include in the response the details for the location bill.table
bill.staff Include in the response the staff member that closed the bill