OTA Booking Cancel Request
curl --request POST \
--url https://ota-int.axisdata.net:9443/bookcancel \
--header 'Content-Type: application/xml' \
--data '<OTA_CancelRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1" CancelType="Quote">
<POS>
<Source>
<RequestorID ID_Context="AxisData" ID="TEST" Type="22"/>
</Source>
<Source>
<RequestorID Type="88" ID="TEST" MessagePassword="testpass"/>
</Source>
</POS>
<UniqueID Type="36" ID="test_xxx" ID_Context="Client"/>
</OTA_CancelRQ>'import requests
url = "https://ota-int.axisdata.net:9443/bookcancel"
payload = "<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>"
headers = {"Content-Type": "application/xml"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/xml'},
body: '<OTA_CancelRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1" CancelType="Quote">\n <POS>\n <Source>\n <RequestorID ID_Context="AxisData" ID="TEST" Type="22"/>\n </Source>\n <Source>\n <RequestorID Type="88" ID="TEST" MessagePassword="testpass"/>\n </Source>\n </POS>\n <UniqueID Type="36" ID="test_xxx" ID_Context="Client"/>\n</OTA_CancelRQ>'
};
fetch('https://ota-int.axisdata.net:9443/bookcancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9443",
CURLOPT_URL => "https://ota-int.axisdata.net:9443/bookcancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/xml"
],
]);
$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://ota-int.axisdata.net:9443/bookcancel"
payload := strings.NewReader("<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/xml")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ota-int.axisdata.net:9443/bookcancel")
.header("Content-Type", "application/xml")
.body("<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ota-int.axisdata.net:9443/bookcancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/xml'
request.body = "<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>"
response = http.request(request)
puts response.read_body"<string>"Cancel Booking
OTA_CancelRQ Playground
POST
/
bookcancel
OTA Booking Cancel Request
curl --request POST \
--url https://ota-int.axisdata.net:9443/bookcancel \
--header 'Content-Type: application/xml' \
--data '<OTA_CancelRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1" CancelType="Quote">
<POS>
<Source>
<RequestorID ID_Context="AxisData" ID="TEST" Type="22"/>
</Source>
<Source>
<RequestorID Type="88" ID="TEST" MessagePassword="testpass"/>
</Source>
</POS>
<UniqueID Type="36" ID="test_xxx" ID_Context="Client"/>
</OTA_CancelRQ>'import requests
url = "https://ota-int.axisdata.net:9443/bookcancel"
payload = "<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>"
headers = {"Content-Type": "application/xml"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/xml'},
body: '<OTA_CancelRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2008.1" CancelType="Quote">\n <POS>\n <Source>\n <RequestorID ID_Context="AxisData" ID="TEST" Type="22"/>\n </Source>\n <Source>\n <RequestorID Type="88" ID="TEST" MessagePassword="testpass"/>\n </Source>\n </POS>\n <UniqueID Type="36" ID="test_xxx" ID_Context="Client"/>\n</OTA_CancelRQ>'
};
fetch('https://ota-int.axisdata.net:9443/bookcancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9443",
CURLOPT_URL => "https://ota-int.axisdata.net:9443/bookcancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/xml"
],
]);
$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://ota-int.axisdata.net:9443/bookcancel"
payload := strings.NewReader("<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/xml")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ota-int.axisdata.net:9443/bookcancel")
.header("Content-Type", "application/xml")
.body("<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ota-int.axisdata.net:9443/bookcancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/xml'
request.body = "<OTA_CancelRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" Version=\"2008.1\" CancelType=\"Quote\">\n <POS>\n <Source>\n <RequestorID ID_Context=\"AxisData\" ID=\"TEST\" Type=\"22\"/>\n </Source>\n <Source>\n <RequestorID Type=\"88\" ID=\"TEST\" MessagePassword=\"testpass\"/>\n </Source>\n </POS>\n <UniqueID Type=\"36\" ID=\"test_xxx\" ID_Context=\"Client\"/>\n</OTA_CancelRQ>"
response = http.request(request)
puts response.read_body"<string>"Use this message to cancel or partially cancel an existing booking.
Find all the necessary information regarding the request message here
The endpoint (url) shown in the code snippet is for Sandbox only. If you need to throw the requests from Postman or other tools, please use https://sintesb.axisdata.net/apu-test/ota after whitelisting your IPs. More info at Access to our Systems
Body
application/xml
The body is of type string<xml>.
Response
200 - application/xml
Success
The response is of type string.
⌘I

