Online Booking API

The Online Booking API allows third-party systems to integrate with Garage Hive's online booking feature and build their own booking experiences. It provides a structured workflow that mirrors the steps a user would normally complete in an online booking form. This API is fully built by Garage Hive and requires a  Garage Link Advanced Plus  subscription.
Using this API, an integration can create booking sessions, identify the vehicle and location, select services and add-ons, retrieve available appointment times, and confirm the booking with customer details.
For authentication overview and general setup, see  Getting Started with Garage Hive APIs .


Base URL

https://{onlinebooking_url}/api/external-booking/{instance}
Example:
https://api.example.com/api/external-booking/prod

Authentication

All endpoints require a Bearer token in the request header:
Authorization: Bearer {token}
Accept: application/json

Key Concepts

Instance

The instance identifies the booking tenant or environment. Common values include prod, dev, and demo.

Booking Session

Every booking is created and managed through a session. Each session has a unique session_id, which is returned by the Initialise Booking endpoint and must be included in all subsequent requests.

Booking Flow

The API follows a sequential workflow. Each step must be completed before moving to the next.


Endpoints

1. Initialise Booking

Creates a new booking session. This is always the first call in the booking flow.
Request
POST /api/external-booking/{instance}/init
Example
POST /api/external-booking/prod/init
Response
{
"status": "success",
"booking": {
"session_id": "60e059079f86325cded05a63bb8e4b77",
"external_booking_provider_id": 1
},
"locations": [],
"reg_no_countries": []
}
Field
Description
session_id
Unique booking session identifier — include in all subsequent requests
locations
Available booking locations
reg_no_countries
Supported vehicle registration countries


2. Set Vehicle Information

Associates a vehicle and location with the booking session.
Request
POST /api/external-booking/{instance}/{session_id}/set-vehicle-info
Body
{
"registration_no": "14VW",
"reg_no_country": "GB",
"location_id": 399
}
Field
Description
registration_no
Vehicle registration number
reg_no_country
Country code for the registration (e.g. GB, IE)
location_id
Booking location ID (returned by the Initialise Booking endpoint)


3. List Services

Returns the services available for the current booking session based on the selected vehicle and location.
Request
GET /api/external-booking/{instance}/{session_id}/list-services
Response
{
"services": []
}
Each service object includes identifiers required when selecting services in the next step.


4. Set Services

Adds the selected services to the booking.
Request
POST /api/external-booking/{instance}/{session_id}/set-services
Body
{
"servicePriceIDs": [87, 88, 90]
}
Field
Description
servicePriceIDs
Array of service price identifiers (returned by List Services)


5. List Additional Services

Returns optional add-on services that can be included with the booking.
Request
GET /api/external-booking/{instance}/{session_id}/list-additional-services
Response
{
"status": "success",
"additional_services": []
}


6. Add Additional Service

Adds an optional add-on service to the booking.
Request
POST /api/external-booking/{instance}/{session_id}/set-additional-services
Body
{
"addServicePriceID": 93
}


7. Remove Service

Removes a previously added service from the booking. Uses the same endpoint as Add Additional Service.
Request
POST /api/external-booking/{instance}/{session_id}/set-additional-services
Body
{
"removeServicePriceID": 93
}


8. List Available Timeslots

Returns the available appointment times for the configured booking.
Request
GET /api/external-booking/{instance}/{session_id}/list-timeslots
Response
{
"status": "success",
"timeslots": [
{
"start_time": "08:30",
"end_time": "09:00",
"is_available": true
}
]
}


9. Set Timeslot

Reserves a specific timeslot for the booking.
Request
POST /api/external-booking/{instance}/{session_id}/set-timeslot
Body
{
"bookingDate": "2025-09-02",
"bookingTime": "08:30"
}
Field
Description
bookingDate
Appointment date in YYYY-MM-DD format
bookingTime
Appointment time in HH:mm format


10. Set Contact Information

The final step in the booking process. Submits the customer's contact details and completes the booking.
Request
POST /api/external-booking/{instance}/{session_id}/set-contact-info
Body
{
"contact_name": "John",
"contact_last_name": "Doe",
"contact_email": "john@example.com",
"contact_number": "0123456789",
"contact_address": "Some address",
"contact_city": "Nottingham",
"contact_postcode": "NG1 1AA"
}


Error Handling

When a request fails, the API returns an error response in the following format:
{
"status": "error",
"message": "Booking not found"
}
Common causes of errors include:
  • Invalid or expired session_id
  • Invalid service identifiers
  • Missing required parameters in the request body
  • Calling endpoints out of sequence
Tip: Always check the status field in each response. If the value is "error", read the message field for details on what went wrong.




See Also




Globe with Meridians English (UK, IE, IM and IZ). To find documentation in other regions where Garage Hive operates, click  here.