Cancel an Order
curl --request POST \
--url https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel \
--header 'Content-Type: application/json' \
--data '
{
"totalRefundAmount": 123,
"ordersProductsRefunds": [
{
"ordersProductId": 123,
"totalQty": 123,
"agentCancellationFee": 123,
"supplierCancellationFee": 123,
"refundCategoryId": 123,
"refundReason": "<string>",
"supplierContactName": "<string>",
"redeemers": [
{
"id": 123,
"qty": 123,
"bookingDetails": [
123
]
}
]
}
],
"refundPayments": [
{
"amount": 123,
"journalAccountId": 123,
"paymentMethod": "<string>"
}
]
}
'import requests
url = "https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel"
payload = {
"totalRefundAmount": 123,
"ordersProductsRefunds": [
{
"ordersProductId": 123,
"totalQty": 123,
"agentCancellationFee": 123,
"supplierCancellationFee": 123,
"refundCategoryId": 123,
"refundReason": "<string>",
"supplierContactName": "<string>",
"redeemers": [
{
"id": 123,
"qty": 123,
"bookingDetails": [123]
}
]
}
],
"refundPayments": [
{
"amount": 123,
"journalAccountId": 123,
"paymentMethod": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
totalRefundAmount: 123,
ordersProductsRefunds: [
{
ordersProductId: 123,
totalQty: 123,
agentCancellationFee: 123,
supplierCancellationFee: 123,
refundCategoryId: 123,
refundReason: '<string>',
supplierContactName: '<string>',
redeemers: [{id: 123, qty: 123, bookingDetails: [123]}]
}
],
refundPayments: [{amount: 123, journalAccountId: 123, paymentMethod: '<string>'}]
})
};
fetch('https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel', 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://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel",
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([
'totalRefundAmount' => 123,
'ordersProductsRefunds' => [
[
'ordersProductId' => 123,
'totalQty' => 123,
'agentCancellationFee' => 123,
'supplierCancellationFee' => 123,
'refundCategoryId' => 123,
'refundReason' => '<string>',
'supplierContactName' => '<string>',
'redeemers' => [
[
'id' => 123,
'qty' => 123,
'bookingDetails' => [
123
]
]
]
]
],
'refundPayments' => [
[
'amount' => 123,
'journalAccountId' => 123,
'paymentMethod' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel"
payload := strings.NewReader("{\n \"totalRefundAmount\": 123,\n \"ordersProductsRefunds\": [\n {\n \"ordersProductId\": 123,\n \"totalQty\": 123,\n \"agentCancellationFee\": 123,\n \"supplierCancellationFee\": 123,\n \"refundCategoryId\": 123,\n \"refundReason\": \"<string>\",\n \"supplierContactName\": \"<string>\",\n \"redeemers\": [\n {\n \"id\": 123,\n \"qty\": 123,\n \"bookingDetails\": [\n 123\n ]\n }\n ]\n }\n ],\n \"refundPayments\": [\n {\n \"amount\": 123,\n \"journalAccountId\": 123,\n \"paymentMethod\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel")
.header("Content-Type", "application/json")
.body("{\n \"totalRefundAmount\": 123,\n \"ordersProductsRefunds\": [\n {\n \"ordersProductId\": 123,\n \"totalQty\": 123,\n \"agentCancellationFee\": 123,\n \"supplierCancellationFee\": 123,\n \"refundCategoryId\": 123,\n \"refundReason\": \"<string>\",\n \"supplierContactName\": \"<string>\",\n \"redeemers\": [\n {\n \"id\": 123,\n \"qty\": 123,\n \"bookingDetails\": [\n 123\n ]\n }\n ]\n }\n ],\n \"refundPayments\": [\n {\n \"amount\": 123,\n \"journalAccountId\": 123,\n \"paymentMethod\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"totalRefundAmount\": 123,\n \"ordersProductsRefunds\": [\n {\n \"ordersProductId\": 123,\n \"totalQty\": 123,\n \"agentCancellationFee\": 123,\n \"supplierCancellationFee\": 123,\n \"refundCategoryId\": 123,\n \"refundReason\": \"<string>\",\n \"supplierContactName\": \"<string>\",\n \"redeemers\": [\n {\n \"id\": 123,\n \"qty\": 123,\n \"bookingDetails\": [\n 123\n ]\n }\n ]\n }\n ],\n \"refundPayments\": [\n {\n \"amount\": 123,\n \"journalAccountId\": 123,\n \"paymentMethod\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyPost Order Management
Cancel an Order
POST
/
apiv1
/
order
/
{bookingReference}
/
cancel
Cancel an Order
curl --request POST \
--url https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel \
--header 'Content-Type: application/json' \
--data '
{
"totalRefundAmount": 123,
"ordersProductsRefunds": [
{
"ordersProductId": 123,
"totalQty": 123,
"agentCancellationFee": 123,
"supplierCancellationFee": 123,
"refundCategoryId": 123,
"refundReason": "<string>",
"supplierContactName": "<string>",
"redeemers": [
{
"id": 123,
"qty": 123,
"bookingDetails": [
123
]
}
]
}
],
"refundPayments": [
{
"amount": 123,
"journalAccountId": 123,
"paymentMethod": "<string>"
}
]
}
'import requests
url = "https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel"
payload = {
"totalRefundAmount": 123,
"ordersProductsRefunds": [
{
"ordersProductId": 123,
"totalQty": 123,
"agentCancellationFee": 123,
"supplierCancellationFee": 123,
"refundCategoryId": 123,
"refundReason": "<string>",
"supplierContactName": "<string>",
"redeemers": [
{
"id": 123,
"qty": 123,
"bookingDetails": [123]
}
]
}
],
"refundPayments": [
{
"amount": 123,
"journalAccountId": 123,
"paymentMethod": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
totalRefundAmount: 123,
ordersProductsRefunds: [
{
ordersProductId: 123,
totalQty: 123,
agentCancellationFee: 123,
supplierCancellationFee: 123,
refundCategoryId: 123,
refundReason: '<string>',
supplierContactName: '<string>',
redeemers: [{id: 123, qty: 123, bookingDetails: [123]}]
}
],
refundPayments: [{amount: 123, journalAccountId: 123, paymentMethod: '<string>'}]
})
};
fetch('https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel', 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://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel",
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([
'totalRefundAmount' => 123,
'ordersProductsRefunds' => [
[
'ordersProductId' => 123,
'totalQty' => 123,
'agentCancellationFee' => 123,
'supplierCancellationFee' => 123,
'refundCategoryId' => 123,
'refundReason' => '<string>',
'supplierContactName' => '<string>',
'redeemers' => [
[
'id' => 123,
'qty' => 123,
'bookingDetails' => [
123
]
]
]
]
],
'refundPayments' => [
[
'amount' => 123,
'journalAccountId' => 123,
'paymentMethod' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel"
payload := strings.NewReader("{\n \"totalRefundAmount\": 123,\n \"ordersProductsRefunds\": [\n {\n \"ordersProductId\": 123,\n \"totalQty\": 123,\n \"agentCancellationFee\": 123,\n \"supplierCancellationFee\": 123,\n \"refundCategoryId\": 123,\n \"refundReason\": \"<string>\",\n \"supplierContactName\": \"<string>\",\n \"redeemers\": [\n {\n \"id\": 123,\n \"qty\": 123,\n \"bookingDetails\": [\n 123\n ]\n }\n ]\n }\n ],\n \"refundPayments\": [\n {\n \"amount\": 123,\n \"journalAccountId\": 123,\n \"paymentMethod\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel")
.header("Content-Type", "application/json")
.body("{\n \"totalRefundAmount\": 123,\n \"ordersProductsRefunds\": [\n {\n \"ordersProductId\": 123,\n \"totalQty\": 123,\n \"agentCancellationFee\": 123,\n \"supplierCancellationFee\": 123,\n \"refundCategoryId\": 123,\n \"refundReason\": \"<string>\",\n \"supplierContactName\": \"<string>\",\n \"redeemers\": [\n {\n \"id\": 123,\n \"qty\": 123,\n \"bookingDetails\": [\n 123\n ]\n }\n ]\n }\n ],\n \"refundPayments\": [\n {\n \"amount\": 123,\n \"journalAccountId\": 123,\n \"paymentMethod\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tdms.websitetravel.com/apiv1/order/{bookingReference}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"totalRefundAmount\": 123,\n \"ordersProductsRefunds\": [\n {\n \"ordersProductId\": 123,\n \"totalQty\": 123,\n \"agentCancellationFee\": 123,\n \"supplierCancellationFee\": 123,\n \"refundCategoryId\": 123,\n \"refundReason\": \"<string>\",\n \"supplierContactName\": \"<string>\",\n \"redeemers\": [\n {\n \"id\": 123,\n \"qty\": 123,\n \"bookingDetails\": [\n 123\n ]\n }\n ]\n }\n ],\n \"refundPayments\": [\n {\n \"amount\": 123,\n \"journalAccountId\": 123,\n \"paymentMethod\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body