Channex.io
Search…
Bookings Collection
API methods to work with bookings
At Channex we have several different methods to work with Bookings, such as List of Bookings, Booking Revision Feed and etc.
Each Booking at Channex is a representation of latest known Booking Revision, where Booking Revision is parsed and normalised message from OTA.
If you would like build a PMS integration, you should use Booking Revision Feed API, to fetch booking messages and modify bookings at your side. For initial pull, you can use Booking List API or Booking Revision Feed.

Message Structures

Booking Revision

id Unique Booking Revision identification record at Channex internal system
property_id ID of associated Property.
unique_id Unique Booking identification record combined from OTA Code and OTA Reservation Code. Usually this value is same for all booking revisions.
system_id Unique message identification record at Booking Source platform, unique per revision. Used to detect have we that message or not.
ota_reservation_code Original Reservation Code at platform, where guest create booking. Usually same for all booking revisions. Unique per booking message.
ota_name Name of OTA where booking was originally created
status Status of Booking Revision, can be one of three values: new, modified, cancelled.
rooms List of Booking Room objects.
services List of Booking Service objects.
guarantee Guarantee details object. Represent credit card provided with booking.
customer Object with information about Customer.
occupancy Object with information about total Booking Occupancy, provide three keys: adults, children and infants.
arrival_date Arrival Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
departure_date Departure Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
arrival_hour Arrival Time represented as string with time in HH:MM format at 24h.
amount Total booking amount.
currency Booking currency code.
notes Customer notes for booking.
payment_collect Information about who should collect Payment. Can be property if payment should be collected by property, ota if guest already pay at OTA and null if value is not specified. Usually null mean that property will collect payment.
payment_type Information about how payment should be collected. Can be credit_card if booking have associated credit card for payment, bank_transfer if OTA will pass payment through Bank Transfer, and null if payment type is not specified.
inserted_at Timestamp, when Booking Revision was received at Channex.io

Booking Room

checkin_date Checkin Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
checkout_date Checkout Date represented as string with date in ISO 8601 format by mask YYYY-MM-DD.
rate_plan_id Associated Rate Plan identification record. Null value if the room is not mapped.
room_type_id Associated Room Type identification record. Null if the room is not mapped.
occupancy Object with information about Booking Room Occupancy, provide three keys: adults, children and infants.
guests List with objects of guests info. Will contain name and surname of guest if it is available for specific OTA.
services List with associated services (same as Booking Service, but at Room level).
taxes List with information about associated taxes.
amount Total Booking Room amount
days Price breakdown per day of stay. Have next structure:
1
"days": {
2
"2019-05-09": "100.00"
3
}
Copied!

Booking Service

name String value with service name in English language
nights Integer value represents number of nights this customer has booked the service for.
persons Integer number represents number of persons this service is booked for
price_mode String value with Price mode value (per stay, per night, per person per night).
price_per_unit Numeric value represented as String with unitary price for this service
total_price Numeric value represented as String with total calculated price for this service.

Guarantee

This object represent information about credit card provided as payment guarantee.
Example:
1
{
2
"card_number": "411111******1111",
3
"card_type": "MC",
4
"cardholder_name": "Bookingcom Agent",
5
"cvv": "***",
6
"expiration_date": "12/2021",
7
"is_virtual": true,
8
"meta": {
9
"virtual_card_currency_code": "EUR",
10
"virtual_card_current_balance": "6755",
11
"virtual_card_decimal_places": "2",
12
"virtual_card_effective_date": "2020-09-12",
13
"virtual_card_expiration_date": "2021-09-12"
14
},
15
"token": "*****************"
16
}
Copied!
card_number Masked credit card number
card_type Card type code.
cardholder_name Cardholder name
cvv Masked CVV / CVC. For non-secure connections always equal to ***
expiration_date Credit card expiration date in MM/YYYY format
is_virtual Boolean flag to represent virtual credit cards
token PCI-safety token from Channex (To be depreciated)
meta Object with additional information about credit card. Please, keep in mind, this value available only for Booking.com bookings right now and some Expedia bookings. - virtual_card_currency_code Currency of virtual credit card - virtual_card_current_balance Information about initial balance on virtual credit card. Represented as String value. - virtual_card_decimal_places Count of decimal places at provided balance value - virtual_card_effective_date Date, when virtual credit card will be active for charges - virtual_card_expiration_date Virtual credit card expiration date

Taxes

Information about Taxes associated with Booking Room.
Example:
1
[
2
{
3
"is_inclusive": false,
4
"name": "Additional Guest Fee"
5
"total_price": "29.57"
6
"type": "fee"
7
}
8
]
Copied!
is_inclusive Boolean marker to show included tax into Room Price or not.
name Name of tax
total_price Total price of tax
type Represent type of tax (fee, tax, city_tax).

Notes about Guarantee details

Channex returns and receives information about Credit Card only to / from certified PCI DSS partners.
Following PCI DSS rules and security standards at industry, Channex pass PCI DSS certification and handle Credit Card information at secure mode.
If your application would like to receive information about Credit Cards you should change your target endpoint to receive bookings from staging.channex.io to secure-staging.channex.io. At production environment, you should use secure.channex.io endpoint.
Before you start use secure endpoint, please contact with us through [email protected] and provide us list of your IP address that should be white-listed and your PCI DSS certificate.

Bookings List

Retrieve list of Bookings associated with User Channels.
Request
Success Response
Error Response
Request:
1
GET https://staging.channex.io/api/v1/bookings
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"meta": {
3
"total": 1,
4
"page": 1,
5
"limit": 10
6
},
7
"data": [
8
{
9
"type": "booking",
10
"id": "603e8e9e-cc67-4ca7-bd13-3c407c6c3bbd",
11
"attributes": {
12
"id": "603e8e9e-cc67-4ca7-bd13-3c407c6c3bbd",
13
"property_id": "716305c4-561a-4561-a187-7f5b8aeb5920",
14
"revision_id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
15
"unique_id": "BDC-1556013801",
16
"ota_reservation_code": "1556013801",
17
"ota_name": "Booking.com",
18
"status": "new",
19
"rooms": [
20
{
21
"amount": "200.00",
22
"checkin_date": "2019-04-26",
23
"checkout_date": "2019-04-27",
24
"rate_plan_id": "445835fb-7956-42ac-9efc-3e6f331f0808",
25
"room_type_id": "994d1375-dbbd-4072-8724-b2ab32ce781b",
26
"days": {
27
"2019-04-26": "200.00"
28
},
29
"occupancy": {
30
"adults": 2,
31
"children": 0,
32
"infants": 0
33
}
34
}
35
],
36
"services": [
37
{
38
"type": "Breakfast",
39
"total_price": "20.00",
40
"price_per_unit": "10.00",
41
"price_mode": "Per person per night",
42
"persons": 2,
43
"nights": 1,
44
"name": "Breakfast"
45
}
46
],
47
"guarantee": {
48
"expiration_date": "10/2020",
49
"cvv": "***",
50
"cardholder_name": "Channex User",
51
"card_type": "visa",
52
"card_number": "411111******1111"
53
},
54
"customer": {
55
"zip": "2031 BE",
56
"surname": "Channex",
57
"phone": "1234567890",
58
"name": "User",
59
"mail": "[email protected]",
60
"language": "en",
61
"country": "NL",
62
"city": "Haarlem",
63
"address": "JW Lucasweg 35"
64
},
65
"occupancy": {
66
"adults": 2,
67
"children": 0,
68
"infants": 0
69
},
70
"arrival_date": "2019-04-26",
71
"departure_date": "2019-04-27",
72
"arrival_hour": "10:00",
73
"amount": "220.00",
74
"currency": "GBP",
75
"notes": "You have a booker that would like free parking. (based on availability)\nYou have a booker that would prefer a quiet room. (based on availability)",
76
"inserted_at": "2019-04-23T10:03:29.335485"
77
}
78
}
79
],
80
"meta": {
81
"page": 1,
82
"total": 1,
83
"limit": 10
84
}
85
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!

Pagination and Filters

By default, this method returns the first 10 element. To get more details, you should use Pagination arguments. Information about the count of entities and current pagination position contained at meta section at response object.

Filter Examples

Filter By Arrival Date
Filter By Departure Date
Filter By Booking Date
1
GET https://staging.channex.io/api/v1/bookings?filter[arrival_date][gte]=2021-01-01&filter[arrival_date][lte]=2021-02-01
Copied!
1
GET https://staging.channex.io/api/v1/bookings?filter[departure_date][gte]=2021-01-01&filter[departure_date][lte]=2021-02-01
Copied!
1
GET https://staging.channex.io/api/v1/bookings?filter[inserted_at][gte]=2021-01-01T00:00:00&filter[inserted_at][lte]=2021-02-01T00:00:00
Copied!

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Booking objects in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Get Booking By ID

Retrieve specific Booking by ID. The response will be the latest booking revision details.
Request
Success Response
Error Response
Request:
1
GET https://staging.channex.io/api/v1/bookings/:id
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"data": {
3
"type": "booking",
4
"id": "603e8e9e-cc67-4ca7-bd13-3c407c6c3bbd",
5
"attributes": {
6
"id": "603e8e9e-cc67-4ca7-bd13-3c407c6c3bbd",
7
"revision_id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
8
"unique_id": "BDC-9996013801",
9
"ota_reservation_code": "9996013801",
10
"ota_name": "Booking.com",
11
"status": "new",
12
"rooms": [
13
{
14
"amount": "200.00",
15
"checkin_date": "2019-04-26",
16
"checkout_date": "2019-04-27",
17
"rate_plan_id": "445835fb-7956-42ac-9efc-3e6f331f0808",
18
"room_type_id": "994d1375-dbbd-4072-8724-b2ab32ce781b",
19
"days": {
20
"2019-04-26": "200.00"
21
},
22
"occupancy": {
23
"adults": 2,
24
"children": 0,
25
"infants": 0
26
}
27
}
28
],
29
"services": [
30
{
31
"type": "Breakfast",
32
"total_price": "20.00",
33
"price_per_unit": "10.00",
34
"price_mode": "Per person per night",
35
"persons": 2,
36
"nights": 1,
37
"name": "Breakfast"
38
}
39
],
40
"guarantee": {
41
"expiration_date": "10/2020",
42
"cvv": "***",
43
"cardholder_name": "Channex User",
44
"card_type": "visa",
45
"card_number": "411111******1111"
46
},
47
"customer": {
48
"zip": "2031 BE",
49
"surname": "Channex",
50
"phone": "1234567890",
51
"name": "User",
52
"mail": "[email protected]",
53
"language": "en",
54
"country": "NL",
55
"city": "Haarlem",
56
"address": "JW Lucasweg 35"
57
},
58
"occupancy": {
59
"adults": 2,
60
"children": 0,
61
"infants": 0
62
},
63
"arrival_date": "2019-04-26",
64
"departure_date": "2019-04-27",
65
"arrival_hour": "10:00",
66
"amount": "220.00",
67
"currency": "GBP",
68
"notes": "You have a booker that would like free parking. (based on availability)\nYou have a booker that would prefer a quiet room. (based on availability)",
69
"inserted_at": "2019-04-23T10:03:29.335485"
70
}
71
}
72
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!
Not Found Error
Status Code: 404 Not Found
1
{
2
"errors": {
3
"code": "not_found",
4
"title": "Resouce Not Found"
5
}
6
}
Copied!

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Booking 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 Booking with provided ID is not present at system.

Booking Revisions List

Retrieve list of Booking Revisions associated with User Channels.
Request
Success Response
Error Response
Request:
1
GET https://staging.channex.io/api/v1/booking_revisions
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"meta": {
3
"total": 1,
4
"page": 1,
5
"limit": 10
6
},
7
"data": [
8
{
9
"type": "booking_revision",
10
"id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
11
"attributes": {
12
"id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
13
"property_id": "716305c4-561a-4561-a187-7f5b8aeb5920",
14
"unique_id": "BDC-9996013801",
15
"system_id": "12331233123",
16
"ota_reservation_code": "9996013801",
17
"ota_name": "Booking.com",
18
"status": "new",
19
"rooms": [
20
{
21
"amount": "200.00",
22
"checkin_date": "2019-04-26",
23
"checkout_date": "2019-04-27",
24
"rate_plan_id": "445835fb-7956-42ac-9efc-3e6f331f0808",
25
"room_type_id": "994d1375-dbbd-4072-8724-b2ab32ce781b",
26
"days": {
27
"2019-04-26": "200.00"
28
},
29
"occupancy": {
30
"adults": 2,
31
"children": 0,
32
"infants": 0
33
}
34
}
35
],
36
"services": [
37
{
38
"type": "Breakfast",
39
"total_price": "20.00",
40
"price_per_unit": "10.00",
41
"price_mode": "Per person per night",
42
"persons": 2,
43
"nights": 1,
44
"name": "Breakfast"
45
}
46
],
47
"guarantee": {
48
"expiration_date": "10/2020",
49
"cvv": "***",
50
"cardholder_name": "Channex User",
51
"card_type": "visa",
52
"card_number": "411111******1111"
53
},
54
"customer": {
55
"zip": "2031 BE",
56
"surname": "Channex",
57
"phone": "1234567890",
58
"name": "User",
59
"mail": "[email protected]",
60
"language": "en",
61
"country": "NL",
62
"city": "Haarlem",
63
"address": "JW Lucasweg 35"
64
},
65
"occupancy": {
66
"adults": 2,
67
"children": 0,
68
"infants": 0
69
},
70
"arrival_date": "2019-04-26",
71
"departure_date": "2019-04-27",
72
"arrival_hour": "10:00",
73
"amount": "220.00",
74
"currency": "GBP",
75
"notes": "You have a booker that would like free parking. (based on availability)\nYou have a booker that would prefer a quiet room. (based on availability)",
76
"inserted_at": "2019-04-23T10:03:29.335485"
77
}
78
}
79
]
80
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Booking Revision objects in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Booking Revisions Feed

Retrieve a list of not acknowledged booking revisions associated with User Channels.
When you successfully get a booking via this method make sure you acknowledge the booking. Once you have acknowledged a booking this booking revision will not be provided in the feed again.
PMS is expected to Ack all bookings from Channex. To not ack bookings for any reason will mean the booking will be consistently provided in all feed calls.
Request
Success Response
Error Response
Request:
1
GET https://staging.channex.io/api/v1/booking_revisions/feed
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"meta": {
3
"total": 1,
4
"page": 1,
5
"limit": 10
6
},
7
"data": [
8
{
9
"type": "booking_revision",
10
"id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
11
"attributes": {
12
"id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
13
"property_id": "716305c4-561a-4561-a187-7f5b8aeb5920",
14
"unique_id": "BDC-9996013801",
15
"system_id": "12331233123",
16
"ota_reservation_code": "9996013801",
17
"ota_name": "Booking.com",
18
"status": "new",
19
"rooms": [
20
{
21
"amount": "200.00",
22
"checkin_date": "2019-04-26",
23
"checkout_date": "2019-04-27",
24
"rate_plan_id": "445835fb-7956-42ac-9efc-3e6f331f0808",
25
"room_type_id": "994d1375-dbbd-4072-8724-b2ab32ce781b",
26
"days": {
27
"2019-04-26": "200.00"
28
},
29
"occupancy": {
30
"adults": 2,
31
"children": 0,
32
"infants": 0
33
}
34
}
35
],
36
"services": [
37
{
38
"type": "Breakfast",
39
"total_price": "20.00",
40
"price_per_unit": "10.00",
41
"price_mode": "Per person per night",
42
"persons": 2,
43
"nights": 1,
44
"name": "Breakfast"
45
}
46
],
47
"guarantee": {
48
"expiration_date": "10/2020",
49
"cvv": "***",
50
"cardholder_name": "Channex User",
51
"card_type": "visa",
52
"card_number": "411111******1111"
53
},
54
"customer": {
55
"zip": "2031 BE",
56
"surname": "Channex",
57
"phone": "1234567890",
58
"name": "User",
59
"mail": "[email protected]",
60
"language": "en",
61
"country": "NL",
62
"city": "Haarlem",
63
"address": "JW Lucasweg 35"
64
},
65
"occupancy": {
66
"adults": 2,
67
"children": 0,
68
"infants": 0
69
},
70
"arrival_date": "2019-04-26",
71
"departure_date": "2019-04-27",
72
"arrival_hour": "10:00",
73
"amount": "220.00",
74
"currency": "GBP",
75
"notes": "You have a booker that would like free parking. (based on availability)\nYou have a booker that would prefer a quiet room. (based on availability)",
76
"inserted_at": "2019-04-23T10:03:29.335485"
77
}
78
}
79
]
80
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!

Note

If all Booking Revision is acknowledged this request will return an empty result.
If you want to get feed for a certain property you can use a filter:
1
GET https://staging.channex.io/api/v1/booking_revisions/feed?filter[property_id]=PROPERTY_ID
2
Copied!
You can order the revisions received from feed endpoint by the oldest first.
GET https://staging.channex.io/api/v1/booking_revisions/feed?order[inserted_at]=desc

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Booking Revision objects in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Get Booking Revision by ID

Retrieve specific Booking Revision by ID.
Request
Success Response
Error Response
Request:
1
GET https://staging.channex.io/api/v1/booking_revisions/:id
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"data": {
3
"type": "booking_revision",
4
"id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
5
"attributes": {
6
"id": "03dd7198-c5b7-493c-a889-74d0c2211de7",
7
"property_id": "716305c4-561a-4561-a187-7f5b8aeb5920",
8
"unique_id": "BDC-9996013801",
9
"system_id": "12331233123",
10
"ota_reservation_code": "9996013801",
11
"ota_name": "Booking.com",
12
"status": "new",
13
"rooms": [
14
{
15
"amount": "200.00",
16
"checkin_date": "2019-04-26",
17
"checkout_date": "2019-04-27",
18
"rate_plan_id": "445835fb-7956-42ac-9efc-3e6f331f0808",
19
"room_type_id": "994d1375-dbbd-4072-8724-b2ab32ce781b",
20
"days": {
21
"2019-04-26": "200.00"
22
},
23
"occupancy": {
24
"adults": 2,
25
"children": 0,
26
"infants": 0
27
}
28
}
29
],
30
"services": [
31
{
32
"type": "Breakfast",
33
"total_price": "20.00",
34
"price_per_unit": "10.00",
35
"price_mode": "Per person per night",
36
"persons": 2,
37
"nights": 1,
38
"name": "Breakfast"
39
}
40
],
41
"guarantee": {
42
"expiration_date": "10/2020",
43
"cvv": "***",
44
"cardholder_name": "Channex User",
45
"card_type": "visa",
46
"card_number": "411111******1111"
47
},
48
"customer": {
49
"zip": "2031 BE",
50
"surname": "Channex",
51
"phone": "1234567890",
52
"name": "User",
53
"mail": "[email protected]",
54
"language": "en",
55
"country": "NL",
56
"city": "Haarlem",
57
"address": "JW Lucasweg 35"
58
},
59
"occupancy": {
60
"adults": 2,
61
"children": 0,
62
"infants": 0
63
},
64
"arrival_date": "2019-04-26",
65
"departure_date": "2019-04-27",
66
"arrival_hour": "10:00",
67
"amount": "220.00",
68
"currency": "GBP",
69
"notes": "You have a booker that would like free parking. (based on availability)\nYou have a booker that would prefer a quiet room. (based on availability)",
70
"inserted_at": "2019-04-23T10:03:29.335485"
71
}
72
}
73
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!
Not Found Error
Status Code: 404 Not Found
1
{
2
"errors": {
3
"code": "not_found",
4
"title": "Resouce Not Found"
5
}
6
}
Copied!

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Booking Revision 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 Booking Revision with provided ID is not present at system.

Acknowledge Booking Revision receiving

Confirm receiving Booking Revision by creating an Acknowledge record.
Request
Success Response
Error Response
Request:
1
POST https://staging.channex.io/api/v1/booking_revisions/:id/ack
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"meta": {
3
"message": "Success"
4
}
5
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!
Not Found Error
Status Code: 404 Not Found
1
{
2
"errors": {
3
"code": "not_found",
4
"title": "Resouce Not Found"
5
}
6
}
Copied!

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. 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 Booking Revision with provided ID is not present at system.

Resend Booking Revision

Remove Acknowledge record from specific revision and expose Booking Revision for feed endpoint. This method allow to receive Booking Revision again.
Request
Success Response
Error Response
Request:
1
POST https://staging.channex.io/api/v1/booking_revisions/:id/resend
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"meta": {
3
"message": "Success"
4
}
5
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!
Not Found Error
Status Code: 404 Not Found
1
{
2
"errors": {
3
"code": "not_found",
4
"title": "Resouce Not Found"
5
}
6
}
Copied!

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. 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 Booking Revision with provided ID is not present at system.

Create Booking

API to push Booking into Channex.io.
Before create booking through API, you should create Booking Engine Channel at Channel Management screen of application. Then use created Channel ID as channel_id at new booking message.
Credit Card information can be provided into application only through secure endpoint (secure-staging.channex.io). If you try to push real credit card data into insecure endpoint, data will be masked and you can't use it in future processes. Please, contact with us through [email protected] to get details.
Request
Success Response
Error Response
Request:
1
POST https://staging.channex.io/api/v1/bookings/push
Copied!
Query body (JSON):
1
{
2
"booking": {
3
"status": "commit",
4
"channel_id": "677fb5f8-d7d7-4a65-a3e4-bf0c8777b6dc",
5
"reservation_id": "162",
6
"arrival_date": "2019-05-09",
7
"departure_date": "2019-05-10",
8
"arrival_hour": "10:00",
9
"currency": "GBP",
10
"customer": {
11
"name": "Andrew",
12
"surname": "Yudin"
13
},
14
"rooms": [
15
{
16
"occupancy": {
17
"adults": 1,
18
"children": 0,
19
"infants": 0
20
},
21
"rate_plan_id": "f0a84d15-c36f-487c-9c8d-a7f907224a24",
22
"days": {
23
"2019-05-09": 10000
24
}
25
}
26
]
27
}
28
}
Copied!
Success Response Example
Status Code: 200 OK
1
{
2
"data": {
3
"type": "booking",
4
"id": "c172bf2d-eefe-471a-b4b0-0d156a766b79",
5
"attributes": {
6
"unique_id": "CBE-162",
7
"status": "cancelled",
8
"services": [],
9
"rooms": [
10
{
11
"rate_plan_id": "f0a84d15-c36f-487c-9c8d-a7f907224a24",
12
"room_type_id": "994d1375-dbbd-4072-8724-b2ab32ce781b",
13
"occupancy": {
14
"infants": 0,
15
"children": 0,
16
"adults": 1
17
},
18
"departure_date": "2019-05-10",
19
"days": {
20
"2019-05-09": "100.00"
21
},
22
"arrival_date": "2019-05-09",
23
"amount": "100.00"
24
}
25
],
26
"revision_id": "49f55f9a-d19f-470a-818a-779aa6740af2",
27
"ota_reservation_code": "162",
28
"ota_name": null,
29
"occupancy": {
30
"infants": 0,
31
"children": 0,
32
"adults": 1
33
},
34
"notes": null,
35
"inserted_at": "2019-05-01T08:35:28.607625",
36
"id": "c172bf2d-eefe-471a-b4b0-0d156a766b79",
37
"guarantee": null,
38
"departure_date": "2019-05-10",
39
"customer": {
40
"zip": null,
41
"surname": "Yudin",
42
"phone": null,
43
"name": "Andrew",
44
"mail": null,
45
"language": null,
46
"country": null,
47
"city": null,
48
"address": null
49
},
50
"currency": "GBP",
51
"arrival_hour": "10:00",
52
"arrival_date": "2019-05-09",
53
"amount": "100.00"
54
}
55
}
56
}
Copied!
Unauthorised Error Response
Status Code: 401 Unauthorized
1
{
2
"errors": {
3
"code": "unauthorized",
4
"title": "Unauthorized"
5
}
6
}
Copied!
Not Found Error
Status Code: 404 Not Found
1
{
2
"errors": {
3
"code": "not_found",
4
"title": "Resouce Not Found"
5
}
6
}
Copied!

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Body will contain created booking. 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 Booking Revision with provided ID is not present at system.

Booking Message Examples

Booking.com examples

New Booking
Booking Modification
Booking Cancellation
1
{
2
"data": {
3
"attributes": {
4
"amount": "153.00",
5
"arrival_date": "2020-11-13",
6
"arrival_hour": null,
7
"currency": "GBP",
8
"customer": {
9
"address": null,
10
"city": ".",
11
"company": null,
12
"country": "GB",
13
"language": null,
14
"mail": "[email protected]",
15
"meta": {
16
"is_genius": false
17
},
18
"name": "Name",
19
"phone": "Custom Phone",
20
"surname": "Surname",
21
"zip": null
22
},
23
"departure_date": "2020-11-15",
24
"guarantee": {
25
"card_number": "411111******1111",
26
"card_type": "VI",
27
"cardholder_name": "CARDHOLDER NAME",
28
"cvv": "***",
29
"expiration_date": "11/2021",
30
"is_virtual": false,
31
"token": "CARD_TOKEN"
32
},
33
"id": "3e029821-d446-45e9-8394-42d78a3aa1b1",
34
"inserted_at": "2020-11-12T11:39:50.111087",
35
"notes": null,
36
"occupancy": {
37
"adults": 2,
38
"children": 0,
39
"infants": 0
40
},
41
"ota_name": "BookingCom",
42
"ota_reservation_code": "3333333333",
43