Optional Services

2 min. readlast update: 11.28.2024

The Optional Services endpoint retrieves a list of optional services available for a specified house, based on certain search criteria. This endpoint is useful for obtaining services that guests can add to their reservation, such as linen packages, extra cleaning, playpen, baby bed, high chair, etc.

Endpoint Details

URL/bungalow/api/v1/booking/optionalServices

HTTP MethodGET

Purpose

This endpoint helps in retrieving a list of optional services offered for a particular house during a given period. It can be used to query services based on houseIdstartDate, and endDate.

Example Request

GET /bungalow/api/v1/booking/optionalServices
{
  "houseId": 12345,
  "startDate": "2024-11-27T17:24:13.869Z",
  "endDate": "2024-11-30T17:24:13.869Z"
}

Request Parameters

The ExtraServiceModel defines the parameters for the request:

  • houseId (integer, required): The unique identifier of the house. If provided, this narrows down services to those specific to the given house.
  • startDate (string, optional): The start date of the booking in ISO format (YYYY-MM-DDTHH:MM:SS.SSSZ). It helps filter services available for a specific date range.
  • endDate (string, optional): The end date of the booking in ISO format (YYYY-MM-DDTHH:MM:SS.SSSZ).

Note: Providing both startDate and endDate ensures the returned services are specific to the selected date range.

Response Model

The HouseServiceResult model defines the structure of each service result:

  • id (integer, optional): Unique identifier of the service.
  • serviceName (string, optional): The name of the optional service.
  • cost (number, optional): The cost of the service.
  • costType (string, optional): Specifies the pricing model of the service. Possible values include:
    • PER_STAY: Cost is applied per stay.
    • PER_PERSON_PER_NIGHT: Cost is applied per person per night.
    • PER_NIGHT: Cost is applied per night.
    • PER_PERSON: Cost is applied per person.
    • PER_PIECE: Cost is applied per individual item.
  • groupName (string, optional): The category or group the service belongs to (e.g., “Cleaning,” “Linen”).
  • keyword (string, optional): A unique keyword identifying the service.
  • hasDatePicker (boolean, optional): Indicates if the service requires date selection, such as scheduling a cleaning service for a specific day.

Example Response

{
  "id": 101,
  "serviceName": "Extra Linen Package",
  "cost": 20.00,
  "costType": "PER_STAY",
  "groupName": "Linen",
  "keyword": "extra_linen",
  "hasDatePicker": false
}
 

Usage Example

The Optional Services endpoint is helpful for enhancing guest experiences by allowing them to see and choose additional services. For example, if a guest selects a specific house and reservation dates, the endpoint will provide a list of available services, allowing them to add these amenities directly to their booking.

Was this article helpful?