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"
},
"custom_data": {
"key": "value"
},
"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"
}{
"code": 2001,
"details": [
{
"message": "check_out_date is missing",
"field": [
"check_out_date"
]
}
],
"message": "Unable to process your request. Missing or invalid request parameters.",
"type": "VALIDATION"
}Create Reservation
Creates a 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"
},
"custom_data": {
"key": "value"
},
"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"
}{
"code": 2001,
"details": [
{
"message": "check_out_date is missing",
"field": [
"check_out_date"
]
}
],
"message": "Unable to process your request. Missing or invalid request parameters.",
"type": "VALIDATION"
}Authorizations
Body
Optional, custom object. Use to include additional data with the reservation. This data is not passed to hotels and will only be stored with Selfbook. Allows up to 10 key value pairs.
Keys have a max-length of 32 characters. Allowable characters are letters, numbers, underscore(_) or hyphen (-).
Values can be strings, numbers, or booleans. Max-length of 128 characters. Allowable characters are any except: greater-than symbol (>), less-than symbol (<), double quote("), single quote(') or backslash (\).
Sandbox only. When set, returns a simulated reservation without contacting the GDS or charging payment — useful for testing your integration end-to-end. Ignored in all other environments and if set to any other value.
created: returns a reservation with status CREATED (no confirmation data).confirmed: returns a reservation with status CONFIRMED, including a generated confirmation number and PNR locator.
The request must still pass full validation.
created, confirmed "confirmed"
Response
Created