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
  • Help
  • API Reference
  • Authentication
  • API Key Access
  • Errors
  • Status Codes
  • Pagination
  • Order
  • Filtering data arguments
  • Basic Concept
  • Supported comparison operators
  • Examples
  • API Sandbox Server

Was this helpful?

  1. FOR PMS

API Reference

Documentation for Channex.io HTTP JSON-based API version 1.0

PreviousOpen Channel APINextAPI Rate Limits

Last updated 8 days ago

Was this helpful?

Help

If you have any comments, suggestions or recommendations, please let us know via .

API Reference

The API is organised around REST. Our API has a predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application. JSON is returned by all API responses, including errors.

API support GET, POST, PUT and DELETE queries.

Each response is valid JSON object and MUST contain at least one key: error, meta or data.

If response has success status, it MUST contain data or meta key at response object.

data object CAN be an Object or Array of Objects.

Each data object contain type and attributes keys with response object definition.

{
  "meta": {
    "message": "Human readability message"
  },
  "data": {
    "type": "session",
    "attributes": {
      "field": "value"
    }
  }
}

Each POST or PUT query MUST contain a valid JSON Object and use type of passed object as key for data.

{
  "user": {
    "email": "test@test.com"
  }
}

Where user is type of passed entity.

Authentication

Channex.io supports API key access, which can be created in the user profile section of an account with an active subscription.

API Key Access

Authentication method, where previously generated API Key is used to sign requests:

GET https://staging.channex.io/api/v1/properties/ HTTP/1.1
Host: staging.channex.io
Content-Type: application/json
user-api-key: uU08XiMgk8a7CrY4xUjAReUIuTrn83R123adaVb8Tf/qMcVTEgriuJhXWs/1Q1P

Errors

Channex uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicates success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, validation errors, etc.). Codes in the 5xx range indicates an error with the Channex servers and you should retry.

Each error response MUST include errors Object with error details.

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

Errors Object MUST include code and title fields, other fields is optional.

Status Codes

200 OK Success Response

400 Bad Request The request was unacceptable, often due to missing a required parameter.

401 Unauthorized No valid API Key provided.

403 Forbidden Access forbidden. User does not have rights to call this action.

404 Not Found The requested resource doesn't exist.

422 Unprocessable Entity Validation Error.

Pagination

Most List API endpoints at Channex by default returns only first 10 elements. To get more elements you should implement Pagination traversing logic. To work with pagination, use next arguments:

GET https://staging.channex.io/api/v1/{{resource}}?pagination[page]={{X}}&pagination[limit]={{Y}}

Where resource is requested endpoint, X - number of requested page, Y - count of elements at response.

Please, keep in mind, page counted from 1. Max limit value is 100.

To control how much elements associated with current account, you can use meta section from response:

...
"meta": {
  "limit": 10,
  "page": 1,
  "total": 4
}
...

Order

The most List API Endpoints at Channex support order arguments to get the elements in order. Order field and direction should be provided as a GET argument:

GET https://staging.channex.io/api/v1/{{resource}}?order[{{field}}]={{direction}}

Where field is a field name for sort, direction has two possible values (asc or desc).

Most endpoints by default sort entities by title field at ascending direction.

Filtering data arguments

Most API endpoints in Channex supports filtering data arguments. Our filtering API provide operations to comparison and inclusion checks.

Basic Concept

Filtering arguments are passed as regular GET arguments in the query string under the filter prefix. Each field should be wrapped into square brackets: filter[field]. To pass list of possible values, use comma symbol: filter[field]=value1,value2.

By default symbol = mean comparison operator is equal if single value passed or is includes if list of values passed. But you can use other operators, like greater then or less then by passing it as second argument for filter: filter[field][gte]=value or filter[field][lte]=value. You can use more then one comparison operator for one field, to build conditions like DATE greater then 2019-01-01 and less then 2019-02-01.

Supported comparison operators

  • gt (greater than)

  • gte (greater than or equal)

  • lt (less than)

  • lte (less than or equal)

  • eq (equal to) default operation if you pass value after = symbol

  • not (not equal to)

Examples

Basic Comparison

Field equal provided value.

{{API_ENDPOINT}}/?filter[property_id]={{PROPERTY_ID}}

Multiple values

Field should be equal to at least one values from provided list.

{{API_ENDPOINT}}/?filter[property_id]={{PROPERTY_ID1}},{{PROPERTY_ID2}}

Multiple fields

Pass several filter arguments.

{{API_ENDPOINT}}/?filter[property_id]={{PROEPRTY_ID}}&filter[room_type_id]={{ROOM_TYPE_ID}}

Comparison operations

Use greater then and less then comparison operations

{{API_ENDPOINT}}/?filter[date][gte]={{DATE_FROM}}&filter[date][lte]={{DATE_TO}}

API Sandbox Server

For easy access to our API and to make some tests we have prepared a sandbox server that you can use to integrate. You can sign up yourself and create an API key in the user profile area of the admin.

https://staging.channex.io

Please, read this to get more information.

support@channex.io
Channex.io
article