To create a booking
This api is used to create a booking. Create booking by sending a POST request to the endpoint below.
POST /book-now

Request Body:

{
    "place_id": "PL000000",
    "checkin_date: "2025-10-01",
    "charge_type": "hours",
    "charge": "400",
    "checkin_time": "10:00",
    "duration": "2",
    "day_frequency": "first-half",
    "guest_count": "2",
    "guests": [
        {
            "first_name": "John",
            "last_name": "Doe",
            "email": "johndoe@yopmail.com"
        }
    ],
    "first_name": "Alice",
    "last_name": "Smith",
    "email": "alicesmith@yopmail.com",
    "dialcode": "+91",
    "mobile": "1234567890"
}

Response:

{
    "success": true,
    "data": {
        "payment_ref_key": "i6x35d18.....",
        "amount_label": "Room charges",
        "amount": 400,
        "discount": 20,
        "final_amount": 380,
        "card_processing_charges": 6.2,
        "guest_count": "2",
        "capture": "automatic"
    },
    "message": "Booking saved successfully. Proceed to payment.."
}

Description:

Field Name Description
api_key* Api key provided by admin
company_id* Company ID provided by admin
place_id* Unique Place Id for which booking will be created (string)
charge_type* Charge type - hours, 3-5 hours, 5-8 hours, 8+ hours, half day, full day, daily, weekly, monthly
charge* Charge amount (number)
checkin_date* Date of booking in future - Y-m-d
checkin_time Time for checkin
duration Duration of booking in hours
day_frequency Frequency of day in case of co-working place - first-half, second-half
guests_count Number of guests in case of day-office place
guests Guests details in case of day-office place - first_name, last_name, email
first_name* First name of person who is booking
last_name* Last name of person who is booking
email* Email address of person who is booking
dialcode* Dial code of mobile number
mobile* Mobile number

Some important instructions:

  • All fields marked with * are mandatory.
  • Ensure the date format for checkin_date is Y-m-d.
  • The api_key and company_id should be included in the request headers for authentication.
  • The charge_type should match one of the predefined types supported by the system i.e hours, 3-5 hours, 5-8 hours, 8+ hours, half day, full day, daily, weekly, monthly.
  • The checkin_date must be a future date.
  • The duration and checkin_time fields are required only if charge_type is - hours, 3-5 hours, 5-8 hours, 8+ hours.
  • The day_frequency field is required only if charge_type is - half day or full day.
  • The guests_count and guests fields are required only for day-office bookings.
  • The guests array should contain objects with first_name, last_name, and email for each guest.