For full functionality of this site it is necessary to enable JavaScript. Here are the instructions how to enable JavaScript in your web browser.
 You are using an out of date browser, we suggest you upgrade. You may continue if you wish, but aspects of the site may not function correctly.

Slots

Slot is generally referred to a space in your business/company calendar, however in the REST API, slot end-point is used to check for a booked space. You can retrieve a list of booked slots. A range of date is required or just a single date.

Parameters

Name Type Description
company_id integer company ID
start_date string Start date to search slots from (ISO-8601 - YYYY-MM-DD), required if no single date
end_date string End date to search slots from (ISO-8601 - YYYY-MM-DD), required if no single date
date string Single date (ISO-8601 - YYYY-MM-DD), required if no start/end date
resource_id integer Optionally filter by a single resource id
service_id integer Optionally filter by a single service id
person_id integer Optionally filter by a single person id
page integer 1 (page number for to filter through pagination)
per_page integer 100 (number of results to return per page)
GET /api/v1/admin/{company_id}/slots
GET /api/v1/admin/{company_id}/slots/id

Below is a cURL example on how to retrieve slots for given date. This is an admin API call so you'll need to authenticate and provide the auth-token in the header.

curl -X GET -H "App-Id: {app-id}" -H "App-Key: {app-key}" -H "Content-Type: application/json" 
  -H "Cache-Control: no-cache" -H "Auth-Token: {auth-token}"
"https://{host}.bookingbug.com/api/v1/admin/{company_id}/slots?date=2017-02-27"
{
  "total_entries": 1,
  "_embedded": {
    "slots": [
      {
        "id": 16938544,
        "datetime": "2017-02-27T17:00:00+00:00",
        "full_describe": "Swimming lessons",
        "status": 4,
        "spaces_booked": 1,
        "spaces_reserved": 0,
        "spaces_blocked": 0,
        "num_spaces": 50,
        "spaces_wait": 0,
        "session_id": 274101,
        "service_id": 107615,
        "duration": 60,
        "_links": {
          "self": {
            "href": "https://uk.bookingbug.com/api/v1/admin/50666/slots/16938544"
          },
          "bookings": {
            "href": "https://uk.bookingbug.com/api/v1/admin/50666/bookings?slot_id=16938544"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://uk.bookingbug.com/api/v1/admin/50666/slots?date=2017-02-27&page=1&per_page=100"
    },
    "next": {
      "href": "https://uk.bookingbug.com/api/v1/admin/50666/slots?date=2017-02-27&page=0&per_page=100"
    },
    "previous": {
      "href": "https://uk.bookingbug.com/api/v1/admin/50666/slots?date=2017-02-27&page=0&per_page=100"
    }
  }
}