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
Operations
Operations
Operations

Request

Cancels a specific booking by its Booking Id.

Query
booking_idinteger(Booking Id)required

Booking Id needed for the cancel request. Type: Integer, Example: 7579.

Headers
authorizationstring(Authorization)required

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

curl -i -X DELETE \
  'https://api-docs.bookforwork.com/api/v1/cancel?booking_id=0' \
  -H 'authorization: API-Key=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0,Signature=d8e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3,Timestamp=1234567890'

Responses

Accepted - Request is valid but the status of the booking is not known yet

Bodyapplication/json
statusstring(Status)required

Status of the booking.

Enum"OK""NOT AVAILABLE""PRICE CHANGE""POLICY CHANGE"
messageMessage (string) or Message (null)(Message)

The booking could not be found or is already cancelled.

Any of:

The booking could not be found or is already cancelled.

string(Message)
Response
application/json
{ "status": "OK", "message": "Sorry! We couldn't find your booking with ID: 90." }

Request

Retrieves the details of a specific booking by its Booking Id.

Query
booking_idinteger(Booking Id)required

Booking Id needed for the retrieval request. Type: Integer, Example: 7579.

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/retrieve?booking_id=0' \
  -H 'authorization: API-Key=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0,Signature=d8e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3,Timestamp=1234567890'

Responses

Successful booking details retrieval list

Bodyapplication/json
booking_idinteger(Booking Id)required

Booking ID

statusstring(Status)required

Status of the booking

guest_contact_numberstring(Guest Contact Number)required

Guest contact number

emailstring(Email)required

Email of the guest

check_instring(Check In)required

Check-in Date

check_outstring(Check Out)required

Check-out Date

cancel_policyboolean(Cancel Policy)required

Whether the booking has a cancel policy

penalty_datePenalty Date (string) or Penalty Date (null)(Penalty Date)required

Penalty date for booking cancelation

Any of:

Penalty date for booking cancelation

string(Penalty Date)
priceobject(RetrievePricing)required

Pricing information

price.​total_amountstring(Total Amount)required

Total amount for the booking

price.​currencystring(Currency)required

Currency

price.​payment_statusstring(Payment Status)required

Payment Status of the booking

packageboolean(Package)required

Whether this is a package rate. Package rates must be sold together with a transport service (ex. flight, rental car, train, etc.)

created_atstring(Created At)required

Creation date

custom_fieldsCustomFieldCorrespondence (string) or Custom Fields (object)(Custom Fields)

Dynamic custom fields can be added up to 10 fields in type string. These fields can be added for reconciliation purposes and they will be added to the invoices (ex. Order Number: 37484).

Any of:

Dynamic custom fields can be added up to 10 fields in type string. These fields can be added for reconciliation purposes and they will be added to the invoices (ex. Order Number: 37484).

string(CustomFieldCorrespondence)
Enum"custom_field_1""custom_field_2""custom_field_3""custom_field_4""custom_field_5""custom_field_6""custom_field_7""custom_field_8""custom_field_9""custom_field_10"
roomsArray of objects(Rooms)

Information about the booked Room

Response
application/json
{ "booking_id": 938, "status": "CONFIRMED", "guest_contact_number": "39 56323232", "email": "francesca.mario@gmail.com", "check_in": "2025-12-24", "check_out": "2025-12-27", "cancel_policy": true, "penalty_date": "2025-12-18", "price": { "total_amount": "626.34", "currency": "USD", "payment_status": "PAID" }, "package": true, "created_at": "2025-12-15", "custom_fields": { "custom_field_1": "Value 1", "custom_field_2": "Value 2" }, "rooms": [ {} ] }