Skip to main content

Definition

Availability answers one question, which listings can a customer get in this sales channel?, and lets you deepen it with context:
  • …with a given fulfillment type
  • …at a specific location
  • …to be booked between two dates
The same availability service powers TWICE’s own sales channels (Online Store, POS, Admin) and is available to external integrations through the API.

How it works

Availability is not binary. Whether a listing is available depends on several factors, which layer on as you add context:
  • Listing: the listing is active, visible in the channel, and has at least one valid purchase type.
  • Stock: at least one location holds stock (for items that track inventory).
  • Fulfillment: a fulfillment method can serve the customer. For in-store pickup, a listing is eligible at a Location only when it’s sold there and that Location’s fulfillment rules offer in-store pickup for the listing’s purchase type (rental or sale).
  • Dates: for bookings, the requested period falls in the listing’s available date ranges, its start and end times are allowed, and it is free of conflicts on the calendar.
A customer usually chooses a location and dates late in the journey, so availability answers with whatever context it has and gets more precise as context is added:

Eligibility vs. availability

Two of these factors answer different questions, and the storefront resolves them in order:
  • Eligibility is a configuration fact: can this listing be fulfilled at this Location at all? A Location is eligible for a listing when the listing is sold there and the Location offers a fulfillment method for the listing’s purchase type. It doesn’t depend on stock levels or dates, so it can be evaluated up front, to show “available for pickup at these Locations” and to filter the Location picker.
  • Availability layers stock and dates on top: do the eligible Locations actually have the requested items free for the chosen period? A Location can be eligible but still out of stock for a given range or quantity.
The storefront narrows to eligible Locations first, then resolves real stock and dates for the Location the customer selects. So an item shown as “available for pickup” can still come back as out of stock once concrete dates and quantities are applied. Eligibility says where it could be fulfilled, and availability confirms whether it can be, right now. On multi-location storefronts, the store selector drives which Location’s stock the customer sees. The cart page extends this with a per-store availability check, and each store is marked “Cart available” or “Cart unavailable” based on whether it can fulfill every item in the cart for the selected dates.

Availability signal vs. exact stock

For a browse view, availability is a signal (available somewhere) rather than a count. It tells the customer whether an item can be bought and at how many locations, without exposing exact quantities: Exact per-location quantities are returned only once a specific location is selected, and only when the merchant chooses to show them. Some merchants want a “only 2 left” scarcity cue, while others treat exact stock as private. For bookable items, availability is inherently date-based: there is no meaningful signal until the customer picks dates.
Availability reflects Stock Item state and any scheduled events (reservations and other holds) that block an item for a period. An item that is committed to an order, reserved, or not In use does not count toward availability for that range.Buffer time also extends the unavailable window in both directions. A pre-booking buffer blocks the item before the booking starts (and acts as a minimum lead time on the storefront), while a post-booking buffer blocks it after the booking ends. Both buffered periods count as committed and prevent the item from being booked during those windows.

The booking decision

Whether a customer can get a listing is an AND across several layers. Each must pass, and the first layer that fails is the reason it isn’t offered. The storefront evaluates them from cheapest (pure configuration) to most specific (live stock and dates):
1

The listing is sellable

  • Active status: Draft and template Listings are never offered.
  • Enabled in the customer’s sales channel (salesChannelOnline for the Online Store).
  • Has at least one purchase type with a row in an attached Price Table: an enabled, in-window booking row for rentals, or a sales row for purchases.
2

A location can fulfill it (eligibility)

  • The listing is sold at the Location (linked), and the Location is active with the channel enabled.
  • The Location’s fulfillment rules offer the requested fulfillment method (e.g. in-store pickup) for that purchase type. A store that offers pickup for sales but not rentals makes a rental ineligible there, even if it’s in stock.
This layer is pure configuration: no stock or dates are consulted yet, so it can be resolved up front to filter the Location picker.
3

There is stock (availability)

For inventory-tracked items, an eligible Location must hold at least one usable Stock Item: In use, and not committed to an order, reserved, or otherwise held. Listings with unlimited availability skip this layer.
4

The dates fit a price row and the location's hours (bookings)

Once the customer picks a period:
  • A booking row must cover the duration and respect its weekdays and timeOfDayRange, the table’s date window, and the listing’s min / max booking duration. Otherwise there is no price, so no bookable option.
  • The Location’s fulfillment hours must allow the chosen pickup and return times. Pickup hours constrain the booking start; return hours constrain the booking end. Locations without custom fulfillment hours fall back to opening hours.
5

The dates fall inside an available date range (bookings)

A listing that carries date ranges on its Limits tab is bookable on those calendar days only, read on the pickup location’s clock. A listing with no ranges is available on all dates.Ranges that overlap or touch merge into one block, so June plus July gates as a single June to July season.One checkbox on the card decides how far the gate reaches:
  • Bookings must also end within the date range requires the booking to start and end in the same merged block. It is ticked by default. Untick it and only the start is gated, like the order deadline, so a booking may run past the end of its season.
6

Every unit is free for the whole range (bookings)

Every unit needed must be free of conflicts for the whole range, and the requested quantity can’t exceed the units available across that period.Buffer time extends the conflict window in both directions. A before-buffer blocks the item before the booking start, and an after-buffer blocks it after the booking end. An item with a 1-hour before-buffer and a 2-hour after-buffer is unavailable from 1 hour before pickup through 2 hours after return.One reservation is left out of this check: the one held by the line item you are editing. See Editing an existing line item.
7

The before-buffer's lead time has passed (bookings)

A stock item’s before-buffer also enforces a minimum lead time on the storefront: a booking starting sooner than the buffer allows is shown as unavailable. Admin staff are exempt from this restriction.
8

The start and end times are allowed that weekday (bookings)

A listing can name the times a booking may start, and the times it may end, per weekday on its Limits tab. Each weekday carries one of four states per boundary: the grid, specific times, specific time ranges, or no times at all.An overridden weekday answers on its own, and the interval does not narrow it further, so a listed start of 10:07 is offered and accepted. A weekday left alone runs on the grid.A weekday allowing no start closes starts, not passage: a multi-day booking may run through it. End times have no grid to fall back on.
9

The start is on the booking interval grid (bookings)

A booking may start every N minutes, counted from local midnight at the service location. The account sets the interval in Settings → Operations → Bookings, and a listing can override it on its Limits tab.Pickers generate their start times on that grid, so an off-grid time is rarely reachable. The storefront cart also checks it: an off-grid line is flagged with an off_booking_interval notice, and checkout rejects the start when it creates the order.Treat the interval as a picker grid rather than an availability answer. The availability endpoints do not reject an off-grid start, and admin order management books off the grid deliberately.
10

The order deadline has not passed (bookings & subscriptions)

If the listing has an order deadline, the customer must place the order before the cutoff:
  • A set time before: the start time minus a fixed offset (e.g. 2 hours before start).
  • By time of day: a wall-clock cutoff on an earlier day, resolved in the service location’s timezone (e.g. by 18:00, 1 day before start).
Start times past their deadline appear as unavailable on the storefront calendar. If a customer has an item in the cart and the deadline passes before checkout, the cart flags the item with an order_deadline notice. Admin users are exempt, so staff can create orders past the deadline.
The customer-facing answer reflects the deepest layer reached: “Available at 3 locations” before a Location is chosen, “Not available from this location” when eligibility fails there, “No available days” when no date passes, and a unit count like “Only 1 left” when quantity is the blocker.

What wins when a listing carries several constraints

Nothing overrides anything. The layers are combined with AND, so the tightest one decides and the others cannot widen it. A date range does not open a day the location is closed on, and opening hours do not open a day outside every range. Two kinds of rule make up the answer, and knowing which is which explains what the endpoints report: The per-weekday start and end times are part of the availability answer, so the calendar closes a weekday that allows no start. The booking interval is not: treat it as the grid a picker draws from, since the availability endpoints accept an off-grid instant and admin order management books off the grid deliberately. The write-path checks behind all of this run on the storefront and checkout paths only. Admin order creation is exempt from the date ranges, the start and end times, the interval and the order deadline alike, so staff can take a booking on the phone that the storefront refuses. Every check gates a booking being created, so a rule changed today leaves yesterday’s orders valid and editable.

Editing an existing line item

When availability is computed for a line item that is being edited, that line item’s own reservation is excluded from the check, along with the reservations of any add-ons attached to it. The exclusion covers the whole reserved footprint, buffer windows included, so a line item never blocks its own edit. Without it, an item’s own buffer would count against it: a stock item with a 2-hour after-buffer would refuse a 1-hour extension of the very rental period that created that buffer. Excluding a sold stock item frees the capacity that sale consumed in the same way, so re-dating a sale sees its own unit as available again. The rule applies wherever an existing line item is re-dated or re-picked: the admin’s line item editor, and the storefront cart’s edit flow. It does not extend to other line items on the same order: those hold their reservations normally, and an edit that collides with one is reported as unavailable.

Items already in the cart

Items in the cart are checked as if they were already booked, buffers and all. A second rental of the same stock item that starts inside the first one’s after-buffer is not offered, even when the two rental periods themselves do not overlap. The same applies across the cart page’s per-store check: a store counts as “Cart available” only when it can hold every item in the cart, each with its buffer windows, at the same time.

Examples

The listing is active and in stock at the store, but the store’s fulfillment rules enable in-store pickup for sales only. The rental is ineligible there, so the storefront shows “Not available from this location”, even though units exist. It can still be bookable at another store that offers rental pickup.
The item is eligible and has units, but every unit at the selected Location is already committed for part of the requested period. It reads as available in the browse signal, yet the calendar returns no bookable range for those exact dates. Different dates or a different Location resolve it.
A stock item carries a 2-hour after-buffer, and a customer calls to extend their rental by an hour. The extra hour falls inside the buffer the rental itself created.Because the line item being edited is excluded from the check, the hour reads as free and the new dates save. Another customer’s booking in that same window would still block it.
The only booking row is restricted to Mon–Fri (weekdays) with a two-day minimum. A Saturday start, or a one-day booking, matches no row, so there is no price and it isn’t bookable for that selection even though stock is free.The storefront surfaces this before the customer commits: in the booking widget’s Booking options dropdown, an option that can’t start on the selected date is greyed and captioned with the next date it can, reading “Not available for selected dates - next available Mon 18.8”. Selecting it moves the start date to that day. See Booking options and the selected date.
The customer wants 3 units; the selected Location has 1 free for the range and another has 2. Neither can fulfill all 3 alone, so the item shows as available overall but the selected Location caps at 1. Lowering the quantity, or choosing a Location with enough stock, resolves it.
A made-to-order sale listing with unlimited availability skips the stock and conflict layers entirely: as long as it’s active, in-channel, and sold at an eligible Location, it’s purchasable with no quantity ceiling.
A paddleboard hire carries one date range, 1 June to 31 August. In February the calendar has nothing to offer, and the listing page says Available for booking with the June to August dates instead of an empty month.A customer who forces April dates into the cart sees the line flagged “Not available - this listing can’t be booked for the selected dates.”
A ski hire sets Sunday to No end times allowed on the End times row, because nobody is there to check gear back in. Sunday keeps its ordinary start times.A customer may take a Friday to Monday rental that runs through Sunday, and may start one on Sunday. The return-time picker offers no Sunday slot, and a Sunday return sent straight to checkout is refused.
A customer adds a 10:45 booking while the account runs on a 15-minute interval. The merchant then moves the account to 30 minutes, and the cart flags the line as off_booking_interval: 10:45 is no longer a start the grid offers.Bookings already ordered at 10:45 keep their time. Only a start being created is checked, so nothing in the order history is invalidated by the change.
A listing has a “2 hours before start” order deadline. A customer adds a 14:00 booking to their cart at 11:30, but doesn’t check out until 12:15. The cart flags the item, because the deadline was 12:00 and the order can no longer be placed for that start time. The customer can pick a later start time or remove the item.

Querying availability via the API

Authenticate with the X-API-KEY header (see API Keys). The main endpoints: Common query parameters include from / to (the date range), serviceLocationIds, and variantValueIds. The two availability endpoints are part of the documented Admin API. The last two are reachable but are not published in the reference, so they can change without notice, so build on them only if you can absorb that. See the API reference for full parameters and response schemas. It is generated from the live API, so it always reflects the current fields.

Listings

The customer-facing catalog entity availability is evaluated for.

Stock Item State

In / Out commitments that drive what’s available.

Scheduled Events

Reservations and holds that block availability for a period.

Price Tables

Pricing returned alongside availability for bookings.

Locations

Where listings are sold and the fulfillment rules that drive pickup eligibility.

Bookings settings

The account-wide booking interval every picker generates start times on.

Listing Limits tab

Where a listing sets its date ranges, its start and end times and its order deadline.