Retrieve Units
Retrieve Inventory available to the API user
Overview
The Retrieve Units request allows API users to access the Inventory available to them within the CiiRUS system. This method provides partners with comprehensive data about each unit, including details like the Property ID (UnitID), the property's enablement status, the Merchant of Record settings, and more.
Integrating this method into your system serves as the first step in incorporating Inventory management within your application.
This method also allows API users to retrieve permissions of a single unit, providing granular control for individual properties. It is important to note that this method may return an error message if there is an issue with the unit configuration, such as the property being deleted or disabled by the supplier.
Endpoints Available
| Method | Endpoint | Description |
|---|---|---|
| GET | v2023.07.31/inventory | Returns all Units in Inventory |
| GET | v2023.07.31/inventory/{unitId} | Returns a specific Unit in Inventory |
Path Parameters
| Path Parameter | Required / Optional | Description |
|---|---|---|
| {unitId} | Required | Unique Identifier for Unit in Inventory |
Query String Parameters
| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
| page | Optional | The page to be shown | int |
| pageSize | Optional | Limits the number of returned results | int |
| lastUpdateDate | Optional | Only return objects which have been modified after a certain date | date-time |
| mcUserId | Optional | Unique Identifier for supplier | int |
| mcUserIds | Optional | Unique Identifiers for Suppliers | int |
| unitId | Optional | Unique Identifier for Unit in Inventory | int |
| unitIds | Optional | Unique Identifier for Units in Inventory | int |
| enabled | Optional | Filter Results by enabled or disabled units | boolean |
| permissions | Optional | Return additional context information | boolean |
| airbnb | Optional | Return additional context information relating to Airbnb | boolean |
| displayOnWebsite | Optional | Only show properties which are enabled for website | boolean |
Response Definition
| Response Item | Description | Data Type |
|---|---|---|
"inventory" | An array containing information about the inventory. Each element of the array represents a specific unit and its associated details | array |
"inventory" Object
"inventory" Object| Response Item | Description | Data Type |
|---|---|---|
"property_id" | Unique Identifier for Unit in Inventory | int |
"native"* | A flag indicating whether the Unit is native to the Agent (true) or not (false). Native units are managed directly within the system | boolean |
"allocation_on_arrival"* | A flag indicating whether the Unit is configured as allocation on arrival (true) or not (false). Allocation on arrival refers to the ability to book the unit without a specific pre-assigned unit | boolean |
"online_booking_enabled"* | A flag indicating whether online booking is enabled for the unit (true) or not (false) | boolean |
"merchant_of_record"* | Indicates the entity that acts as the Merchant of Record for the Unit. Possible values can be "MANAGEMENT_COMPANY" or "AGENT" | string |
"error" | Error Message describing the property status | string |
"airbnb_host_id"** | Airbnb Host ID related to the Inventory | string |
"airbnb_cancelation_policy"** | Airbnb Cancellation Policy configured for the Inventory | string |
"airbnb_sync_enabled"** | Defines if the Inventory is enabled to sync with Airbnb | boolean |
"mc_user_id" | Unique Identifier for the Supplier of the Inventory | int |
Response Items notaed with '*' will only be returned when using 'permissions' Query Parameter set as "True"
Response Items notaed with '**' will only be returned when using 'airbnb' Query Parameter set as
"True"
Sample Request
curl --request GET \
--url 'https://api.ciiruspartners.com/v2023.07.31/inventory?page=1&enabled=false&pageSize=50&permissions=true' Sample Response
{
"inventory": [
{
"unit_id": 219264,
"native": false,
"allocation_on_arrival": false,
"online_booking_enabled": true,
"merchant_of_record": "MANAGEMENT_COMPANY",
"include_mandatory_extras": true,
"mc_user_id": 42330
},
{
"unit_id": 219265,
"native": false,
"allocation_on_arrival": false,
"online_booking_enabled": true,
"merchant_of_record": "MANAGEMENT_COMPANY",
"include_mandatory_extras": true,
"mc_user_id": 42330
},
...
],
"next_page_url": "https://api.ciiruspartners.com/v20230731/inventory?page=2&pageSize=50",
"total_page_count": 10
} Updated 3 months ago
