Skip to content

Book for Work API (1.0.0)

Welcome to Book for Work API! Before reading the documentation please make sure you read the tab Getting Started.

Authentication

All endpoints require HMAC-SHA256 signature authentication via the Authorization header:

Format: Authorization: API-Key={key},Signature={hmac_signature}, Timestamp={unix_timestamp}

Steps to generate signature:

  1. Generate the current Unix timestamp (UTC, seconds).
  2. Create the signing message by concatenating the following values in this exact order with no separators:
    {api_key}{secret}{timestamp}
  3. Generate an HMAC-SHA256 signature using the API secret as the HMAC key.
  4. Encode the signature as a hexadecimal string.
  5. Include the API key, signature, and timestamp in the Authorization header.

Requests are rejected if the timestamp differs from the server time by more than 5 minutes.

Download OpenAPI description
Overview
Languages
Servers
https://api-docs.bookforwork.com/api/v1
BFW API Production server
https://bookforwork.com
BFW API Staging server
https://staging.bookforwork.com
Operations

Request

Search for available rooms across multiple properties.

Query
checkinstring(date)(Checkin)required

Check-in date. Type: String, format: (YYYY-MM-DD)

checkoutstring(date)(Checkout)required

Check-out date. Type: String, format: (YYYY-MM-DD)

property_idArray of integers(Property Id)required

List of property IDs to check the availability for. Maximum 200 properties (IDs) per search. Type: List of integers, Example: [1011, 2402, 3813].

occupancyArray of strings(Occupancy)required

List of occupancy strings (e.g., '2', '2-9,4') for each room. Occupancy strings format is numberOfAdults-firstChildAge,nextChildAge. Example 2-9,4 -> 2 adults, 1 child 9 yo, 1 child 4 yo.

Headers
authorizationstring(Authorization)required

Authorization header with HMAC signature. Format: API-Key={key},Signature={hmac_signature},Timestamp={unix_timestamp}

curl -i -X GET \
  'https://api-docs.bookforwork.com/api/v1/properties/availability?checkin=2019-08-24&checkout=2019-08-24&property_id=0&occupancy=string' \
  -H 'authorization: API-Key=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0,Signature=d8e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3,Timestamp=1234567890'

Responses

Successful availability search

Bodyapplication/json
propertiesArray of objects(Properties)

Availability information for requested properties

warningsArray of strings(Warnings)

List of properties not found IDs

Response
application/json
{ "properties": [ { … } ], "warnings": [ "228934", "3849405", "2839404" ] }
Operations
Operations
Operations