Get Started
Search Use Cases
Booking Use Cases
Reservation Modification Use Cases
API Documentation
Webhooks
API Reference
Changelog
API Reference
Create Reservation
Creates a reservation.
POST
/
rest
/
v1
/
reservation
curl --request POST \
--url https://sandbox.travel.selfbook.com/rest/v1/reservation \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"guests": {
"number_of_adults": 1,
"number_of_children": 1,
"primary": {
"address": "123 Main St, Apt 152",
"city": "Miami",
"country": "US",
"email": "guest@somedomain.com",
"given_name": "John",
"postal_code": "33123",
"state": "FL",
"surname": "Doe",
"telephone_number": "+13055551234"
}
},
"hotel": {
"chain_code": "HI",
"name": "Holiday Inn",
"property_code": "E8597"
},
"payment": {
"guest": {
"amount": 164.24,
"token": "01JKA2V3A58ZXN2EH5CK6B10AY"
}
},
"rate": {
"booking_code": "2QN57JU",
"channel_code": "SBT1",
"number_of_rooms": 1,
"price": {
"total_price": 164.24,
"base_price": 139,
"total_taxes": 25.24,
"currency_code": "USD"
},
"terms": {
"rate_payment_info": "PrePay",
"guarantee_type": "DepositRequired",
"refundable": true,
"cancel_note": null,
"cancel_penalties": [
{
"deadline_local": "2024-04-19T00:00-06:00",
"cancel_short_description": "An estimated cancellation fee of 106.90 USD applies starting from 2024-04-20T00:00-06:00[America/Chicago].",
"penalty": {
"estimated_amount": true,
"currency_amount": {
"amount": 106.9,
"currency": "USD"
},
"original_penalty_info": "100%"
}
}
]
}
}
}'
{
"check_in_date": "2024-05-20T00:00:00Z",
"check_out_date": "2024-05-25T00:00:00Z",
"confirmation": {
"hotel_confirmation_number": "CONFIRMATION_ID",
"record_locator": "LOCATOR_CODE"
},
"created_at": "2024-05-20T18:00:00Z",
"guests": {
"number_of_adults": 1,
"number_of_children": 1,
"primary": {
"address": "123 Main Street Apt 152",
"city": "Miami",
"country": "US",
"email": "guest@somedomain.com",
"given_name": "John",
"surname": "Doe",
"telephone_number": "+13055551234",
"state": "FL",
"postal_code": "33123"
}
},
"hotel": {
"chain_code": "HI",
"name": "Holiday Inn",
"property_code": "E8597"
},
"id": "ZHPOGBXVQVFRVXXCHXRJATLEJWKNBERS",
"payment": {
"guest": {
"amount": 164.24,
"stripe": {
"customer": "cus_TestRce2zv5tRe",
"payment_method": "pm_Test5aAWTcmv4K1R71vVugBD"
},
"token": "01JKA2V3A58ZXN2EH5CK6B10AY"
},
"partner": {
"amount": 20,
"stripe": {
"customer": "cus_Test5R5ajq0MZH",
"payment_method": "pm_TestsWAWTcmv4K1ROuWIkGXP"
},
"token": "01JKA13A6TWPV9R4VPWBTAV4KS"
}
},
"rate": {
"booking_code": "2QN57JU",
"channel_code": "SBT1",
"number_of_rooms": 1,
"price": {
"base_price": 159,
"total_price": 184.24,
"total_taxes": 25.24,
"currency_code": "USD"
},
"terms": {
"guarantee_type": "DepositRequired",
"rate_payment_info": "PrePay",
"refundable": true,
"cancel_note": "Rate returned without cancel policy requires a rule request for complete information",
"cancel_penalties": {
"deadline_local": "2024-09-17T00:00:00-05:00",
"cancel_short_description": "An estimated cancellation fee of 177.44 USD applies starting from 2024-09-17T00:00-05:00[America/Chicago].",
"penalty": {
"estimated_amount": true,
"currency_amount": {
"amount": 177.44,
"currency": "USD"
},
"original_penalty_info": "100%"
}
}
}
},
"status": "CONFIRMED"
}
Authorizations
Basic authentication where:
- user-id is a partner account ID
- user-password is an API key token associated with the partner account
Body
application/json
Response
201
application/json
Created
The response is of type object
.
curl --request POST \
--url https://sandbox.travel.selfbook.com/rest/v1/reservation \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"guests": {
"number_of_adults": 1,
"number_of_children": 1,
"primary": {
"address": "123 Main St, Apt 152",
"city": "Miami",
"country": "US",
"email": "guest@somedomain.com",
"given_name": "John",
"postal_code": "33123",
"state": "FL",
"surname": "Doe",
"telephone_number": "+13055551234"
}
},
"hotel": {
"chain_code": "HI",
"name": "Holiday Inn",
"property_code": "E8597"
},
"payment": {
"guest": {
"amount": 164.24,
"token": "01JKA2V3A58ZXN2EH5CK6B10AY"
}
},
"rate": {
"booking_code": "2QN57JU",
"channel_code": "SBT1",
"number_of_rooms": 1,
"price": {
"total_price": 164.24,
"base_price": 139,
"total_taxes": 25.24,
"currency_code": "USD"
},
"terms": {
"rate_payment_info": "PrePay",
"guarantee_type": "DepositRequired",
"refundable": true,
"cancel_note": null,
"cancel_penalties": [
{
"deadline_local": "2024-04-19T00:00-06:00",
"cancel_short_description": "An estimated cancellation fee of 106.90 USD applies starting from 2024-04-20T00:00-06:00[America/Chicago].",
"penalty": {
"estimated_amount": true,
"currency_amount": {
"amount": 106.9,
"currency": "USD"
},
"original_penalty_info": "100%"
}
}
]
}
}
}'
{
"check_in_date": "2024-05-20T00:00:00Z",
"check_out_date": "2024-05-25T00:00:00Z",
"confirmation": {
"hotel_confirmation_number": "CONFIRMATION_ID",
"record_locator": "LOCATOR_CODE"
},
"created_at": "2024-05-20T18:00:00Z",
"guests": {
"number_of_adults": 1,
"number_of_children": 1,
"primary": {
"address": "123 Main Street Apt 152",
"city": "Miami",
"country": "US",
"email": "guest@somedomain.com",
"given_name": "John",
"surname": "Doe",
"telephone_number": "+13055551234",
"state": "FL",
"postal_code": "33123"
}
},
"hotel": {
"chain_code": "HI",
"name": "Holiday Inn",
"property_code": "E8597"
},
"id": "ZHPOGBXVQVFRVXXCHXRJATLEJWKNBERS",
"payment": {
"guest": {
"amount": 164.24,
"stripe": {
"customer": "cus_TestRce2zv5tRe",
"payment_method": "pm_Test5aAWTcmv4K1R71vVugBD"
},
"token": "01JKA2V3A58ZXN2EH5CK6B10AY"
},
"partner": {
"amount": 20,
"stripe": {
"customer": "cus_Test5R5ajq0MZH",
"payment_method": "pm_TestsWAWTcmv4K1ROuWIkGXP"
},
"token": "01JKA13A6TWPV9R4VPWBTAV4KS"
}
},
"rate": {
"booking_code": "2QN57JU",
"channel_code": "SBT1",
"number_of_rooms": 1,
"price": {
"base_price": 159,
"total_price": 184.24,
"total_taxes": 25.24,
"currency_code": "USD"
},
"terms": {
"guarantee_type": "DepositRequired",
"rate_payment_info": "PrePay",
"refundable": true,
"cancel_note": "Rate returned without cancel policy requires a rule request for complete information",
"cancel_penalties": {
"deadline_local": "2024-09-17T00:00:00-05:00",
"cancel_short_description": "An estimated cancellation fee of 177.44 USD applies starting from 2024-09-17T00:00-05:00[America/Chicago].",
"penalty": {
"estimated_amount": true,
"currency_amount": {
"amount": 177.44,
"currency": "USD"
},
"original_penalty_info": "100%"
}
}
}
},
"status": "CONFIRMED"
}
Assistant
Responses are generated using AI and may contain mistakes.