The Availability and Pricing endpoint checks whether rental items are available for a date and time, and calculates their price for that date. It is meant for developers integrating custom booking systems, storefronts, or custom web forms with InflatableOffice.
| Method | URL | API key permission | Package |
|---|---|---|---|
| POST | https://rental.software/api6/availability_pricing | Leads: Read Only or Full Access | WP/API |
Tip: if you are checking availability across a large volume of items or times, we recommend running your checks using the speedy flag first. If the speedy check returns an uncertain result, you can then fall back to the standard method to confirm.
Request
Send a POST request with a JSON body and the header Content-Type: application/json. The endpoint name uses an underscore: availability_pricing.
| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Your API key. It can go in the JSON body or in the URL |
| start | timestamp | Yes | Start time as a Unix timestamp, in seconds or milliseconds |
| end | timestamp | Yes | End time as a Unix timestamp, in seconds or milliseconds. Must be after start |
| items | array of objects | Yes | The rental items to check. See the item fields below |
| location_id | integer | No | Specific inventory location ID. Defaults to the first location of the API key, or your account's default location |
| delivery_type | string | No | For example "Delivery" or "Customer Pickup" |
| multi-date | array of objects | No | Additional date ranges, written as [{"start": ..., "end": ...}], to check multiple slots in a single call. Additional ranges reuse the same items, quantities, location, and delivery type. The main start and end remain required |
| speedy | boolean | No | Default false. Enables the fast availability checking mode for high-volume queries |
Each object in items has these fields:
| Field | Type | Required | Description |
|---|---|---|---|
| rental_id | integer | Yes | Unique rental item ID. Get IDs from API - Rentals - Retrieve List |
| quantity | number | No | Desired quantity. Defaults to 1 and must be greater than zero |
| accessories | array | No | Accessories or options to include with the item. Each one is an object with the same fields (rental_id, quantity) |
Availability Modes & Best Practices
- Standard mode (speedy: false) performs a full, comprehensive availability evaluation across all conflict rules and active leads.
- Speedy mode (speedy: true) is an optimized lightweight check, ideal for checking availability across multiple dates or large catalogs at once.
Recommended Workflow
- Use speedy: true for broad catalog browsing and multi-date inquiries.
- In speedy mode each item comes back with a sure_unavailable value. When it is true, the item is definitely unavailable for the requested range. This can result from bookings, repairs, or required accessory shortages. A value of false does not mean the item is available.
- For anything else, send a second, targeted request with speedy: false before you accept or decline the booking.
Sample Requests & Responses
Single-Date Standard Check
curl -X POST "https://rental.software/api6/availability_pricing" \
-H "Content-Type: application/json" \
-d '{
"apiKey": "YOUR_API_KEY",
"start": 1784145600,
"end": 1784160000,
"delivery_type": "Delivery",
"items": [
{ "rental_id": 30083, "quantity": 1,
"accessories": [ { "rental_id": 30085, "quantity": 1 } ] }
]
}'
Response (HTTP 200):
{
"lead_id": 918273,
"start": 1784145600000,
"end": 1784160000000,
"location_id": 0,
"delivery_type": "Delivery",
"items": [
{
"rental_id": 30083,
"quantity": 1,
"price": 250,
"availability": 2,
"accessories": [
{
"rental_id": 30085,
"quantity": 1,
"price": 25,
"availability": 4,
"accessories": []
}
]
}
],
"request_time": 1760000000
}
Multi-Date Speedy Check
{
"apiKey": "YOUR_API_KEY",
"start": 1784145600,
"end": 1784160000,
"speedy": true,
"items": [
{ "rental_id": 30083, "quantity": 1 }
],
"multi-date": [
{ "start": 1784750400, "end": 1784764800 }
]
}
Response (HTTP 200):
{
"lead_id": 918274,
"start": 1784145600000,
"end": 1784160000000,
"location_id": 0,
"delivery_type": "",
"items": [
{
"rental_id": 30083,
"quantity": 1,
"price": 250,
"availability": 2,
"accessories": [],
"sure_unavailable": false
}
],
"multi-date": [
{
"lead_id": 918274,
"start": 1784750400000,
"end": 1784764800000,
"items": [
{
"rental_id": 30083,
"quantity": 1,
"price": 250,
"availability": 0,
"accessories": [],
"sure_unavailable": true
}
]
}
],
"request_time": 1760000000
}
Response Fields
| Field | Description |
|---|---|
| start, end | The date range that was checked. Always returned in milliseconds, even when you sent seconds |
| location_id, delivery_type | The location and delivery type used for the calculation |
| items | One entry per item you sent, in the same order |
| items[].price | The price of the item for the requested date and length of time |
| items[].availability | How many of the item are available for the requested time. Compare it with the quantity you need |
| items[].sure_unavailable | Speedy mode only. true means the item is definitely unavailable for the requested range, including unavailability caused by bookings, repairs, or required accessory shortages. false does not mean the item is available |
| items[].accessories | The accessories you sent for the item, each with its own price and availability |
| multi-date | Only present when you sent multi-date. One entry per extra date range, in the order you sent them, each with its own items |
| lead_id | Internal reference for the calculation. You can ignore it |
Two special values can appear in availability:
- 99999999999 means the item is not limited by quantity, so it is always available.
- "TBD" means the item is supplied by a vendor and the available quantity is not known.
The response can include a few extra keys not listed here. Your code should ignore keys it does not use.
Error Handling & Response Codes
| Status | Message | What to do |
|---|---|---|
| 400 | start is required / end is required | Send both timestamps |
| 400 | start must be a Unix timestamp in seconds or milliseconds | Send numbers only, with no date text |
| 400 | End must be after start | Check the date range |
| 400 | Items must be a non-empty array | Send at least one item in items |
| 400 | Each item requires a positive rental_id | Every item needs a rental_id |
| 400 | Item quantity must be greater than zero | Fix the quantity |
| 400 | Rental is not available at this location: {id} | The item is not offered at the location used. Send the right location_id |
| 403 | Permission access restricted | Give the API key Leads access under Settings > API Keys |
| 403 | Location access restricted | The API key cannot access that location |
| 404 | Rental not found: {id} | The rental ID does not exist in your account, or the item is inactive |
| 404 | Location not found | Check the location_id |
| 405 | Only accepts POST requests | Use POST |
See API - Errors and Rate Limits for errors that apply to every call.
Good to Know
- One request counts as one API transaction, no matter how many items or date ranges it contains. Checking several dates with multi-date uses fewer API transactions than making one call per date.
- This endpoint only calculates availability and price. To create the lead, see API - Leads - Create or Update.