Rental API
API reference for the Omnium Rental API. Create and manage rental product instances, check availability, and add rental items to carts.
The Rental API manages rental product instances and integrates them into the cart and order flow.
Authentication
All rental endpoints require an API key with product-level access.
Base URL
Create Rental Products
Creates a specified number of rental product instances from a source product. Each instance is a distinct physical unit that can be individually booked.
Request body
Request properties
| Property | Type | Required | Description |
|---|---|---|---|
sourceProductId | string | Yes | ID of the source product to create rental instances from |
storeId | string | Yes | Store to associate the rental instances with |
count | integer | Yes | Number of rental instances to create |
warehouseCode | string | No | Warehouse to reduce stock from when creating the instances |
prices | array | No | Prices to apply to the created instances. Use priceType: "Deposit" to mark a deposit price. |
Response
Response properties
| Property | Type | Description |
|---|---|---|
isSuccessful | bool | Whether the operation succeeded |
errorMessage | string | Error details if isSuccessful is false |
createdProducts | array | List of product objects created |
inventoryReduced | integer | Quantity deducted from the source product's inventory |
Get Rental Products
Returns all rental product instances in a store.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
storeId | string | Yes | Store ID to retrieve rental products for |
Response
Returns a list of products where isRental is true. For the full product model, see the swagger documentation.
Get Rental Source Products
Returns all source products that have rental instances in a store.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
storeId | string | Yes | Store ID to filter by |
Response
Returns a list of source products. For the full product model, see the swagger documentation.
Get Rental Products by Source
Returns rental instances associated with one or more source product SKUs.
Request body
Request properties
| Property | Type | Required | Description |
|---|---|---|---|
sourceProductSkuIds | array | Yes | Source product SKU IDs to look up |
storeId | string | No | Filter results to a specific store |
Get Availability
Returns availability periods and active bookings for rental products derived from a source product SKU.
Request body
Request properties
| Property | Type | Required | Description |
|---|---|---|---|
sourceProductSkuId | string | Yes | Source product SKU to check availability for |
rentalProductIds | array | No | Limit results to specific rental instance IDs. Omit to include all instances. |
from | datetime | No | Start of the availability window |
to | datetime | No | End of the availability window |
storeId | string | No | Filter to a specific store |
Response
Response properties
| Property | Type | Description |
|---|---|---|
sourceProductSkuId | string | Source product SKU the results relate to |
rentalProducts | array | All rental instance IDs considered |
periods | array | Contiguous time periods and which instances are available during each. The periods run from the earliest rentalFrom to the latest reservedUntil in bookings; outside them, within the queried window, every instance is available. |
periods[].from | datetime | Period start |
periods[].to | datetime | null | Period end |
periods[].products | array | Rental instance IDs available during this period |
bookings | array | Active bookings within the queried window. With a return buffer, see Reservation after return. |
bookings[].rentalProductId | string | Rented instance ID |
bookings[].projectId | string | ID of the rental tracking project |
bookings[].projectName | string | Project name |
bookings[].customerName | string | Customer name |
bookings[].rentalFrom | datetime | Booking start |
bookings[].rentalTo | datetime | Booking end |
bookings[].reservedUntil | datetime | When the instance is available again: the registered return (the rental project is completed), or rentalTo until then, plus returnBufferMinutes. Equal to rentalTo when the tenant has no return buffer. Use this, not rentalTo, to decide when the instance can be rented again. |
returnBufferMinutes | integer | Minutes an instance stays reserved after it is returned. 0 when the tenant has no return buffer. |
Reservation after return
When the tenant sets Reserve the unit after return (minutes) in the order settings, each instance stays reserved for that many minutes after a rental, for example for checking and cleaning:
- Each booking reserves its instance from
rentalFromuntilreservedUntil. The buffer counts from the registered return once the rental project is completed, and fromrentalTountil then. An early return frees the instance earlier, and a late return keeps it reserved until the buffer has passed after the actual return. - A workflow that has ended is not a return. A rental project whose workflow has ended, but that is not completed, keeps its instance until
rentalToplus the buffer, as it does without a buffer. - The return time is the time the project finished. When the workflow ended at an earlier step than the one that completes the project, the project keeps that earlier time, and the buffer counts from it. End the rental project type's workflow at the return step, and set Complete project on this workflow step on that step.
- The registered return time is used as it is, not rounded to the booked hour. With a 120-minute buffer, an instance booked until 15:00 and returned at 15:07 is reserved until 17:07.
- Until a late return is registered, the instance is available again from
rentalToplus the buffer, even if it is not back yet. bookingsholds only the bookings that conflict with a rental fromfromtoto: bookings that are reserved pastfromand start beforetoplusreturnBufferMinutes. Bookings of completed rental projects are included while they are still reserved. A rental can start exactly atreservedUntil.periodsshows a booked instance as unavailable untilreservedUntil.- Send
fromin the request. Without it, or with the earliest possible date, bookings of completed rental projects that are still inside their buffer are left out. - A time with an offset, such as
Z, is compared as that moment. A time without an offset is read as the tenant's local time. This applies both to the request and to the stored bookings, so bookings made with and without an offset are compared correctly. - Add Rental Product to Cart refuses an instance that is reserved in the requested period.
Add Rental Product to Cart
Adds a rental line item to a cart. Optionally adds a deposit line item in the same call.
Request body
Request properties
| Property | Type | Required | Description |
|---|---|---|---|
cartId | string | Yes | Cart to add the rental line to |
rentalProductSkuId | string | Yes | SKU of the rental instance to add |
rentalFrom | datetime | Yes | Rental period start |
rentalTo | datetime | Yes | Rental period end |
addDeposit | bool | No | Whether to add a deposit line item. Defaults to true. |
The rental line item quantity is the number of daily rates: one for every started 24 hours from rentalFrom to rentalTo, and at least one. The hours are counted in the tenant's time zone. The line price is the rental product's daily rate.
If you set addDeposit: false and need to add the deposit later, use the Add Rental Deposit to Cart endpoint.
Instance already reserved
When the tenant uses a return buffer, the endpoint returns 409 Conflict if the instance is reserved in the requested period, or if the cart already holds the same instance for a period less than the buffer apart. A rental must also end at least the buffer before the instance's next booking starts. The times in the message are in the tenant's time zone.
When the cart already holds the instance, the message is The rental unit is already in the cart for an overlapping period.
Without a return buffer, the endpoint does not check availability. Use Get Availability before adding the rental.
Add Rental Deposit to Cart
Adds a deposit line item to a cart for an existing rental line. Use this when you did not include the deposit in the initial AddRentalProductToCart call.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cartId | string | Yes | Cart to add the deposit to |
rentalProductSkuId | string | Yes | SKU of the rental instance the deposit is for |
The deposit line item will have DepositFor set to rentalProductSkuId and a tax rate of 0.
Delete Rental Products
Deletes one or more rental product instances. Optionally reclaims their inventory back to a warehouse.
Request body
Request properties
| Property | Type | Required | Description |
|---|---|---|---|
productIds | array | Yes | IDs of rental instances to delete |
reclaimInventory | bool | No | If true, returns inventory to the warehouse. Defaults to false. |
reclaimToWarehouse | string | No | Warehouse code to receive the reclaimed inventory. Required when reclaimInventory is true. |
Deleting a rental product does not cancel existing bookings or projects linked to that instance. Verify there are no active rentals before deleting.
Build a booking flow
Use Get Availability and Add Rental Product to Cart together to let a customer pick a rental instance, a pickup time and a return time. Read returnBufferMinutes from the availability response instead of hard-coding the buffer. It is a tenant setting, and it is 0 when the tenant has no return buffer.
Show available pickup and return times
For each instance, a booking makes the instance unavailable from rentalFrom until reservedUntil.
- A pickup time is available when it is not inside a booking of the instance. A pickup exactly at
reservedUntilis allowed. - A return time is available when the instance's next booking starts at least
returnBufferMinutesafter it.periodsonly shows when an instance is booked, so check return times againstbookingsandreturnBufferMinutes. - Request the whole range that your calendar shows, and always send
from.
Check a rental before you add it to the cart
Call Get Availability with the chosen pickup time as from, the chosen return time as to, and the instance in rentalProductIds. With a return buffer, bookings is empty only when the instance is free for that rental, with the buffer included. This is the check that Add Rental Product to Cart makes, except that the endpoint also checks the cart for the same instance (see Change the dates of a rental in the cart). Without a buffer, bookings also lists bookings that end at from or start at to, so compare the times.
Keep availability current
Availability changes when a booking is made and when a return is registered, because an early return frees the instance earlier. Do not cache availability responses for long, and request them again before the customer confirms the rental.
Handle a refused rental
With a return buffer, Add Rental Product to Cart returns 409 Conflict when the instance is no longer free. See Instance already reserved. The cart does not change: neither the rental line nor the deposit line is added. Tell the customer that the instance is no longer free, request availability again, and let the customer pick another instance or time.
Change the dates of a rental in the cart
Remove the rental line and its deposit line from the cart before you add the instance again with new dates. Use Remove item for each line. With a return buffer, if the old rental line stays in the cart, the new dates must be at least the buffer away from the old dates, or the endpoint returns 409 Conflict.
Carts do not reserve instances
An instance is reserved when the Create Rental Project from Order workflow step creates the rental project for its order. Until then, two carts can hold the same instance for overlapping periods, and both orders can be placed. Check availability again just before checkout to reduce this risk.
For the full interactive API reference, see the swagger documentation.