On this page
article
step 3 - Add Tenancy Information
Create Rate Availability
-
API: createRateAvailability
-
Purpose & Use Cases: Create a listing for the room. Set the rate and availability.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| roomId | DecodedUnitTypeID | Yes | Identifier for the related Room object |
| externalId | NonEmptyString | No | External identifier for the object |
| bookableFrom | Date | Yes | Start date of availability in format ISO 8601 (YYYY-MM-DD) |
| bookableTo | Date | Yes | End date of availability in format ISO 8601 (YYYY-MM-DD) |
| availability | Int | Yes | Available inventory for the room |
| tenancy | TenancyInput | Yes | Lease mode for this rate availability; TenancyInput is an object includes, moveIn: Date, moveOut: Date, moveInType: MoveInType!, moveOutType: MoveOutType!, tenancyLengthType: TenancyLengthType!, tenancyLengthValue: Int[]; MoveInType has possible values: EXACTLY_MATCH AFTER ANYTIMEMoveOutType has possible values: EXACTLY_MATCH BEFORE ANYTIMETenancyLengthType has possible values: EQUALS NO_LESS_THAN NO_MORE_THAN BETWEEN NOT_SPECIFIC |
| discount | Discount | No | Discount for the tenancy; DiscountInput is an object includes, discountType: DiscountType!, discountValue: NonEmptyString; DiscountType has possible values: ABSOLUTE PERCENTAGE NO_DISCOUNT |
| priceMin | NonEmptyString | Yes | Minimum price for this rate availability |
| priceMax | String | No | Maximum price for this rate availability |
QUERY
mutation CreateRateAvailability($input: CreateRateAvailabilityInput!) {
createRateAvailability(input: $input) {
rateAvailability {
id
roomId
externalId
tenancy {
moveIn
moveOut
moveInType
moveOutType
tenancyLengthType
tenancyLengthValue
}
availability
bookableFrom
bookableTo
priceMin
priceMax
discount {
discountType
discountValue
}
availableThoughMoveInDatePassed
turnaroundType
turnaroundTime
}
}
}
GRAPHQL VARIABLES
{
"input": {
"availability": 99,
"availableThoughMoveInDatePassed": false,
"bookableFrom": "2025-05-01",
"bookableTo": "9999-12-31",
"priceMax": null,
"priceMin": "123.00",
"roomId": "eyJ0eXBlIjoiVW5pdFR5cGUiLCJpZCI6NDk3OX0",
"externalId":"create listing externalId01",
"turnaroundType":"NOT_APPLIED",
"tenancy": {
"moveInType": "ANYTIME",
"moveOutType": "ANYTIME",
"tenancyLengthType": "NOT_SPECIFIC"
}
}
}
- Response:
{
"data": {
"createRateAvailability": {
"rateAvailability": {
"id": "eyJ0eXBlIjoiTGlzdGluZyIsImlkIjoxMDAwMzA1ODA1fQ==",
"roomId": "eyJ0eXBlIjoiVW5pdFR5cGUiLCJpZCI6MTAwNzUxMzJ9",
"externalId": "create listing externalId01",
"tenancy": {
"moveIn": null,
"moveOut": null,
"moveInType": "ANYTIME",
"moveOutType": "ANYTIME",
"tenancyLengthType": "NOT_SPECIFIC",
"tenancyLengthValue": null
},
"availability": 999,
"bookableFrom": "2025-05-01",
"bookableTo": "9999-12-31",
"priceMin": "123.00",
"priceMax": null,
"discount": {
"discountType": null,
"discountValue": null
},
"availableThoughMoveInDatePassed": false,
"turnaroundType": "NOT_APPLIED",
"turnaroundTime": null
}
}
}
}
- Error Message:
| Error Message | Description |
|---|---|
| permission rule cannot execute with invalid id | Unable to fetch the room by the provided roomIdparameter |
| input.tenancy.moveOutType must be EXACTLY_MATCH when moveInType is EXACTLY_MATCH and TenancyLengthType is EQUALS | moveOutType must be EXACTLY_MATCH when moveInType is EXACTLY_MATCH and tenancyLengthType is EQUALS |
| If property bookingJourney is not instant_book,the value of availableThoughMoveInDatePassed can not be set | availableThoughMoveInDatePassed cannot be true if the property.bookingJourney is not CONNECT |
| If property bookingJourney is instant_book and availableThoughMoveInDatePassed is true,the value of moveInType can be exactly_match,the value of moveOutType can be exactly_match, the value of tenancyLengthType can be equals. | When property.bookingJourney is CONNECT and availableThoughMoveInDatePassed is true, moveInType must be EXACTLY_MATCH, moveOutType must be EXACTLY_MATCH, and tenancyLengthType must be EQUALS |
| If property bookingJourney is instant_book,the value of turnaroundType must be set | turnaroundType must be provided when property.bookingJourney is CONNECT |
| If property bookingJourney is instant_book and the turnaroundType is fixed_days, the value of turnaroundTime must be set | turnaroundTime must be provided when property.bookingJourney is CONNECT and turnaroundType is FIXED_DAYS |
| DiscountValue should be null when DiscountType is NO_DISCOUNT | discount.discountValue must be null when discount.discountType is NO_DISCOUNT |
| DiscountValue should not be null when DiscountType is not NO_DISCOUNT | discount.discountValue cannot be null when discount.discountType is not NO_DISCOUNT |
Update Rate Availability
-
API: updateRateAvailability
-
Purpose & Use Cases: Update the listing details of the room.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| id | DecodedListingID | Yes | Identifier for the object |
| externalId | NonEmptyString | No | External identifier for the object |
| bookableFrom | Date | No | Start date of availability in format ISO 8601 (YYYY-MM-DD) |
| bookableTo | Date | No | End date of availability in format ISO 8601 (YYYY-MM-DD) |
| availability | Int | No | Available inventory for the room |
| tenancy | TenancyInput | No | Lease mode for this rate availability; TenancyInput is an object includes, moveIn: Date, moveOut: Date, moveInType: MoveInType!, moveOutType: MoveOutType!, tenancyLengthType: TenancyLengthType!, tenancyLengthValue: Int[]; MoveInType has possible values: EXACTLY_MATCH AFTER ANYTIMEMoveOutType has possible values: EXACTLY_MATCH BEFORE ANYTIMETenancyLengthType has possible values: EQUALS NO_LESS_THAN NO_MORE_THAN BETWEEN NOT_SPECIFIC |
| discount | Discount | No | Discount for the tenancy; DiscountInput is an object includes, discountType: DiscountType!, discountValue: NonEmptyString; DiscountType has possible values: ABSOLUTE PERCENTAGE NO_DISCOUNT |
| priceMin | NonEmptyString | No | Minimum price for this rate availability |
| priceMax | String | No | Maximum price for this rate availability |
QUERY
mutation UpdateRateAvailability($input: UpdateRateAvailabilityInput!) {
updateRateAvailability(input: $input) {
rateAvailability {
id
roomId
externalId
tenancy {
moveIn
moveOut
moveInType
moveOutType
tenancyLengthType
tenancyLengthValue
}
availability
bookableFrom
bookableTo
priceMin
priceMax
discount {
discountType
discountValue
}
availableThoughMoveInDatePassed
turnaroundType
turnaroundTime
}
}
}
GRAPHQL VARIABLES
{
"input": {
"id": "eyJ0eXBlIjoiTGlzdGluZyIsImlkIjoxMDAwMzA1ODA1fQ",
"externalId":"update listing externalId01",
"bookableFrom": "2025-05-01",
"availability": 99,
"bookableTo": null,
"discount": {
"discountType": "NO_DISCOUNT",
"discountValue": null
},
"priceMax": null,
"priceMin": "22",
"tenancy": {
"moveIn": null,
"moveInType": "ANYTIME",
"moveOut": null,
"moveOutType": "ANYTIME",
"tenancyLengthType": "NOT_SPECIFIC",
"tenancyLengthValue": null
},
"turnaroundTime": null,
"turnaroundType": null
}
}
- Response:
{
"data": {
"updateRateAvailability": {
"rateAvailability": {
"id": "eyJ0eXBlIjoiTGlzdGluZyIsImlkIjoxMDAwMzA1ODA1fQ==",
"roomId": "eyJ0eXBlIjoiVW5pdFR5cGUiLCJpZCI6MTAwNzUxMzJ9",
"externalId": "update listing externalId01",
"tenancy": {
"moveIn": null,
"moveOut": null,
"moveInType": "ANYTIME",
"moveOutType": "ANYTIME",
"tenancyLengthType": "NOT_SPECIFIC",
"tenancyLengthValue": null
},
"availability": 999,
"bookableFrom": "2025-05-01",
"bookableTo": "9999-12-31",
"priceMin": "22.00",
"priceMax": null,
"discount": {
"discountType": null,
"discountValue": null
},
"availableThoughMoveInDatePassed": false,
"turnaroundType": null,
"turnaroundTime": null
}
}
}
}
- Error Message:
| Error Message | Description |
|---|---|
| input.tenancy.moveOutType must be EXACTLY_MATCH when moveInType is EXACTLY_MATCH and TenancyLengthType is EQUALS | moveOutType must be EXACTLY_MATCH when moveInType is EXACTLY_MATCH and tenancyLengthType is EQUALS |
| If property bookingJourney is not instant_book,the value of availableThoughMoveInDatePassed can not be set | availableThoughMoveInDatePassed cannot be true if the property.bookingJourney is not CONNECT |
| If property bookingJourney is instant_book and availableThoughMoveInDatePassed is true,the value of moveInType can be exactly_match,the value of moveOutType can be exactly_match, the value of tenancyLengthType can be equals. | When property.bookingJourney is CONNECT and availableThoughMoveInDatePassed is true, moveInType must be EXACTLY_MATCH, moveOutType must be EXACTLY_MATCH, and tenancyLengthType must be EQUALS |
| If property bookingJourney is instant_book,the value of turnaroundType must be set | turnaroundType must be provided when property.bookingJourney is CONNECT |
| If property bookingJourney is instant_book and the turnaroundType is fixed_days, the value of turnaroundTime must be set | turnaroundTime must be provided when property.bookingJourney is CONNECT and turnaroundType is FIXED_DAYS |
| DiscountValue should be null when DiscountType is NO_DISCOUNT | discount.discountValue must be null when discount.discountType is NO_DISCOUNT |
| DiscountValue should not be null when DiscountType is not NO_DISCOUNT | discount.discountValue cannot be null when discount.discountType is not NO_DISCOUNT |
Delete Rate Availability
-
API: deleteRateAvailability
-
Purpose & Use Cases: Delete the listing for the room.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| id | DecodedListingID | Yes | Identifier for the object |
QUERY
mutation DeleteRateAvailability($input: DeleteRateAvailabilityInput!) {
deleteRateAvailability(input: $input) {
result
}
}
GRAPHQL VARIABLES
{
"input": {
"id": "eyJ0eXBlIjoiTGlzdGluZyIsImlkIjoxMDAwMzA1ODAwfQ"
}
}
- Response:
{
"data": {
"deleteRateAvailability": {
"result": true
}
}
}
Get Rate Availability
-
API: getRateAvailability
-
Purpose & Use Cases: Retrieve the listing of a room by its unique ID.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| id | ID | No | Identifier for the object |
| rateAvailabilityExternalId | NonEmptyString | No | External Identifier for rate availability |
| propertyExternalId | NonEmptyString | Yes when listing is obtained through rateAvailabilityExternalId | External Identifier for the property |
QUERY
query GetRateAvailability($getRateAvailabilityId: ID,
$propertyExternalId: String,
$rateAvailabilityExternalId: String) {
getRateAvailability(id: $getRateAvailabilityId,
propertyExternalId: $propertyExternalId,
rateAvailabilityExternalId: $rateAvailabilityExternalId) {
rateAvailability {
id
roomId
externalId
tenancy {
moveIn
moveOut
moveInType
moveOutType
tenancyLengthType
tenancyLengthValue
}
availability
bookableFrom
bookableTo
priceMin
priceMax
discount {
discountType
discountValue
}
availableThoughMoveInDatePassed
turnaroundType
turnaroundTime
}
}
}
GRAPHQL VARIABLES
{
"rateAvailabilityExternalId": "update listing externalId01",
"propertyExternalId": "update property externalId"
}
- Response:
{
"data": {
"getRateAvailability": {
"rateAvailability": {
"id": "eyJ0eXBlIjoiTGlzdGluZyIsImlkIjoxMDAwMzA1ODAwfQ==",
"roomId": "eyJ0eXBlIjoiVW5pdFR5cGUiLCJpZCI6MTAwNzUyMDh9",
"externalId": "update listing externalId01",
"tenancy": {
"moveIn": null,
"moveOut": null,
"moveInType": "ANYTIME",
"moveOutType": "ANYTIME",
"tenancyLengthType": "NOT_SPECIFIC",
"tenancyLengthValue": null
},
"availability": 999,
"bookableFrom": "2025-05-01",
"bookableTo": "9999-12-31",
"priceMin": "123.00",
"priceMax": null,
"discount": {
"discountType": null,
"discountValue": null
},
"availableThoughMoveInDatePassed": false,
"turnaroundType": null,
"turnaroundTime": null
}
}
}
}
- Error Message:
| Error Message | Description |
|---|---|
| permission rule cannot execute with invalid id | Unable to fetch the listing by the provided id parameter |
| only one id is needed | Both id and externalId cannot be provided simultaneously in the parameters |
| id is required — at least one id must be provided | either id nor externalId is provided in the parameters |
| externalPropertyId is required when using externalId on this endpoint | propertyExternalId is required when externalId is provided in the parameters |
| Property ${propertyExternalId} does not belong to you | The provided propertyExternalId does not belong to the landlord |
Get Rate Availabilities
-
API: getRateAvailabilities
-
Purpose & Use Cases: Retrieve all listings for the room.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| roomId | ID | Yes | Identifier for the room object |
| pageNumber | Int | No | The number of the page |
| pageSize | Int | No | The size of the page |
QUERY
query GetRateAvailabilities($roomId: ID!, $pageNumber: Int, $pageSize: Int) {
getRateAvailabilities(roomId: $roomId, pageNumber: $pageNumber, pageSize: $pageSize) {
pageInfo {
total
totalPages
currentPage
pageSize
}
rateAvailabilities {
id
roomId
externalId
tenancy {
moveIn
moveOut
moveInType
moveOutType
tenancyLengthType
tenancyLengthValue
}
availability
bookableFrom
bookableTo
priceMin
priceMax
discount {
discountType
discountValue
}
availableThoughMoveInDatePassed
turnaroundType
turnaroundTime
}
}
}
GRAPHQL VARIABLES
{
"roomId": "eyJ0eXBlIjoiVW5pdFR5cGUiLCJpZCI6MTAwNzUyMDd9",
"pageNumber": 1,
"pageSize": 1
}
- Response:
{
"data": {
"getRateAvailabilities": {
"pageInfo": {
"total": 1,
"totalPages": 1,
"currentPage": 1,
"pageSize": 1
},
"rateAvailabilities": [
{
"id": "eyJ0eXBlIjoiTGlzdGluZyIsImlkIjoxMDAwMzA1Nzk5fQ==",
"roomId": "eyJ0eXBlIjoiVW5pdFR5cGUiLCJpZCI6MTAwNzUyMDd9",
"externalId": "create listing externalId01",
"tenancy": {
"moveIn": null,
"moveOut": null,
"moveInType": "ANYTIME",
"moveOutType": "ANYTIME",
"tenancyLengthType": "NOT_SPECIFIC",
"tenancyLengthValue": null
},
"availability": 999,
"bookableFrom": "2025-05-01",
"bookableTo": "9999-12-31",
"priceMin": "123.00",
"priceMax": null,
"discount": {
"discountType": null,
"discountValue": null
},
"availableThoughMoveInDatePassed": false,
"turnaroundType": null,
"turnaroundTime": null
}
]
}
}
}
- Error Message:
| Error Message | Description |
|---|---|
| permission rule cannot execute with invalid id | Unable to fetch the room by the provided roomId parameter |
RateAvailability Object
| Attribute Name | Data Type | Details |
|---|---|---|
| id | DecodedListingID | Identifier for the object |
| externalId | NonEmptyString | External identifier for the object |
| roomId | DecodedUnitTypeID | Identifier for the related Room object |
| bookableFrom | Date | Start date of availability in format ISO 8601 (YYYY-MM-DD) |
| bookableTo | Date | End date of availability in format ISO 8601 (YYYY-MM-DD) |
| availability | Int | Available inventory for the room |
| tenancy | TenancyInput | Lease mode for this rate availability; TenancyInput is an object includes, moveIn: Date, moveOut: Date, moveInType: MoveInType!, moveOutType: MoveOutType!, tenancyLengthType: TenancyLengthType!, tenancyLengthValue: Int[]; MoveInType has possible values: EXACTLY_MATCH AFTER ANYTIMEMoveOutType has possible values: EXACTLY_MATCH BEFORE ANYTIMETenancyLengthType has possible values: EQUALS NO_LESS_THAN NO_MORE_THAN BETWEEN NOT_SPECIFIC |
| discount | Discount | Discount for the tenancy; DiscountInput is an object includes, discountType: DiscountType!, discountValue: NonEmptyString; DiscountType has possible values: ABSOLUTE PERCENTAGE NO_DISCOUNT |
| priceMin | NonEmptyString | Minimum price for this rate availability |
| priceMax | String | Maximum price for this rate availability |