Requiply
TypeScript SDK

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.

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.

availability.calendar()

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.

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()

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.

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()

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:

FieldWhat it does
bundlesBundles to book as { bundleId, quantity }, with quantity in whole sets, from bundles.list(). Their components are added to the items. Since 0.2.1; needs the organization's Bundles feature.
servicesAdd-on services by serviceId, from services.list().
clientIdApplies that client's percentage discount. Meant for server integrations that already know the client.
adjustmentA booking cost adjustment. Secret key only.
saleLinesGoods sold with the booking. See Sales and Goods for Sale; a publishable key can send them only while the organization sells to customers.
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(). A quote is priced exactly the way the booking will be, so the total you show is the total the booking gets.

Quote response

FieldWhat it holds
itemsSubtotal, servicesSubtotalRental products and services before any discount or adjustment.
discountableSubtotalThe part the client discount applies to. Services with excludedFromDiscount are not in it.
bundleDiscountAmount, lineBundlesWhat the bundles save, already inside total (0 without bundles), and one row per bundle with its quantity, discountPercent, grossTotal, discountAmount, and per-set components. lineItems hold the merged quantities of bundled and standalone units. Since 0.2.1.
discountPercentage, discountAmountThe client discount and what it takes off, after the bundle discount.
adjustment, adjustmentAmountThe booking cost adjustment the quote was priced with, or null, and its signed money effect (0 for units, which changes the charged period instead).
saleSubtotal, lineSaleItemsGoods sold with the booking, when you pass saleLines. Never discounted or adjusted. See Sales and Goods for Sale.
totalWhat the booking costs, goods included.
lineItems, lineServicesOne row per product or service with its subtotal. unitCount is the number of charged days, hours, or months.
Copyright © 2026