Rentals

Allows for rental features to be accessible via API

Allow rental products to be booked via API where a rental duration can be offered and selected.

To use this capability add octo/rentals to your Octo-Capabilities header.

Rental Product

GET https://api.ventrata.com/octo/products GET https://api.ventrata.com/octo/products/:id

The product schema has been updated to introduce two new fields:

product.isRental which is a boolean field indicating whether this product is a rental and therefore contains rental durations.

option.rentalDurations a list of the rental durations available for sale.

For example:

{
  //... rest of the product object
  "isRental": true,
  "options": [
    {
      //... rest of the option object
      "rentalDurations": [
        {
          "id": "1.0_day",
          "title": "1 day",
          "shortDescription": null,
          "durationAmount": 1.0,
          "durationUnit": "day"
        },
        {
          "id": "2.0_day",
          "title": "2 days",
          "shortDescription": null,
          "durationAmount": 2.0,
          "durationUnit": "day"
        },
        {
          "id": "3.0_day",
          "title": "3 days",
          "shortDescription": null,
          "durationAmount": 3.0,
          "durationUnit": "day"
        }
      ]
    }
  ]
}

In the example above we have 3 rental durations to chose from, 1, 2 and 3 days. You have the guest pick a duration in the same form they pick the option/unitItems.

The field definitions on the rentalDuration object are as follows:

Field
Description

id

The rental duration ID, you'll need this for availability and booking calls

title

The human readable title you can present to the guest to label the duration

shortDescription

Any subtitle (if any) to help describe the rental duration

durationAmount

A float indicating the duration amount

durationUnit

The duration unit for the amount above it

Rental Availability

POST https://api.ventrata.com/octo/availability/calendar POST https://api.ventrata.com/octo/availability

Fetching availability for a duration object is simple, you just need to add the rentalDurationId to the request body, for example:

{
  "productId": "1a7213eb-3a33-4cbb-b114-64d771c201ac",
  "optionId": "DEFAULT",
  "localDateStart": "2020-07-01",
  "localDateEnd": "2020-07-03",
  "rentalDurationId": "3.0_day",
  "units": [
    { "id": "unit_123abcadult", "quantity": 2 },
    { "id": "unit_321abcchild", "quantity": 1 }
  ]
}

This will check the availability for the provided duration, and return the results including pricing for that duration (if you include octo/pricing)

Rental Booking

POST https://api.ventrata.com/octo/bookings

Once you're ready to make a booking, you just need to include the rentalDurationId the request, this will make a booking with the provided duration, for example:

{
  "productId": "34639ddc-e4c6-4ba6-800c-bd2e4778e1e4",
  "optionId": "003986f6-97f4-4baa-8c54-2d09e5d0904e",
  "availabilityId": "2025-01-19",
  "unitItems": [
    {
      "unitId": "unit_faef4e3a-6ff4-454a-adf8-19c6f1957fa2"
    }
  ],
  "rentalDurationId": "3.0_day"
}

The booking object will now also include both the rentalDurationId and rentalDuration object, for example:

{
  //... rest of the booking object
  "isRental": true,
  "rentalDurationId": "3.0_day",
  "rentalDuration": {
    "id": "3.0_day",
    "title": "3 days",
    "shortDescription": null,
    "durationAmount": 3.0,
    "durationUnit": "day"
  }
}

Last updated