{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b9a9570a-cf17-4da0-a98e-48f75bab1bad","name":"Channex API v.1.0","description":"Documentation for Channex HTTP JSON-based API version 1.0\n\n**WARNING!** There is draft version and can't be used for implementation.\n\nIf you have any comments, suggestions or recomendations, please let us know via andrew@channex.io\n\n## API Reference\n\nThe Channex.io API is organized around REST. Our API has 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.\n\nAPI support `GET`, `POST`, `PUT` and `DELETE` queries.\n\nEach response is valid JSON object and **MUST** contain at least one key: `error`, `meta` or `data`.\n\nIf response has success status, it **MUST** contain `data` or `meta` key at response object.\n\n`data` object **CAN** be an Object or Array of Objects.\n\nEach `data` object contain `type` and `attributes` keys with response object defenition.\n```\n{\n    \"meta\": {\n        \"message\": \"Human readability message\"\n    },\n    \"data\": {\n        \"type\": \"session\",\n        \"attributes\": {\n            \"token\": \"Bearer Access Token\",\n            \"email\": \"test@test.com\"\n        }\n    }\n}\n```\n\nEach `POST` or `PUT` query **MUST** conatin a valid JSON Object and use `type` of passed object as key for data.\n\n```\n{\n\t\"user\": {\n\t\t\"email\": \"test@test.com\"\n\t}\n}\n```\nWhere `user` is `type` of passed entity.\n\n## Authentication\n\nChannex.io supports [JSON Web Token](https://jwt.io/) authentication method.\n\nFor better user experience our API allow user access to system immediate after registration without confirm email address. Queryes `sign_up`, `sign_in`, `confirm` return `session` object with `token`, use that token as Bearer Token to authorize user at server.\n\n## Errors\n\nChannex.io uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Channex.io servers.\n\nEach error response **MUST** include `errors` Object with error details.\n```\n{\n    \"errors\": {\n        \"details\": {\n            \"is_active\": [\n                \"can't be blank\"\n            ]\n        },\n        \"code\": \"validation_error\",\n        \"title\": \"Validation Error\"\n    }\n}\n```\n\n## Status Codes\n\n`200 OK` Success Response\n\n`400 Bad Request` The request was unacceptable, often due to missing a required parameter.\n\n`401 Unauthorized` No valid Bearer token provided.\n\n`403 Forbidden` Access forbidden.\n\n`404 Not Found` The requested resource doesn't exist.\n\n`422 Unprocessable Entity` Validation Error.\n\n## Filtering data arguments\n\nAPI support filtering queries.\n\nBasic query:\n```\n/api/COLLECTION_NAME/?filter[hotel_uuid]=HOTEL_UUID\n```\n\nMultiple values:\n```\n/api/COLLECTION_NAME/?filter[hotel_uuid]=HOTEL_UUID1,HOTEL_UUID2\n```\n\nMultiple fields:\n```\n/api/COLLECTION_NAME/?filter[hotel_uuid]=HOTEL_UUID&filter[room_type_uuid]=ROOM_TYPE_UUID\n```\n\nComparison operations:\n```\n/api/COLLECTION_NAME/?filter[hotel_uuid]=HOTEL_UUID&filter[date][gte]=DATE_FROM&filter[date][lte]=DATE_TO\n```\nSupported coparison operators:\n- gt (greater than)\n- gte (greater than or equal)\n- lt (less than)\n- lte (less than or equal)\n- eq (equal to) default operation if you pass value after `=` symbol\n- not (not equal to)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"681982","team":932099,"collectionId":"b9a9570a-cf17-4da0-a98e-48f75bab1bad","publishedId":"RWgm4Lxx","public":true,"publicUrl":"https://documenter-api.postman.tech/view/681982/RWgm4Lxx","privateUrl":"https://go.postman.co/documentation/681982-b9a9570a-cf17-4da0-a98e-48f75bab1bad","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.11.6","publishDate":"2018-10-03T08:18:24.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Staging Server","id":"f959dbbd-6bba-4b97-890f-f0f887f598ed","owner":"681982","values":[{"description":{"content":"","type":"text/plain"},"value":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhcGkiLCJleHAiOjE1NDQxODMxNDksImlhdCI6MTU0MTU5MTE0OSwiaXNzIjoiYXBpIiwianRpIjoiY2JiOWYzNzctNDhlYy00Mjk3LTllY2YtZTk4MzE0NGY3NzEwIiwibmJmIjoxNTQxNTkxMTQ4LCJzdWIiOiJhY2VhYWNiNi1kODMxLTQyMWQtYjRiZC0wZjcxMjAxNDkwMjgiLCJ0eXAiOiJhY2Nlc3MifQ.m_qA6x_WmZEUKICtUfl9-Fjbyp8zp6NSofXlXhv_t-O83mHR1yQbvFfzXA46bU9dUcebXhye37DcoJYV0AVTpg","key":"auth_token","enabled":true},{"description":{"content":"","type":"text/plain"},"value":"http://staging.channex.io","key":"server","enabled":true},{"description":{"content":"","type":"text/plain"},"value":"cb2bfcc3-43d3-4b54-b55b-97124f0dd195","key":"hotel_uuid","enabled":true},{"description":{"content":"","type":"text/plain"},"value":"11bcbe7d-5c29-4fcd-b238-129c9bed9cea","key":"room_type_uuid","enabled":true},{"description":{"content":"","type":"text/plain"},"value":"6957cb85-8c67-46b6-80f0-34d01f15e039","key":"rate_plan_uuid","enabled":true},{"description":{"content":"","type":"text/plain"},"value":"185b8a03-3611-4a2e-a2e9-e5f96c772143","key":"channel_uuid","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/6f593d6b68f63176f838363560edac1706ebf89e3706bc238f0b70ec745e6858","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Staging Server","value":"681982-f959dbbd-6bba-4b97-890f-f0f887f598ed"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/RWgm4Lxx"}