Channex.io
  • Channex.io Documentation
  • About Channex & FAQ
  • Changelog
  • For OTA
    • Intro
    • Channex Shopping API
    • Open Channel API
  • FOR PMS
    • API Reference
    • API Rate Limits
    • Property Size Limits
    • Properties Collection
    • Property Users Collection
    • Groups Collection
    • Group Users Collection
    • Room Types Collection
    • Rate Plans Collection
    • Availability and Rates
    • Webhook Collection
    • Bookings Collection
    • Channel API
    • Photos Collection
    • Hotel Policy Collection
    • Facilities Collection
    • Taxes and Tax Sets
    • Messages Collection
    • Reviews Collection
    • Channel Codes
    • Channel IFrame
    • PMS Certification Tests
  • Guides
    • PMS Integration Guide
    • Best Practices Guide
    • Test Account for Booking.com
    • Test Accounts for Airbnb
    • Channex Retention Periods
    • Guide to PCI
  • Application Documentation
    • Overview of App Documentation
    • Dashboard
    • Properties and Groups Management
    • Property Tasks
    • Rooms Management
    • Inventory Management
    • Channels Management
    • Channel Log
    • Bookings Management
    • Availability Rules
    • API Key Access
    • Change Log Feature
  • Google Guide
    • Connect Google Channel
    • Google Vacation Rental
    • My Hotel Shop (MHS) Google
  • Channel Mapping Guides
    • Agoda
    • Airbnb
    • Booking.com
    • Ctrip / Trip.com
    • Despegar
    • Dida Travel
    • Emerging Travel
    • Expedia
    • Feratel
    • Getaroom
    • Hipcamp
    • Hostelworld
    • Hopper
    • Hopper Homes
    • Hotelbeds
    • HotelTonight
    • HyperGuest
    • HRS
    • Inntopia
    • Instant Booking Page
    • MakeMyTrip / Goibibo
    • Mg Bedbank
    • OpenGDS
    • Roibos
    • Traveloka
    • Tiket.com
    • VRBO
  • App Guide
    • Apaleo
    • PCI App
Powered by GitBook
On this page
  • Hotel Policy List
  • Pagination
  • Returns
  • Get Hotel Policy by ID
  • Returns
  • Create Hotel Policy
  • Fields
  • Returns
  • Update Hotel Policy
  • Fields
  • Returns
  • Remove Hotel Policy
  • Returns

Was this helpful?

  1. FOR PMS

Hotel Policy Collection

API methods to work with Property Policy Collection

PreviousPhotos CollectionNextFacilities Collection

Last updated 4 years ago

Was this helpful?

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_policies

Success Response Example

Status Code: 200 OK

{
  "data": [
    {
      "attributes": {
        "checkin_time": "14:00",
        "checkout_time": "13:00",
        "currency": "GBP",
        "id": "cfe101bf-126c-4031-8d73-27739929329a",
        "internet_access_cost": null,
        "internet_access_coverage": "entire_property",
        "internet_access_type": "wifi",
        "is_adults_only": false,
        "max_count_of_guests": 20,
        "parking_is_private": true,
        "parking_reservation": "needed",
        "parking_type": "on_site",
        "pets_non_refundable_fee": "0.00",
        "pets_policy": "allowed",
        "refundable_deposit": "0.00",
        "smoking_policy": "no_smoking",
        "title": "Hotel Policy"
      },
      "id": "cfe101bf-126c-4031-8d73-27739929329a",
      "type": "hotel_policy"
    }
  ],
  "meta": {
    "limit": 10,
    "page": 1,
    "total": 1
  }
}

Unauthorised Error Response

Status Code: 401 Unauthorized

{
  "errors": {
    "code": "unauthorized",
    "title": "Unauthorized"
  }
}

Pagination

By default, this method return first 10 element. To get more details, you should use 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/:id

Success Response Example

Status Code: 200 OK

{
  "data": {
    "attributes": {
      "checkin_time": "14:00",
      "checkout_time": "13:00",
      "currency": "GBP",
      "id": "cfe101bf-126c-4031-8d73-27739929329a",
      "internet_access_cost": null,
      "internet_access_coverage": "entire_property",
      "internet_access_type": "wifi",
      "is_adults_only": false,
      "max_count_of_guests": 20,
      "parking_is_private": true,
      "parking_reservation": "needed",
      "parking_type": "on_site",
      "pets_non_refundable_fee": "0.00",
      "pets_policy": "allowed",
      "refundable_deposit": "0.00",
      "smoking_policy": "no_smoking",
      "title": "Hotel Policy"
    },
    "id": "cfe101bf-126c-4031-8d73-27739929329a",
    "type": "hotel_policy"
  }
}

Unauthorised Error Response

Status Code: 401 Unauthorized

{
  "errors": {
    "code": "unauthorized",
    "title": "Unauthorized"
  }
}

Not Found Error

Status Code: 404 Not Found

{
  "errors": {
    "code": "not_found",
    "title": "Resouce Not Found"
  }
}

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 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_policies

Query 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"
  }
}

Success Response Example

Status Code: 201 Created

{
  "data": {
    "attributes": {
      "checkin_time": "14:00",
      "checkout_time": "13:00",
      "currency": "GBP",
      "id": "cfe101bf-126c-4031-8d73-27739929329a",
      "internet_access_cost": null,
      "internet_access_coverage": "entire_property",
      "internet_access_type": "wifi",
      "is_adults_only": false,
      "max_count_of_guests": 20,
      "parking_is_private": true,
      "parking_reservation": "needed",
      "parking_type": "on_site",
      "pets_non_refundable_fee": "0.00",
      "pets_policy": "allowed",
      "refundable_deposit": "0.00",
      "smoking_policy": "no_smoking",
      "title": "Hotel Policy"
    },
    "id": "cfe101bf-126c-4031-8d73-27739929329a",
    "type": "hotel_policy"
  }
}

Unauthorised Error Response

Status Code: 401 Unauthorized

{
  "errors": {
    "code": "unauthorized",
    "title": "Unauthorized"
  }
}

Validation Error Response

Status Code: 422 Unprocessable Entity

{
  "errors": {
    "code": "validation_error",
    "title": "Validation Error",
    "details": {
      "title": [
        "can't be blank"
      ]
    }
  }
}

Fields

title [required]

String with Hotel Policy title.

currency [required]

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/:id

Query 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"
  }
}

Success Response Example

Status Code: 200 OK

{
  "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_type": "free",
    "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"
  }
}

Unauthorised Error Response

Status Code: 401 Unauthorized

{
  "errors": {
    "code": "unauthorized",
    "title": "Unauthorized"
  }
}

Not Found Error

Status Code: 404 Not Found

{
  "errors": {
    "code": "resource_not_found"
    "title": "Resource Not Found"
  }
}

Validation Error Response

Status Code: 422 Unprocessable Entity

{
  "errors": {
    "code": "validation_error",
    "title": "Validation Error",
    "details": {
      "url": [
        "can't be blank"
      ]
    }
  }
}

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/:id

Success Response Example

Status Code: 200 OK

{
  "meta": {
    "message": "Success"
  }
}

Unauthorised Error Response

Status Code: 401 Unauthorized

{
  "errors": {
    "code": "unauthorized",
    "title": "Unauthorized"
  }
}

Not Found Error

Status Code: 404 Not Found

{
  "errors": {
    "code": "resource_not_found"
    "title": "Resource Not Found"
  }
}

Returns

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.

3 symbols long string with Currency Alphabetic code based at .

Pagination
ISO 4217