OrderRental

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.

Authorization: Bearer {your-api-key}

Base URL

https://<tenantId>.api.omnium.no/api/rentals

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.

POST /api/rentals/CreateRentalProducts

Request body

{
  "sourceProductId": "prod-bicycle-touring-28",
  "storeId": "store-oslo-west",
  "count": 5,
  "warehouseCode": "WH-OSLO",
  "prices": [
    {
      "amount": 250.00,
      "currency": "NOK"
    },
    {
      "amount": 1500.00,
      "currency": "NOK",
      "priceType": "Deposit"
    }
  ]
}

Request properties

PropertyTypeRequiredDescription
sourceProductIdstringYesID of the source product to create rental instances from
storeIdstringYesStore to associate the rental instances with
countintegerYesNumber of rental instances to create
warehouseCodestringNoWarehouse to reduce stock from when creating the instances
pricesarrayNoPrices to apply to the created instances. Use priceType: "Deposit" to mark a deposit price.

Response

{
  "isSuccessful": true,
  "errorMessage": null,
  "createdProducts": [...],
  "inventoryReduced": 5
}

Response properties

PropertyTypeDescription
isSuccessfulboolWhether the operation succeeded
errorMessagestringError details if isSuccessful is false
createdProductsarrayList of product objects created
inventoryReducedintegerQuantity deducted from the source product's inventory

Get Rental Products

Returns all rental product instances in a store.

GET /api/rentals/GetRentalProducts?storeId={storeId}

Query parameters

ParameterTypeRequiredDescription
storeIdstringYesStore 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.

GET /api/rentals/GetRentalSourceProducts?storeId={storeId}

Query parameters

ParameterTypeRequiredDescription
storeIdstringYesStore 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.

POST /api/rentals/GetRentalProductsBySource

Request body

{
  "sourceProductSkuIds": ["bicycle-touring-28-black", "bicycle-touring-28-silver"],
  "storeId": "store-oslo-west"
}

Request properties

PropertyTypeRequiredDescription
sourceProductSkuIdsarrayYesSource product SKU IDs to look up
storeIdstringNoFilter results to a specific store

Get Availability

Returns availability periods and active bookings for rental products derived from a source product SKU.

POST /api/rentals/GetAvailability

Request body

{
  "sourceProductSkuId": "bicycle-touring-28-black",
  "rentalProductIds": ["rental-001", "rental-002"],
  "from": "2026-06-01T00:00:00Z",
  "to": "2026-08-31T00:00:00Z",
  "storeId": "store-oslo-west"
}

Request properties

PropertyTypeRequiredDescription
sourceProductSkuIdstringYesSource product SKU to check availability for
rentalProductIdsarrayNoLimit results to specific rental instance IDs. Omit to include all instances.
fromdatetimeNoStart of the availability window
todatetimeNoEnd of the availability window
storeIdstringNoFilter to a specific store

Response

{
  "sourceProductSkuId": "bicycle-touring-28-black",
  "rentalProducts": ["rental-001", "rental-002"],
  "periods": [
    {
      "from": "2026-06-15T09:00:00Z",
      "to": "2026-06-21T17:00:00Z",
      "products": ["rental-002"]
    }
  ],
  "bookings": [
    {
      "rentalProductId": "rental-001",
      "projectId": "proj-8821",
      "projectName": "Rental — John Smith",
      "customerName": "John Smith",
      "rentalFrom": "2026-06-15T09:00:00Z",
      "rentalTo": "2026-06-21T15:00:00Z",
      "reservedUntil": "2026-06-21T17:00:00Z"
    }
  ],
  "returnBufferMinutes": 120
}

Response properties

PropertyTypeDescription
sourceProductSkuIdstringSource product SKU the results relate to
rentalProductsarrayAll rental instance IDs considered
periodsarrayContiguous 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[].fromdatetimePeriod start
periods[].todatetime | nullPeriod end
periods[].productsarrayRental instance IDs available during this period
bookingsarrayActive bookings within the queried window. With a return buffer, see Reservation after return.
bookings[].rentalProductIdstringRented instance ID
bookings[].projectIdstringID of the rental tracking project
bookings[].projectNamestringProject name
bookings[].customerNamestringCustomer name
bookings[].rentalFromdatetimeBooking start
bookings[].rentalTodatetimeBooking end
bookings[].reservedUntildatetimeWhen 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.
returnBufferMinutesintegerMinutes 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 rentalFrom until reservedUntil. The buffer counts from the registered return once the rental project is completed, and from rentalTo until 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 rentalTo plus 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 rentalTo plus the buffer, even if it is not back yet.
  • bookings holds only the bookings that conflict with a rental from from to to: bookings that are reserved past from and start before to plus returnBufferMinutes. Bookings of completed rental projects are included while they are still reserved. A rental can start exactly at reservedUntil.
  • periods shows a booked instance as unavailable until reservedUntil.
  • Send from in 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.

POST /api/rentals/AddRentalProductToCart

Request body

{
  "cartId": "cart-a1b2c3d4",
  "rentalProductSkuId": "rental-001",
  "rentalFrom": "2026-06-15T00:00:00Z",
  "rentalTo": "2026-06-21T00:00:00Z",
  "addDeposit": true
}

Request properties

PropertyTypeRequiredDescription
cartIdstringYesCart to add the rental line to
rentalProductSkuIdstringYesSKU of the rental instance to add
rentalFromdatetimeYesRental period start
rentalTodatetimeYesRental period end
addDepositboolNoWhether 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.

{
  "message": "The rental unit is reserved from 2026-06-15 11:00 to 2026-06-21 19:00. A rental must be back 120 minutes before the next one starts."
}

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.

POST /api/rentals/AddRentalDepositToCart?cartId={cartId}&rentalProductSkuId={rentalProductSkuId}

Query parameters

ParameterTypeRequiredDescription
cartIdstringYesCart to add the deposit to
rentalProductSkuIdstringYesSKU 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.

DELETE /api/rentals/DeleteRentalProducts

Request body

{
  "productIds": ["rental-001", "rental-005"],
  "reclaimInventory": true,
  "reclaimToWarehouse": "WH-OSLO"
}

Request properties

PropertyTypeRequiredDescription
productIdsarrayYesIDs of rental instances to delete
reclaimInventoryboolNoIf true, returns inventory to the warehouse. Defaults to false.
reclaimToWarehousestringNoWarehouse 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 reservedUntil is allowed.
  • A return time is available when the instance's next booking starts at least returnBufferMinutes after it. periods only shows when an instance is booked, so check return times against bookings and returnBufferMinutes.
  • 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.

{
  "sourceProductSkuId": "bicycle-touring-28-black",
  "rentalProductIds": ["rental-001"],
  "from": "2026-06-22T08:00:00Z",
  "to": "2026-06-24T15:00:00Z"
}

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.