Get Started
Search Use Cases
Booking Use Cases
Reservation Modification Use Cases
API Documentation
Webhooks
API Reference
Changelog
API Reference
Modify Reservation
Update certain reservation attributes. Supports updating the following reservation attributes:
- guest_payment_method
- reservation dates
PATCH
/
rest
/
v1
/
reservation
/
{reservation_id}
Copy
Ask AI
curl --request PATCH \
--url https://sandbox.travel.selfbook.com/rest/v1/reservation/{reservation_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"payment": {
"guest": {
"cvv": "123",
"token": "01JECWTWR109MQKG55E58HK52J"
}
}
}'
Copy
Ask AI
{
"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": {
"cvv": "123",
"token": "01JECWTWR109MQKG55E58HK52J"
}
},
"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
Path Parameters
id of the reservation
Body
application/json
Response
200
application/json
OK
The response is of type object
.
Copy
Ask AI
curl --request PATCH \
--url https://sandbox.travel.selfbook.com/rest/v1/reservation/{reservation_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"payment": {
"guest": {
"cvv": "123",
"token": "01JECWTWR109MQKG55E58HK52J"
}
}
}'
Copy
Ask AI
{
"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": {
"cvv": "123",
"token": "01JECWTWR109MQKG55E58HK52J"
}
},
"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.