Hotel Policy Collection
API methods to work with Property Policy Collection
Hotel Policy is entity to represent general rules applicable at Property.
Hotel Policy List
Retrieve list of Hotel Policies associated with user Properties.
Request:
GET https://staging.channex.io/api/v1/hotel_policiesPagination
By default, this method return first 10 element. To get more details, you should use Pagination arguments.
Information about count of entities and current pagination position contained at meta section at response object.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Hotel Policy objects in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Get Hotel Policy by ID
Retrieve specific Hotel Policy by ID.
Request:
GET https://staging.channex.io/api/v1/hotel_policies/:idReturns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Hotel Policy object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided or User not have access to requested Hotel Policy.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Hotel Policy with provided ID is not present at system.
Create Hotel Policy
Create new Hotel Policy.
Request:
POST https://staging.channex.io/api/v1/hotel_policiesQuery body (JSON):
{
"hotel_policy": {
"title": "Hotel Policy",
"currency": "GBP",
"is_adults_only": false,
"max_count_of_guests": 20,
"checkin_time": "14:00",
"checkout_time": "13:00",
"internet_access_type": "wifi",
"internet_access_cost": null,
"internet_access_coverage": "entire_property",
"parking_type": "on_site",
"parking_reservation": "needed",
"parking_is_private": true,
"pets_policy": "allowed",
"pets_non_refundable_fee": "0.00",
"pets_refundable_deposit": "0.00",
"smoking_policy": "no_smoking"
}
}Fields
title [required]
String with Hotel Policy title.
currency [required]
3 symbols long string with Currency Alphabetic code based at ISO 4217.
is_adults_only [optional]
Boolean value to represent allow Property children or not.
max_count_of_guests [required]
Any positive number that represent how many guests can stay at Property at same time.
checkin_time [required]
Default checkin time in HH:MM format.
checkout_time [required]
Default checkout time in HH:MM format.
internet_access_type [required]
One of predefined values: none, wifi, wired.
internet_access_coverage [required]
One of predefined values: entire_property, public_areas, all_rooms, some_rooms, business_centre.
internet_access_cost [optional]
Null or position number. Field represent cost of internet access. If internet access is free, leave this field empty by passing null value.
parking_type [required]
One of predefined values: on_site, nearby, none.
parking_reservation [required]
One of predefined values: not_available, not_needed, needed.
parking_is_private [required]
Boolean value to represent type of parking.
pets_policy [required]
One of predefined values: allowed, not_allowed, by_arrangements, assistive_only.
pets_non_refundable_fee [required]
Positive number. If your property charge non refundable fee for pets accommodation, provide it amount here.
pets_refundable_deposit [required]
Positive number. If your property charge refundable deposit for pets accommodation, provide it amount here.
smoking_policy [required]
One of predefined values: no_smoking, permitted_areas_only, allowed.
Returns
Success
Method can return a Success result with 201 Created HTTP Code if operation is successful. Will contain a Hotel Policy object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Validation Error
Method can return a Validation Error result with 422 Unprocessable Entity HTTP Code if any validation rule is failed.
Update Hotel Policy
Update Hotel Policy.
Request:
PUT https://staging.channex.io/api/v1/hotel_policies/:idQuery body (JSON):
{
"hotel_policy": {
"title": "Hotel Policy",
"currency": "GBP",
"is_adults_only": false,
"max_count_of_guests": 20,
"checkin_time": "14:00",
"checkout_time": "13:00",
"internet_access_type": "wifi",
"internet_access_cost": null,
"internet_access_coverage": "entire_property",
"parking_type": "on_site",
"parking_reservation": "needed",
"parking_is_private": true,
"pets_policy": "allowed",
"pets_non_refundable_fee": "0.00",
"pets_refundable_deposit": "0.00",
"smoking_policy": "no_smoking"
}
}Fields
This method use same fields as Create Hotel Policies method.
Returns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Hotel Policy object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Hotel Policy with provided ID is not present at system.
Validation Error
Method can return a Validation Error result with 422 Unprocessable Entity HTTP Code if any validation rule is failed.
Remove Hotel Policy
Remove Hotel Policy.
Request:
DELETE https://staging.channex.io/api/v1/hotel_policies/:idReturns
Success
Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Meta object with message in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found HTTP Code if Hotel Policy with provided ID is not present at system.
Last updated
Was this helpful?