cURL
curl --request POST \
--url https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"booking_code": "2QN57JU",
"chain_code": "HI",
"channel_code": "SBT1",
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"guests": {
"adults": 1,
"children": 123
},
"property_code": "E8597"
}
'import requests
url = "https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification"
payload = {
"booking_code": "2QN57JU",
"chain_code": "HI",
"channel_code": "SBT1",
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"guests": {
"adults": 1,
"children": 123
},
"property_code": "E8597"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
booking_code: '2QN57JU',
chain_code: 'HI',
channel_code: 'SBT1',
check_in_date: '2024-05-20',
check_out_date: '2024-05-25',
guests: {adults: 1, children: 123},
property_code: 'E8597'
})
};
fetch('https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'booking_code' => '2QN57JU',
'chain_code' => 'HI',
'channel_code' => 'SBT1',
'check_in_date' => '2024-05-20',
'check_out_date' => '2024-05-25',
'guests' => [
'adults' => 1,
'children' => 123
],
'property_code' => 'E8597'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification"
payload := strings.NewReader("{\n \"booking_code\": \"2QN57JU\",\n \"chain_code\": \"HI\",\n \"channel_code\": \"SBT1\",\n \"check_in_date\": \"2024-05-20\",\n \"check_out_date\": \"2024-05-25\",\n \"guests\": {\n \"adults\": 1,\n \"children\": 123\n },\n \"property_code\": \"E8597\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"booking_code\": \"2QN57JU\",\n \"chain_code\": \"HI\",\n \"channel_code\": \"SBT1\",\n \"check_in_date\": \"2024-05-20\",\n \"check_out_date\": \"2024-05-25\",\n \"guests\": {\n \"adults\": 1,\n \"children\": 123\n },\n \"property_code\": \"E8597\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"booking_code\": \"2QN57JU\",\n \"chain_code\": \"HI\",\n \"channel_code\": \"SBT1\",\n \"check_in_date\": \"2024-05-20\",\n \"check_out_date\": \"2024-05-25\",\n \"guests\": {\n \"adults\": 1,\n \"children\": 123\n },\n \"property_code\": \"E8597\"\n}"
response = http.request(request)
puts response.read_body{
"booking_code": "2QN57JU",
"channel_code": "SBT1",
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"hotel": {
"chain_code": "HI",
"name": "Holiday Inn",
"property_code": "E8597"
},
"max_occupancy": 3,
"price": {
"base_price": 139,
"total_price": 166.48,
"total_taxes": 25.24,
"additional_fees": 2.24,
"currency_code": "USD",
"fees": [
{
"amount": 2.24,
"currency_code": "USD",
"description": "National government tax",
"included_in_base": false,
"included_in_total": false
}
],
"taxes": [
{
"amount": 25.24,
"currency_code": "USD",
"description": "State Tax",
"included_in_base": false
}
]
},
"terms": [
{
"accepted_credit_cards": [
"AX",
"CA",
"DC",
"VI"
],
"cancel_penalties": [
{
"cancel_short_description": "An estimated cancellation fee of 177.44 USD applies starting from 2024-09-17T00:00-05:00[America/Chicago].",
"deadline_local": "2024-09-17T00:00:00-05:00",
"penalty": {
"currency_amount": {
"amount": 177.44,
"currency": "USD"
},
"estimated_amount": false
},
"refundable": true
}
],
"deposit_policies": {},
"description": [
"Flexible Rate",
"1 King Mobility Accessible With/Bathtub"
],
"guarantee_type": [
"DepositRequired"
],
"rate_payment_info": "PrePay"
}
]
}{
"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"
}API Reference
Rate Verification
Returns pricing and complete terms for a rate.
POST
/
rest
/
v1
/
hotel
/
rate_verification
cURL
curl --request POST \
--url https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"booking_code": "2QN57JU",
"chain_code": "HI",
"channel_code": "SBT1",
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"guests": {
"adults": 1,
"children": 123
},
"property_code": "E8597"
}
'import requests
url = "https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification"
payload = {
"booking_code": "2QN57JU",
"chain_code": "HI",
"channel_code": "SBT1",
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"guests": {
"adults": 1,
"children": 123
},
"property_code": "E8597"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
booking_code: '2QN57JU',
chain_code: 'HI',
channel_code: 'SBT1',
check_in_date: '2024-05-20',
check_out_date: '2024-05-25',
guests: {adults: 1, children: 123},
property_code: 'E8597'
})
};
fetch('https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'booking_code' => '2QN57JU',
'chain_code' => 'HI',
'channel_code' => 'SBT1',
'check_in_date' => '2024-05-20',
'check_out_date' => '2024-05-25',
'guests' => [
'adults' => 1,
'children' => 123
],
'property_code' => 'E8597'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification"
payload := strings.NewReader("{\n \"booking_code\": \"2QN57JU\",\n \"chain_code\": \"HI\",\n \"channel_code\": \"SBT1\",\n \"check_in_date\": \"2024-05-20\",\n \"check_out_date\": \"2024-05-25\",\n \"guests\": {\n \"adults\": 1,\n \"children\": 123\n },\n \"property_code\": \"E8597\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"booking_code\": \"2QN57JU\",\n \"chain_code\": \"HI\",\n \"channel_code\": \"SBT1\",\n \"check_in_date\": \"2024-05-20\",\n \"check_out_date\": \"2024-05-25\",\n \"guests\": {\n \"adults\": 1,\n \"children\": 123\n },\n \"property_code\": \"E8597\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.travel.selfbook.com/rest/v1/hotel/rate_verification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"booking_code\": \"2QN57JU\",\n \"chain_code\": \"HI\",\n \"channel_code\": \"SBT1\",\n \"check_in_date\": \"2024-05-20\",\n \"check_out_date\": \"2024-05-25\",\n \"guests\": {\n \"adults\": 1,\n \"children\": 123\n },\n \"property_code\": \"E8597\"\n}"
response = http.request(request)
puts response.read_body{
"booking_code": "2QN57JU",
"channel_code": "SBT1",
"check_in_date": "2024-05-20",
"check_out_date": "2024-05-25",
"hotel": {
"chain_code": "HI",
"name": "Holiday Inn",
"property_code": "E8597"
},
"max_occupancy": 3,
"price": {
"base_price": 139,
"total_price": 166.48,
"total_taxes": 25.24,
"additional_fees": 2.24,
"currency_code": "USD",
"fees": [
{
"amount": 2.24,
"currency_code": "USD",
"description": "National government tax",
"included_in_base": false,
"included_in_total": false
}
],
"taxes": [
{
"amount": 25.24,
"currency_code": "USD",
"description": "State Tax",
"included_in_base": false
}
]
},
"terms": [
{
"accepted_credit_cards": [
"AX",
"CA",
"DC",
"VI"
],
"cancel_penalties": [
{
"cancel_short_description": "An estimated cancellation fee of 177.44 USD applies starting from 2024-09-17T00:00-05:00[America/Chicago].",
"deadline_local": "2024-09-17T00:00:00-05:00",
"penalty": {
"currency_amount": {
"amount": 177.44,
"currency": "USD"
},
"estimated_amount": false
},
"refundable": true
}
],
"deposit_policies": {},
"description": [
"Flexible Rate",
"1 King Mobility Accessible With/Bathtub"
],
"guarantee_type": [
"DepositRequired"
],
"rate_payment_info": "PrePay"
}
]
}{
"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
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
Unique booking code
Example:
"2QN57JU"
Hotel chain code
Example:
"HI"
Channel code
Example:
"SBT1"
ISO 8601
Example:
"2024-05-20"
ISO 8601
Example:
"2024-05-25"
Number of guests
Show child attributes
Show child attributes
Hotel property code
Example:
"E8597"
Response
OK
Unique booking code.
Example:
"2QN57JU"
Channel code.
Example:
"SBT1"
ISO 8601.
Example:
"2024-05-20"
ISO 8601.
Example:
"2024-05-25"
Show child attributes
Show child attributes
The max occupancy of the room.
Example:
3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I