---
title: "Availability and Pricing"
description: "Check date availability and calculate typed rental quotes."
canonical_url: "https://requiply.com/docs/en/developers/typescript-sdk/availability-and-pricing"
---
# Availability and Pricing

> Check date availability and calculate typed rental quotes.

All three methods work with a publishable key, so a storefront can call them straight from the browser.

<note>

Publishable-key availability and quote flows do not expose or accept supplier-sourced subrental products. Use a secret key on a trusted server when the organization's Subrentals feature is enabled and your integration needs those products.

</note>

## `availability.calendar()`

```ts
availability.calendar(
  input: AvailabilityCalendarInput,
  options?: RequiplyRequestOptions,
): Promise<AvailabilityCalendarResponse>
```

Required: `startDate` and `endDate` as plain dates (`YYYY-MM-DD`), at most 366 days apart. A value with a time is converted to its UTC date, which can shift it by a day. Optional `groupIds` restricts the calendar to up to 200 products.

```ts
const { days } = await requiply.availability.calendar({
  startDate: '2026-07-01',
  endDate: '2026-07-07',
  groupIds: [cameraKitId],
});
```

Each day includes the group, total quantity, reserved quantity, and an `availabilityStatus` that can be `null`.

## `availability.items()`

```ts
availability.items(
  input: AvailabilityItemsInput,
  options?: RequiplyRequestOptions,
): Promise<AvailabilityItemsResponse>
```

Required: `startDate` and `endDate`; `endDate` cannot be before `startDate`. Offset-less date-times are read in the organization's timezone. Optional: `search`, `limit` (1 to 100, default 25), and `cursor`.

```ts
const page = await requiply.availability.items({
  startDate: '2026-07-01T10:00:00',
  endDate: '2026-07-03T18:00:00',
  search: 'camera',
  limit: 25,
});

const nextCursor = page.nextCursor;
```

The response uses the same inventory item shape as `inventory.list()` and returns `nextCursor: string | null`. It lists only products with at least one unit free for the whole period. `categoryId` is always `null` here; use `inventory.list()` with the same dates when you need categories.

## `pricing.quote()`

```ts
pricing.quote(
  input: PricingQuoteInput,
  options?: RequiplyRequestOptions,
): Promise<PricingQuoteResponse>
```

Required: `startDate`, `endDate`, and `items`. Each item needs a `groupId` (the product `id`) and a `quantity`. `items` may be empty when you send `bundles`. Optional:

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        bundles
      </code>
    </td>
    
    <td>
      Bundles to book as <code>
        { bundleId, quantity }
      </code>
      
      , with <code>
        quantity
      </code>
      
       in whole sets, from <a href="https://requiply.com/docs/en/developers/typescript-sdk/inventory-and-categories#bundleslist">
        <code>
          bundles.list()
        </code>
      </a>
      
      . Their components are added to the items. Since 0.2.1; needs the organization's Bundles feature.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        services
      </code>
    </td>
    
    <td>
      Add-on services by <code>
        serviceId
      </code>
      
      , from <code>
        services.list()
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        clientId
      </code>
    </td>
    
    <td>
      Applies that client's percentage discount. Meant for server integrations that already know the client.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        adjustment
      </code>
    </td>
    
    <td>
      A <a href="https://requiply.com/docs/en/developers/typescript-sdk/bookings#booking-cost-adjustment">
        booking cost adjustment
      </a>
      
      . Secret key only.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        saleLines
      </code>
    </td>
    
    <td>
      Goods sold with the booking. See <a href="https://requiply.com/docs/en/developers/typescript-sdk/sales#goods-on-a-booking">
        Sales and Goods for Sale
      </a>
      
      ; a publishable key can send them only while the organization <a href="https://requiply.com/docs/en/developers/typescript-sdk/sales#with-a-publishable-key">
        sells to customers
      </a>
      
      .
    </td>
  </tr>
</tbody>
</table>

```ts
const quote = await requiply.pricing.quote({
  startDate: '2026-07-01T10:00:00',
  endDate: '2026-07-03T18:00:00',
  items: [{ groupId: cameraKitId, quantity: 2 }],
  services: [{ serviceId: deliveryServiceId }],
});

console.log(quote.currency, quote.total);
```

Date-times without an offset are read in the organization's timezone, as for [`bookings.create()`](https://requiply.com/docs/en/developers/typescript-sdk/bookings). A quote is priced exactly the way the booking will be, so the `total` you show is the total the booking gets.

### Quote response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      What it holds
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        itemsSubtotal
      </code>
      
      , <code>
        servicesSubtotal
      </code>
    </td>
    
    <td>
      Rental products and services before any discount or adjustment.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discountableSubtotal
      </code>
    </td>
    
    <td>
      The part the client discount applies to. Services with <code>
        excludedFromDiscount
      </code>
      
       are not in it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bundleDiscountAmount
      </code>
      
      , <code>
        lineBundles
      </code>
    </td>
    
    <td>
      What the bundles save, already inside <code>
        total
      </code>
      
       (<code>
        0
      </code>
      
       without bundles), and one row per bundle with its <code>
        quantity
      </code>
      
      , <code>
        discountPercent
      </code>
      
      , <code>
        grossTotal
      </code>
      
      , <code>
        discountAmount
      </code>
      
      , and per-set <code>
        components
      </code>
      
      . <code>
        lineItems
      </code>
      
       hold the merged quantities of bundled and standalone units. Since 0.2.1.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discountPercentage
      </code>
      
      , <code>
        discountAmount
      </code>
    </td>
    
    <td>
      The client discount and what it takes off, after the bundle discount.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        adjustment
      </code>
      
      , <code>
        adjustmentAmount
      </code>
    </td>
    
    <td>
      The <a href="https://requiply.com/docs/en/developers/typescript-sdk/bookings#booking-cost-adjustment">
        booking cost adjustment
      </a>
      
       the quote was priced with, or <code>
        null
      </code>
      
      , and its signed money effect (<code>
        0
      </code>
      
       for <code>
        units
      </code>
      
      , which changes the charged period instead).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        saleSubtotal
      </code>
      
      , <code>
        lineSaleItems
      </code>
    </td>
    
    <td>
      Goods sold with the booking, when you pass <code>
        saleLines
      </code>
      
      . Never discounted or adjusted. See <a href="https://requiply.com/docs/en/developers/typescript-sdk/sales#goods-on-a-booking">
        Sales and Goods for Sale
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        total
      </code>
    </td>
    
    <td>
      What the booking costs, goods included.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        lineItems
      </code>
      
      , <code>
        lineServices
      </code>
    </td>
    
    <td>
      One row per product or service with its subtotal. <code>
        unitCount
      </code>
      
       is the number of charged days, hours, or months.
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://requiply.com/docs/sitemap.md) for all pages.
