# Rentals

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

Rentals adds duration selection for rental products and exposes rental metadata on product, option, and booking responses.

{% hint style="info" %}
Operations below use the `/octo` prefix.
{% endhint %}

## Rental Product Data

This capability extends product routes documented in [Products](/octo-core/products.md):

* `GET /products`
* `GET /products/{productId}`

### Rental Duration Object

Used by `option.rentalDurations[]` and `booking.rentalDuration`.

Base product schema: [Products](/octo-core/products.md).

{% hint style="info" %}
Always use ids returned by `option.rentalDurations[]`. Unsupported duration units return `INVALID_RENTAL_DURATION_ID`.
{% endhint %}

## Rental Availability

This capability extends availability routes documented in [Availability](/octo-core/availability.md):

* `POST /availability`
* `POST /availability/calendar`
* `POST /availability/batch`
* `POST /availability/calendar/batch`

### Request Fields Added by Rentals

Base availability schema: [Availability](/octo-core/availability.md).

{% hint style="info" %}
Rentals does not add new availability response fields. The selected duration is applied to availability and pricing calculation.
{% endhint %}

## Rental Booking

The same `rentalDurationId` request field is supported on all booking write routes that use `create_booking`:

* `POST /bookings`
* `PATCH /bookings/{uuid}`
* `POST /bookings/{uuid}/confirm`

### Request Field

Base booking schema: [Bookings](/octo-core/bookings.md#endpoints).

### Added Booking Response Fields

These are additive response fields on the base booking schema from [Bookings](/octo-core/bookings.md#endpoints).

{% hint style="info" %}
These booking fields are returned on booking write routes above and booking read/cancel/extend routes that serialize bookings (`GET /octo/bookings`, `GET /octo/bookings/:uuid`, `POST /octo/bookings/:uuid/cancel`, `POST /octo/bookings/:uuid/extend`).
{% endhint %}

## Schema Additions (JSON)

These are additive fragments showing only fields introduced by this capability.

### `AvailabilityBatchRequest`

```json
{
  "// ...rest of availability batch request object": "...",
  "rentalDurationId": "rental_duration_2h"
}
```

### `AvailabilityCalendarBatchRequest`

```json
{
  "// ...rest of availability calendar batch request object": "...",
  "rentalDurationId": "rental_duration_2h"
}
```

### `AvailabilityCalendarRequest`

```json
{
  "// ...rest of availability calendar request object": "...",
  "rentalDurationId": "rental_duration_2h"
}
```

### `AvailabilityRequest`

```json
{
  "// ...rest of availability request object": "...",
  "rentalDurationId": "rental_duration_2h"
}
```

### `Booking`

```json
{
  "// ...rest of booking object": "...",
  "rentalDurationId": "rental_duration_2h",
  "rentalDuration": {
    "id": "e7cc8bb4-8d1c-4848-8824-5dbedb718681",
    "duration": "2",
    "durationAmount": 220.0,
    "durationUnit": "HOUR",
    "title": "Summer Promotion",
    "description": "Morning departure with central pickup included."
  }
}
```

### `BookingWriteRequest`

```json
{
  "// ...rest of booking write request object": "...",
  "rentalDurationId": "rental_duration_2h"
}
```

### `Option`

```json
{
  "// ...rest of option object": "...",
  "rentalDurations": [
    {
      "id": "e7cc8bb4-8d1c-4848-8824-5dbedb718681",
      "title": "Summer Promotion",
      "duration": "2",
      "durationAmount": 220.0
    }
  ]
}
```

### `Product`

```json
{
  "// ...rest of product object": "...",
  "isRental": true
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ventrata.com/capabilities/rentals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
