Katanox API
Search…
Bookings
The bookings methods allow you to create, edit and read your bookings. Each booking contains one or many reservations.

Bookings

The required custom objects are specified in their own Objects section, complete with required fields and JSON examples. Creating and updating resources is as simple as sending in the resource using the correct HTTP method, whereas for other operations a unique id is sufficient.
When creating a Booking in production, you will need to use the following endpoint instead, which proxies the credit card details via DataTrans' PCI-Proxy service. This way PCI compliance is achieved:
If you are using the Sandbox environment, you need to send the requests directly to the Katanox host using test credit cards. The rest of the requests can normally be issued using the normal Katanox host.
post
https://api.katanox.com
/v1/bookings
Create a booking
get
https://api.katanox.com
/v1/bookings/:id
Retrieve a booking
delete
https://api.katanox.com
/v1/bookings/:id
Cancel a booking

Reservations

post
https://api.katanox.com
/v1/bookings/:id/reservations
Create a reservation
put
https://api.katanox.com
/v1/bookings/:booking_id/reservations/:reservation_id
Update a reservation
get
https://api.katanox.com
/v1/bookings/:booking_id/reservations/:reservation_id
Retrieve a reservation
delete
https://api.katanox.com
/v1/bookings/:booking_id/reservations/:reservation_id
Cancel a reservation

Objects

Booking object

The booking object is the container of all information related to the booking.
Fields
Example
Property
Type
Required
Description
total_price
Price
Y
Total price of all reservations
customer
Person
Y
Main customer of the booking
reservations
Array of Reservations
Y
Reservations included in the booking
comments
Array of strings
Y
Any comments the client wants to pass to the hotel
payment
Payment
N -> When type is prefunded
Y -> otherwise
Depends on the agreement, this can be ommited in case of prefunded payment type.
1
{
2
"total_price": {
3
"amount": 218,
4
"currency": "EUR"
5
},
6
"customer": {
7
"address_line_1": "123 Street",
8
"address_line_2": "",
9
"city": "City",
10
"country": "GB",
11
"email": "[email protected]",
12
"first_name": "John",
13
"last_name": "Doe",
14
"phone": "",
15
"postcode": "ES22",
16
"title": "MR",
17
"birth_date": "1950-01-04"
18
},
19
"reservations": [
20
{
21
"comments": [
22
"We would like a wake up call every morning at 6am"
23
],
24
"guests": [
25
{
26
"first_name": "John",
27
"last_name": "Doe",
28
"title": "MR"
29
}
30
],
31
"check_in": "2020-10-09",
32
"check_out": "2020-10-12",
33
"price": {
34
"amount": 218,
35
"currency": "EUR"
36
},
37
"rate_plan_id": "ZN8MQ5G1",
38
"unit_id": "M7D2OGX9",
39
"adults": 1,
40
"children": 0
41
}
42
],
43
"comments": [
44
"We will arrive around 8pm"
45
],
46
"payment": {
47
"type": "visa",
48
"card_number": "1234123412341234",
49
"cvv": "123",
50
"card_holder": "John Doe",
51
"expiry_month": "08",
52
"expiry_year": "2021"
53
}
54
}
Copied!

Price object

The price object provides information on the cost and currency of the transaction.
Fields
Example
Property
Type
Description
amount
float
required
After-tax price in the specified currency
currency
string
required
3 character ISO currency code.
1
{
2
"amount": 218,
3
"currency": "EUR"
4
}
Copied!

Person object

The person's object provides information relating to the person making the purchase of the reservations.
Fields
Example
Property
Type
Description
Required
first_name
string
Y
last_name
string
Y
title
string
N
birth_date
string
Format: YYYY-MM-DD
N
address_line_1
string
N
address_line_2
string
N
postcode
string
N
city
string
N
country
string
N
email
string
N
phone_number
string
N
1
{
2
"address_line_1": "123 Street",
3
"address_line_2": "",
4
"city": "City",
5
"country": "GB",
6
"email": "[email protected]",
7
"first_name": "John",
8
"last_name": "Doe",
9
"phone": "",
10
"postcode": "ES22",
11
"title": "MR",
12
"birth_date": "1950-01-04"
13
}
Copied!

Reservations object

The reservations object provides information on each reservation made within the booking.
Fields
Example
Property
Type
Description
Required
comments
Array of strings
N
guests
Array of Persons
Y
check_in
string
Format: YYYY-MM-DD
Y
check_out
string
Format: YYYY-MM-DD
Y
price
Price
Y
rate_plan_id
string
Y
unit_id
string
Y
adults
int
Number of adults in the room
Y
children
int
Number of children in the room
Y
status
Enum(Confirmed, Processing, Cancelled)
returned as part of all responses that include reservations
N
1
{
2
"reservation": {
3
"id": "1681780Y",
4
"status": "confirmed",
5
"comments": [],
6
"guests": [
7
{
8
"first_name": "Jorge",
9
"last_name": "Doe",
10
"title": "MR",
11
"address_line_1": "123 Street",
12
"postcode": "DE22",
13
"city": "City",
14
"country": "GB",
15
"email": "[email protected]",
16
"birth_date": "1950-01-04"
17
},
18
{
19
"first_name": "John",
20
"last_name": "Doe",
21
"title": "MR",
22
"birth_date": "0001-01-01"
23
}
24
],
25
"check_in": "2020-10-09",
26
"check_out": "2020-10-12",
27
"price": {
28
"amount": 218,
29
"currency": "EUR"
30
},
31
"rate_plan_id": "ZN8MQ5G1",
32
"unit_id": "M7D2OGX9",
33
"adults": 1,
34
"children": 0
35
}
36
}
37
}
Copied!

Payment object

The payment object provides the information required to process payment for the booking.
Fields
Example
Property
Type
Description
Required
type
string
enum(VISA, MASTERCARD, AMERICAN_EXPRESS)
Y
card_number
string
Y
cvv
string
Y
card_holder
string
Y
expiry_month
string
2-number format (e.g. for August enter 08)
Y
expiry_year
string
4-number format (e.g. 2022)
Y
1
{
2
"type": "visa",
3
"card_number": "1234123412341234",
4
"cvv": "123",
5
"card_holder": "John Doe",
6
"expiry_month": "08",
7
"expiry_year": "2021"
8
}
Copied!
Last modified 4d ago