---
title: Availability Search for a Single Entry
sidebar:
  label: Single Entry
---

This page explains how to allow your users to inquire about the availability and price of a single Entry.

## Usage

Usually, you'll use this on the Entry's page, in a sidebar or a modal. To offer you the most flexibility, we've split the search and results parts into separate components. That way, you can better customize the layout to fit your needs.

So, let's say you have a cruise named "Three Islands Cruise" and you want to allow your users to book tickets. A basic example would look like this:

```antlers
<div class="max-w-md">
    <div class="my-8">
        {{ livewire:availability-search enableQuantity="true" rates="true" :entry="id" }}
    </div>
    <div class="my-8">
        {{ livewire:availability-results :entry="id" rates="true" }}
    </div>
</div>
```

Here, we have an AvailabilitySearch component with [rates](/rates) and quantity enabled. Passing `:entry="id"` lets the dropdown show this entry's rate labels. The results are displayed in a separate [AvailabilityResults](/availability-results) component, which also needs `rates="true"`.

![What the above example displays with some minimal changes](/img/resrv-availability-search-single.webp)

What the above example displays with some minimal changes

## Display availability in the calendar

When inside an entry, you may want to display the availability plan (pricing & available items) for that entry. To do this, enable the `showAvailabilityOnCalendar` parameter and pass the entry's ID, for example:

```antlers
{{ livewire:availability-search showAvailabilityOnCalendar="true" :entry="id" }}
```

Resrv takes care of the rest for you:

![The calendar with availability displayed.](/img/resrv-availability-search-with-prices.webp)

The calendar with availability displayed.

:::info
With [rates](/rates) enabled, the calendar shows availability only after the user picks a rate, because pricing and availability depend on the rate.
:::

### One rate across several entries [#one-rate-across-several-entries]

On a page about a rate rather than an entry, such as a cruise sailed by several boats, pass the rate and the entries instead of `entry`. Added in v6.7.0.

```antlers
{{ livewire:availability-search showAvailabilityOnCalendar="true" rate="full-day" :entries="boats" }}
{{ livewire:availability-rate-results rate="full-day" :entries="boats" }}
```

`rate` takes the rate's ID or its slug, and `entries` takes an Entries field, or entry IDs as an array or a comma-separated list. The calendar then shows:

| Day | Shows |
| --- | --- |
| Any entry can take the rate | The lowest price among the entries that can. |
| Every entry that has a price is taken, or the rate's **Max available** is reached | **Booked**, greyed out. |
| No entry offers the rate: no price, outside the rate's date range or booking lead time, or the rate doesn't apply to it | Greyed out and struck through, like any unavailable day. |

Only the entries in `entries` that the rate applies to and that are enabled in Resrv count. Each day's `available` count adds up their free units, up to what the rate's **Max available** still allows that day across all entries. For a rate that [takes stock from several base rates](/rates#several-base-rates-time-blocks), an entry can take the rate only on days every block has stock. Pair it with the [`availability-rate-results`](/availability-rate-results) component, which lists the entries for the date the visitor picks.

## Error handling

The component will display relevant information or error messages if the user fails to set all the required search fields (in this example, date & rate) or if there is no availability.

## What's next? [#what-s-next]

You can now move to the [AvailabilityResults](/availability-results) component to customize the results shown or check out how to search for [multiple available entries](/availability-search-multiple).