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.

Listing Items

The REST API enables you to list items you've configured in your Bookingbug platform. These items are visible to your end-users, enabling them to select from the various services you provide as a business.

Example

Assume you're a owner of a Pet store offering in-store serivces that can be booked online.

Services Duration Location Staff Price
Nutrition Consultation 45 mins Consultation rooms 1 & 2 only Barry and Kate can provide this service FREE
Pet Grooming 1 hour Consultation room 2 Luke and Ed £20
Microchipping 30 mins Consultation room 1 Barry £15
Medical Consultation 45 mins Consultation room 3 Everyone £30

Staff

You can list the staff (people) members configured for a company. These are people who will carry out the services.

GET /api/v1/{company_id}/people
GET /api/v1/{company_id}/people/{people_id}
curl -X GET -H "App-Id: {app-id}" -H "App-Key: {app-key}" -H "Content-Type: application/json" 
  -H "Cache-Control: no-cache"
"https://{host}.bookingbug.com/api/v1/{company_id}/people"
{
  "_embedded": {
    "people": [
      {
        "id": 30465,
        "name": "Luke",
        "description": "",
        "type": "person",
        "deleted": false,
        "disabled": false,
        "company_id": 50579,
        "order": 30465,
        "phone_prefix": "44",
        "_links": {
          "self": {
            "href": "https://uk.bookingbug.com/api/v1/50579/people/30465"
          },
          "items": {
            "href": "https://uk.bookingbug.com/api/v1/50579/items?person_id=30465"
          },
          "enabled_services": [
            {
              "title": "Pet Grooming",
              "href": "https://uk.bookingbug.com/api/v1/50579/services/104387"
            },
            {
              "title": "Medical Consultation",
              "href": "https://uk.bookingbug.com/api/v1/50579/services/104514"
            }
          ]
        }
      },
      ...
      ]
      ...
      }

Service

You can list the services configured for a company. As per our exampple above there are four services setup that the pet store provides.

GET /api/v1/{company_id}/services
GET /api/v1/{company_id}/services/{service_id}
curl -X GET -H "App-Id: {app-id}" -H "App-Key: {app-key}" -H "Content-Type: application/json" 
  -H "Cache-Control: no-cache"
"https://{host}.bookingbug.com/api/v1/{company_id}/services"
{
  "total_entries": 4,
  "_embedded": {
    "services": [
      {
        "id": 104513,
        "name": "Microchipping",
        "description": "Microchipping",
        "durations": [
          30
        ],
        "prices": [
          1500
        ],
        "detail_group_id": 32705,
        "extra": {},
        "booking_time_step": 30,
        "is_event_group": false,
        "type": "service",
        "deleted": false,
        "company_id": 50579,
        "min_advance_period": 0,
        "max_advance_period": 5184000,
        "min_cancel_period": 86400,
        "booking_type_public": "booking",
        "booking_type_member": "booking",
        "min_bookings": 1,
        "max_bookings": 1,
        "spaces": 1,
        "order": 104513,
        "child_level_service": false,
        "_links": {
          "self": {
            "href": "https://uk.bookingbug.com/api/v1/50579/services/104513"
          },
          "items": {
            "href": "https://uk.bookingbug.com/api/v1/50579/items?service_id=104513"
          },
          "questions": {
            "href": "https://uk.bookingbug.com/api/v1/50579/questions?detail_group_id=32705"
          },
          "days": {
            "href": "https://uk.bookingbug.com/api/v1/50579/day_data?service_id=104513{&month,week,date,edate,location,event_id,person_id,resource_id,people_ids,resource_ids,person_group_id}",
            "templated": true
          },
          "times": {
            "href": "https://uk.bookingbug.com/api/v1/50579/time_data?service_id=104513{&event_id,date,end_date,location,person_id,resource_id,duration,single,num_resources,group_id,resource_ids,time_zone,ignore_booking,person_group_id}",
            "templated": true
          },
          "book": {
            "href": "https://uk.bookingbug.com/api/v1/50579/basket/add_item?service_id=104513{&event_id,member_id,event_chain_id,product_id,attachment_id,deal_id,package_id,bulk_purchase_id}",
            "templated": true
          },
          "all_children": {
            "href": "https://uk.bookingbug.com/api/v1/50579/services/104513/all_children"
          },
          "company": {
            "href": "https://uk.bookingbug.com/api/v1/company/50579"
          }
        }
      },
      ...
      ]
      ...
      }

Resource

You can list resources configured for a company. Resources are physical bookable items such as meeting rooms, event halls, tennis courts etc.

GET /api/v1/{company_id}/resources
GET /api/v1/{company_id}/resources/{resource_id}
curl -X GET -H "App-Id: {app-id}" -H "App-Key: {app-key}" -H "Content-Type: application/json" 
  -H "Cache-Control: no-cache"
"https://{host}.bookingbug.com/api/v1/{company_id}/services"
{
  "total_entries": 2,
  "_embedded": {
    "resources": [
      {
        "id": 42987,
        "name": "Consultation Room 2",
        "description": "Consultation Room 2",
        "type": "resource",
        "deleted": false,
        "disabled": false,
        "company_id": 50579,
        "order": 42987,
        "address_id": 52328,
        "_links": {
          "self": {
            "href": "https://uk.bookingbug.com/api/v1/50579/resources/42987"
          },
          "items": {
            "href": "https://uk.bookingbug.com/api/v1/50579/items?resource_id=42987"
          },
          "address": {
            "href": "https://uk.bookingbug.com/api/v1/50579/addresses/52328"
          }
        }
      },
      ...
      ]
      ...
      }

Client

You can list the clients (customers) registered against your company. Listing all clients requires admin permission.

GET /api/v1/admin/{company_id}/client
GET /api/v1/admin/{company_id}/client/{client_id}
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}/client"
{
  "total_entries": 33,
  "_embedded": {
    "clients": [
      {
        "first_name": "Jamie",
        "last_name": "Oliver",
        "email": "j.oliver@test.com",
        "country": "United Kingdom",
        "id": 2897097,
        "member_type": 1,
        "reference": "",
        "files": [],
        "answers": [],
        "deleted": false,
        "phone_prefix": "44",
        "mobile_prefix": "44",
        "default_company_id": 50666,
        "q": {},
        "_links": {
          "self": {
            "href": "https://uk.bookingbug.com/api/v1/admin/50579/client/2897097"
          },
          "bookings": {
            "href": "https://uk.bookingbug.com/api/v1/admin/50579/bookings{/id}?client_id=2897097{&start_date,end_date,page,per_page,include_cancelled,modified_since,slot_id,event_id,resource_id,service_id,person_id,filter_by_fields,order_by,order_by_reverse,start_time,end_time,locale,clinic_id}",
            "templated": true
          },
          "pre_paid_bookings": {
            "href": "https://uk.bookingbug.com/api/v1/50579/members/2897097/pre_paid_bookings{?include_invalid,event_id}",
            "templated": true
          },
          "questions": {
            "href": "https://uk.bookingbug.com/api/v1/50579/client_details"
          },
          "edit": {
            "href": "https://uk.bookingbug.com/api/v1/admin/50579/client/2897097/edit"
          }
        }
      },
      ...
      ]
      ...
      }

find by email

You can query the client end-point to find a particular customer with their email address. You must be authenticated as an administrator.

GET /api/v1/{company_id}/client/find_by_email/{email}
curl -X GET -H "App-Id: {app-id}" -H "App-Key: {app-key}" -H "Content-Type: application/json" 
  -H "Cache-Control: no-cache"
"https://{host}.bookingbug.com/api/v1/{company_id}/client/find_by_email/j.oliver@test.com"
{
  "first_name": "Jamie",
  "last_name": "Oliver",
  "email": "j.oliver@test.com",
  "country": "United Kingdom",
  "phone_prefix": "44",
  "mobile_prefix": "44",
  "id": 2897097,
  "answers": [],
  "deleted": false,
  "notifications": {},
  "client_type": "Member",
  "default_company_id": 50666,
  "reference": "",
  "_links": {
    "self": {
      "href": "https://uk.bookingbug.com/api/v1/50579/client/2897097"
    },
    "questions": {
      "href": "https://uk.bookingbug.com/api/v1/50579/client_details"
    }
  }
}