Viator API Documentation & Specification – Merchant Partners
GET
-booking-availability-dates
{{baseUrl}}/booking/availability/dates
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/availability/dates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/booking/availability/dates" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/booking/availability/dates"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/booking/availability/dates"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/availability/dates");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/availability/dates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/booking/availability/dates HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/booking/availability/dates")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/availability/dates"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/availability/dates")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/booking/availability/dates")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/booking/availability/dates');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/availability/dates',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/availability/dates';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/availability/dates',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/booking/availability/dates")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/availability/dates',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/availability/dates',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/booking/availability/dates');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/availability/dates',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/availability/dates';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/availability/dates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/availability/dates" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/availability/dates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/booking/availability/dates', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/availability/dates');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/booking/availability/dates');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/availability/dates' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/availability/dates' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/booking/availability/dates", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/availability/dates"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/availability/dates"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/availability/dates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/booking/availability/dates') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/availability/dates";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/booking/availability/dates \
--header 'accept-language: '
http GET {{baseUrl}}/booking/availability/dates \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/booking/availability/dates
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/availability/dates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"2020-02": [
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29"
],
"2020-03": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"2020-04": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30"
],
"2020-05": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"2020-06": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30"
],
"2020-07": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"2020-08": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"2020-09": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30"
],
"2020-10": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"2020-11": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30"
],
"2020-12": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"2021-01": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"2021-02": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08"
]
},
"dateStamp": "2020-02-10T16:51:10+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331004"
}
POST
-booking-availability-tourgrades-pricingmatrix
{{baseUrl}}/booking/availability/tourgrades/pricingmatrix
HEADERS
Accept-Language
BODY json
{
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix" {:headers {:accept-language ""}
:content-type :json
:form-params {:currencyCode ""
:month ""
:productCode ""
:year ""}})
require "http/client"
url = "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/availability/tourgrades/pricingmatrix"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/availability/tourgrades/pricingmatrix");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix"
payload := strings.NewReader("{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/availability/tourgrades/pricingmatrix HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 74
{
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/availability/tourgrades/pricingmatrix"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/availability/tourgrades/pricingmatrix")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/availability/tourgrades/pricingmatrix")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
.asString();
const data = JSON.stringify({
currencyCode: '',
month: '',
productCode: '',
year: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {currencyCode: '', month: '', productCode: '', year: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","month":"","productCode":"","year":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "currencyCode": "",\n "month": "",\n "productCode": "",\n "year": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/availability/tourgrades/pricingmatrix")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/availability/tourgrades/pricingmatrix',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({currencyCode: '', month: '', productCode: '', year: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {currencyCode: '', month: '', productCode: '', year: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
currencyCode: '',
month: '',
productCode: '',
year: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {currencyCode: '', month: '', productCode: '', year: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","month":"","productCode":"","year":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"currencyCode": @"",
@"month": @"",
@"productCode": @"",
@"year": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/availability/tourgrades/pricingmatrix"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/availability/tourgrades/pricingmatrix",
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([
'currencyCode' => '',
'month' => '',
'productCode' => '',
'year' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix', [
'body' => '{
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/availability/tourgrades/pricingmatrix');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currencyCode' => '',
'month' => '',
'productCode' => '',
'year' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currencyCode' => '',
'month' => '',
'productCode' => '',
'year' => ''
]));
$request->setRequestUrl('{{baseUrl}}/booking/availability/tourgrades/pricingmatrix');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/availability/tourgrades/pricingmatrix' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/availability/tourgrades/pricingmatrix", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix"
payload = {
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix"
payload <- "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/availability/tourgrades/pricingmatrix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/availability/tourgrades/pricingmatrix') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix";
let payload = json!({
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/availability/tourgrades/pricingmatrix \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}'
echo '{
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}' | \
http POST {{baseUrl}}/booking/availability/tourgrades/pricingmatrix \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "currencyCode": "",\n "month": "",\n "productCode": "",\n "year": ""\n}' \
--output-document \
- {{baseUrl}}/booking/availability/tourgrades/pricingmatrix
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/availability/tourgrades/pricingmatrix")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"bookingMonth": "2020-03",
"dates": [
{
"bookingDate": "2020-03-01",
"callForLastMinAvailability": false,
"sortOrder": 1,
"tourGrades": [
{
"gradeCode": "EB_ASTAR_SP~07:00",
"gradeTitle": "Special: Earlybird A-Star 07:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 409.99,
"priceFormatted": "$409.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"gradeCode": "EB_EC130_SP~07:00",
"gradeTitle": "Special: Earlybird EC-130 07:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 434.99,
"priceFormatted": "$434.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 2
},
{
"gradeCode": "TG1~08:00",
"gradeTitle": "Morning Departure; A-Star 08:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 3
},
{
"gradeCode": "TG1~09:45",
"gradeTitle": "Morning Departure; A-Star 09:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 4
},
{
"gradeCode": "TG1~10:45",
"gradeTitle": "Morning Departure; A-Star 10:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 5
},
{
"gradeCode": "TG2~08:00",
"gradeTitle": "Morning Departure; EC-130 08:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 6
},
{
"gradeCode": "TG2~09:45",
"gradeTitle": "Morning Departure; EC-130 09:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 7
},
{
"gradeCode": "TG2~10:45",
"gradeTitle": "Morning Departure; EC-130 10:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 8
},
{
"gradeCode": "TG3~12:30",
"gradeTitle": "Afternoon Departure; A-Star 12:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 449.99,
"priceFormatted": "$449.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 9
},
{
"gradeCode": "TG3~13:30",
"gradeTitle": "Afternoon Departure; A-Star 13:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 449.99,
"priceFormatted": "$449.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 10
},
{
"gradeCode": "TG4~12:30",
"gradeTitle": "Afternoon Departure; EC-130 12:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 474.99,
"priceFormatted": "$474.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 11
},
{
"gradeCode": "TG4~13:30",
"gradeTitle": "Afternoon Departure; EC-130 13:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 474.99,
"priceFormatted": "$474.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-01",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 12
}
]
},
{
"bookingDate": "2020-03-02",
"callForLastMinAvailability": false,
"sortOrder": 2,
"tourGrades": [
{
"gradeCode": "EB_ASTAR_SP~07:00",
"gradeTitle": "Special: Earlybird A-Star 07:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 409.99,
"priceFormatted": "$409.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"gradeCode": "EB_EC130_SP~07:00",
"gradeTitle": "Special: Earlybird EC-130 07:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 434.99,
"priceFormatted": "$434.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 2
},
{
"gradeCode": "TG1~08:00",
"gradeTitle": "Morning Departure; A-Star 08:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 3
},
{
"gradeCode": "TG1~09:45",
"gradeTitle": "Morning Departure; A-Star 09:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 4
},
{
"gradeCode": "TG1~10:45",
"gradeTitle": "Morning Departure; A-Star 10:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 5
},
{
"gradeCode": "TG2~08:00",
"gradeTitle": "Morning Departure; EC-130 08:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 6
},
{
"gradeCode": "TG2~09:45",
"gradeTitle": "Morning Departure; EC-130 09:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 7
},
{
"gradeCode": "TG2~10:45",
"gradeTitle": "Morning Departure; EC-130 10:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 8
},
{
"gradeCode": "TG3~12:30",
"gradeTitle": "Afternoon Departure; A-Star 12:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 449.99,
"priceFormatted": "$449.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 9
},
{
"gradeCode": "TG3~13:30",
"gradeTitle": "Afternoon Departure; A-Star 13:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 449.99,
"priceFormatted": "$449.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 10
},
{
"gradeCode": "TG4~12:30",
"gradeTitle": "Afternoon Departure; EC-130 12:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 474.99,
"priceFormatted": "$474.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 11
},
{
"gradeCode": "TG4~13:30",
"gradeTitle": "Afternoon Departure; EC-130 13:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 474.99,
"priceFormatted": "$474.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-02",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 12
}
]
},
{
"bookingDate": "2020-03-03",
"callForLastMinAvailability": false,
"sortOrder": 3,
"tourGrades": [
{
"gradeCode": "EB_ASTAR_SP~07:00",
"gradeTitle": "Special: Earlybird A-Star 07:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 409.99,
"priceFormatted": "$409.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"gradeCode": "EB_EC130_SP~07:00",
"gradeTitle": "Special: Earlybird EC-130 07:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 434.99,
"priceFormatted": "$434.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 2
},
{
"gradeCode": "TG1~08:00",
"gradeTitle": "Morning Departure; A-Star 08:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 3
},
{
"gradeCode": "TG1~09:45",
"gradeTitle": "Morning Departure; A-Star 09:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 4
},
{
"gradeCode": "TG1~10:45",
"gradeTitle": "Morning Departure; A-Star 10:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"minNoOfTravellersRequiredForPrice": 1,
"price": 459.99,
"priceFormatted": "$459.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 5
},
{
"gradeCode": "TG2~08:00",
"gradeTitle": "Morning Departure; EC-130 08:00",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 6
},
{
"gradeCode": "TG2~09:45",
"gradeTitle": "Morning Departure; EC-130 09:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 7
},
{
"gradeCode": "TG2~10:45",
"gradeTitle": "Morning Departure; EC-130 10:45",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 410.02,
"merchantNetPriceFormatted": "$410.02",
"minNoOfTravellersRequiredForPrice": 1,
"price": 484.99,
"priceFormatted": "$484.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 8
},
{
"gradeCode": "TG3~12:30",
"gradeTitle": "Afternoon Departure; A-Star 12:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 449.99,
"priceFormatted": "$449.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 9
},
{
"gradeCode": "TG3~13:30",
"gradeTitle": "Afternoon Departure; A-Star 13:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 383.4,
"merchantNetPriceFormatted": "$383.40",
"minNoOfTravellersRequiredForPrice": 1,
"price": 449.99,
"priceFormatted": "$449.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 10
},
{
"gradeCode": "TG4~12:30",
"gradeTitle": "Afternoon Departure; EC-130 12:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 474.99,
"priceFormatted": "$474.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 11
},
{
"gradeCode": "TG4~13:30",
"gradeTitle": "Afternoon Departure; EC-130 13:30",
"pricingMatrix": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 1,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 404.7,
"merchantNetPriceFormatted": "$404.70",
"minNoOfTravellersRequiredForPrice": 1,
"price": 474.99,
"priceFormatted": "$474.99",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 3,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "USD",
"merchantNetPrice": 0,
"merchantNetPriceFormatted": "$0.00",
"minNoOfTravellersRequiredForPrice": 1,
"price": 0,
"priceFormatted": "$0.00",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-03",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"sortOrder": 12
}
]
}
],
"pricingUnit": "per person"
},
"dateStamp": "2020-02-10T18:17:58+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
POST
-booking-availability-tourgrades
{{baseUrl}}/booking/availability/tourgrades
HEADERS
Accept-Language
BODY json
{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/availability/tourgrades");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/availability/tourgrades" {:headers {:accept-language ""}
:content-type :json
:form-params {:ageBands [{:bandId 0
:count 0}]
:bookingDate ""
:currencyCode ""
:productCode ""}})
require "http/client"
url = "{{baseUrl}}/booking/availability/tourgrades"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/availability/tourgrades"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/availability/tourgrades");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/availability/tourgrades"
payload := strings.NewReader("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/availability/tourgrades HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 135
{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/availability/tourgrades")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/availability/tourgrades"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/availability/tourgrades")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/availability/tourgrades")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
ageBands: [
{
bandId: 0,
count: 0
}
],
bookingDate: '',
currencyCode: '',
productCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/availability/tourgrades');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability/tourgrades',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
ageBands: [{bandId: 0, count: 0}],
bookingDate: '',
currencyCode: '',
productCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/availability/tourgrades';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"ageBands":[{"bandId":0,"count":0}],"bookingDate":"","currencyCode":"","productCode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/availability/tourgrades',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ageBands": [\n {\n "bandId": 0,\n "count": 0\n }\n ],\n "bookingDate": "",\n "currencyCode": "",\n "productCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/availability/tourgrades")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/availability/tourgrades',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
ageBands: [{bandId: 0, count: 0}],
bookingDate: '',
currencyCode: '',
productCode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability/tourgrades',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
ageBands: [{bandId: 0, count: 0}],
bookingDate: '',
currencyCode: '',
productCode: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/availability/tourgrades');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ageBands: [
{
bandId: 0,
count: 0
}
],
bookingDate: '',
currencyCode: '',
productCode: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability/tourgrades',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
ageBands: [{bandId: 0, count: 0}],
bookingDate: '',
currencyCode: '',
productCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/availability/tourgrades';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"ageBands":[{"bandId":0,"count":0}],"bookingDate":"","currencyCode":"","productCode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ageBands": @[ @{ @"bandId": @0, @"count": @0 } ],
@"bookingDate": @"",
@"currencyCode": @"",
@"productCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/availability/tourgrades"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/availability/tourgrades" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/availability/tourgrades",
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([
'ageBands' => [
[
'bandId' => 0,
'count' => 0
]
],
'bookingDate' => '',
'currencyCode' => '',
'productCode' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/availability/tourgrades', [
'body' => '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/availability/tourgrades');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ageBands' => [
[
'bandId' => 0,
'count' => 0
]
],
'bookingDate' => '',
'currencyCode' => '',
'productCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ageBands' => [
[
'bandId' => 0,
'count' => 0
]
],
'bookingDate' => '',
'currencyCode' => '',
'productCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/booking/availability/tourgrades');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/availability/tourgrades' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/availability/tourgrades' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/availability/tourgrades", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/availability/tourgrades"
payload = {
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/availability/tourgrades"
payload <- "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/availability/tourgrades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/availability/tourgrades') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/availability/tourgrades";
let payload = json!({
"ageBands": (
json!({
"bandId": 0,
"count": 0
})
),
"bookingDate": "",
"currencyCode": "",
"productCode": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/availability/tourgrades \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}'
echo '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
}' | \
http POST {{baseUrl}}/booking/availability/tourgrades \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "ageBands": [\n {\n "bandId": 0,\n "count": 0\n }\n ],\n "bookingDate": "",\n "currencyCode": "",\n "productCode": ""\n}' \
--output-document \
- {{baseUrl}}/booking/availability/tourgrades
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"ageBands": [
[
"bandId": 0,
"count": 0
]
],
"bookingDate": "",
"currencyCode": "",
"productCode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/availability/tourgrades")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"ageBands": [
{
"bandId": 1,
"bandTotal": 42.41,
"bandTotalFormatted": "$42.41",
"count": 1,
"currencyCode": "AUD",
"pricePerTraveler": 42.41,
"pricePerTravelerFormatted": "$42.41"
}
],
"ageBandsRequired": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingDate": "2020-02-28",
"currencyCode": "AUD",
"defaultLanguageCode": "en",
"gradeCode": "24HOUR",
"gradeDepartureTime": "",
"gradeDescription": "Unlimited use on Big Bus Sydney & Bondi Hop-on Hop-off Tour for 24 hours from time of first use",
"gradeTitle": "24 Hour Classic Ticket ",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 1,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"ageBands": [
{
"bandId": 1,
"bandTotal": 56.79,
"bandTotalFormatted": "$56.79",
"count": 1,
"currencyCode": "AUD",
"pricePerTraveler": 56.79,
"pricePerTravelerFormatted": "$56.79"
}
],
"ageBandsRequired": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingDate": "2020-02-28",
"currencyCode": "AUD",
"defaultLanguageCode": "en",
"gradeCode": "48HOUR",
"gradeDepartureTime": "",
"gradeDescription": "48 Hour Premium Ticket: Unlimited use on Big Bus Sydney & Bondi Tour for 48 hours from time of first use PLUS a guided walking tour of The Rocks, Syd",
"gradeTitle": "48 Hour Premium Ticket ",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPrice": 56.79,
"merchantNetPriceFormatted": "$56.79",
"retailPrice": 71.1,
"retailPriceFormatted": "$71.10",
"sortOrder": 2,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"ageBands": [
{
"bandId": 1,
"bandTotal": 79.08,
"bandTotalFormatted": "$79.08",
"count": 1,
"currencyCode": "AUD",
"pricePerTraveler": 79.08,
"pricePerTravelerFormatted": "$79.08"
}
],
"ageBandsRequired": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingDate": "2020-02-28",
"currencyCode": "AUD",
"defaultLanguageCode": "en",
"gradeCode": "DELUXE",
"gradeDepartureTime": "",
"gradeDescription": "Big Bus and Habour Cruise: Combine two great Sydney experiences into one with a hop-on hop off Big Bus Tours and a hop-on hop-off Sydney Harbour cruise <br/>Duration: 2 days: SPECIAL OFFER: EXTRA FREE DAY when you purchase a Deluxe ticket - have 3 days to explore Sydney not 2. Limited time only.\n<br/>Complimentary Walking Tour: Complimentary English-speaking 90-minute guided walking tour of “The Rocks” historic and harbourside precinct.",
"gradeTitle": "48 Hour Deluxe Bus and Cruise",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPrice": 79.08,
"merchantNetPriceFormatted": "$79.08",
"retailPrice": 99,
"retailPriceFormatted": "$99.00",
"sortOrder": 3,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"ageBands": [
{
"bandId": 1,
"bandTotal": 103.04,
"bandTotalFormatted": "$103.04",
"count": 1,
"currencyCode": "AUD",
"pricePerTraveler": 103.04,
"pricePerTravelerFormatted": "$103.04"
}
],
"ageBandsRequired": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingDate": "2020-02-28",
"currencyCode": "AUD",
"defaultLanguageCode": "en",
"gradeCode": "TG1",
"gradeDepartureTime": "",
"gradeDescription": "Hop-on Hop-Off and Attractions: 48hr Big Bus Tours, 1-day Hop-On Hop-Off Harbour Cruise, 4 Attractions: Tower Eye, Madame Tussauds, Wildlife Zoo, Aquarium<br/>Duration: 2 days: SPECIAL OFFER: EXTRA FREE DAY when you purchase a Deluxe ticket - have 3 days to explore Sydney not 2. Limited time only.\n<br/>Complimentary Walking Tours: Complimentary English-speaking guided walking tour of “The Rocks” historic and harbourside precinct.",
"gradeTitle": "48Hour Deluxe PLUS Attractions",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPrice": 103.04,
"merchantNetPriceFormatted": "$103.04",
"retailPrice": 129,
"retailPriceFormatted": "$129.00",
"sortOrder": 4,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"dateStamp": "2020-02-10T16:57:56+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"CDE_BRAINTREE": {
"APPAY": "sandbox_rtg2qcnx_yx8ptb2tqsjnzdnj",
"GPAY": "sandbox_rtg2qcnx_yx8ptb2tqsjnzdnj",
"PP": "sandbox_rtg2qcnx_yx8ptb2tqsjnzdnj"
}
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
POST
-booking-availability
{{baseUrl}}/booking/availability
HEADERS
Accept-Language
BODY json
{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/availability");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/availability" {:headers {:accept-language ""}
:content-type :json
:form-params {:ageBands [{:bandId 0
:count 0}]
:currencyCode ""
:month ""
:productCode ""
:year ""}})
require "http/client"
url = "{{baseUrl}}/booking/availability"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/availability"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/availability");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/availability"
payload := strings.NewReader("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/availability HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 143
{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/availability")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/availability"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/availability")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/availability")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
.asString();
const data = JSON.stringify({
ageBands: [
{
bandId: 0,
count: 0
}
],
currencyCode: '',
month: '',
productCode: '',
year: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/availability');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
ageBands: [{bandId: 0, count: 0}],
currencyCode: '',
month: '',
productCode: '',
year: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/availability';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"ageBands":[{"bandId":0,"count":0}],"currencyCode":"","month":"","productCode":"","year":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/availability',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ageBands": [\n {\n "bandId": 0,\n "count": 0\n }\n ],\n "currencyCode": "",\n "month": "",\n "productCode": "",\n "year": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/availability")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/availability',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
ageBands: [{bandId: 0, count: 0}],
currencyCode: '',
month: '',
productCode: '',
year: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
ageBands: [{bandId: 0, count: 0}],
currencyCode: '',
month: '',
productCode: '',
year: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/availability');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ageBands: [
{
bandId: 0,
count: 0
}
],
currencyCode: '',
month: '',
productCode: '',
year: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/availability',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
ageBands: [{bandId: 0, count: 0}],
currencyCode: '',
month: '',
productCode: '',
year: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/availability';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"ageBands":[{"bandId":0,"count":0}],"currencyCode":"","month":"","productCode":"","year":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ageBands": @[ @{ @"bandId": @0, @"count": @0 } ],
@"currencyCode": @"",
@"month": @"",
@"productCode": @"",
@"year": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/availability"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/availability" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/availability",
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([
'ageBands' => [
[
'bandId' => 0,
'count' => 0
]
],
'currencyCode' => '',
'month' => '',
'productCode' => '',
'year' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/availability', [
'body' => '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/availability');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ageBands' => [
[
'bandId' => 0,
'count' => 0
]
],
'currencyCode' => '',
'month' => '',
'productCode' => '',
'year' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ageBands' => [
[
'bandId' => 0,
'count' => 0
]
],
'currencyCode' => '',
'month' => '',
'productCode' => '',
'year' => ''
]));
$request->setRequestUrl('{{baseUrl}}/booking/availability');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/availability' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/availability' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/availability", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/availability"
payload = {
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/availability"
payload <- "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/availability') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"ageBands\": [\n {\n \"bandId\": 0,\n \"count\": 0\n }\n ],\n \"currencyCode\": \"\",\n \"month\": \"\",\n \"productCode\": \"\",\n \"year\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/availability";
let payload = json!({
"ageBands": (
json!({
"bandId": 0,
"count": 0
})
),
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/availability \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}'
echo '{
"ageBands": [
{
"bandId": 0,
"count": 0
}
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
}' | \
http POST {{baseUrl}}/booking/availability \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "ageBands": [\n {\n "bandId": 0,\n "count": 0\n }\n ],\n "currencyCode": "",\n "month": "",\n "productCode": "",\n "year": ""\n}' \
--output-document \
- {{baseUrl}}/booking/availability
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"ageBands": [
[
"bandId": 0,
"count": 0
]
],
"currencyCode": "",
"month": "",
"productCode": "",
"year": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/availability")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"availability": [
{
"available": true,
"bookingDate": "2020-06-01",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 1,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-02",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 2,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-03",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 3,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-04",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 4,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-05",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 5,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-06",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 6,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-07",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 7,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-08",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 8,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-09",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 9,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-10",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 10,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-11",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 11,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-12",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 12,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-13",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 13,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-14",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 14,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-15",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 15,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-16",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 16,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-17",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 17,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-18",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 18,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-19",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 19,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-20",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 20,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-21",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 21,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-22",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 22,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-23",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 23,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-24",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 24,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-25",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 25,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-26",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 26,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-27",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 27,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-28",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 28,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-29",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 29,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"available": true,
"bookingDate": "2020-06-30",
"currencyCode": "AUD",
"gradeCode": "24HOUR",
"merchantNetPrice": 42.41,
"merchantNetPriceFormatted": "$42.41",
"retailPrice": 53.1,
"retailPriceFormatted": "$53.10",
"sortOrder": 30,
"unavailableReason": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"firstAvailableDate": "2020-06-01",
"lastAvailableDate": "2021-02-10",
"productCode": "5010SYDNEY"
},
"dateStamp": "2020-02-10T16:43:02+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331004"
}
POST
-booking-book
{{baseUrl}}/booking/book
HEADERS
Accept-Language
BODY json
{
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": false,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": {
"distributorItemRef": ""
},
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": {
"distributorRef": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/book");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/book" {:headers {:accept-language ""}
:content-type :json
:form-params {:booker {:cellPhone ""
:cellPhoneCountryCode ""
:email ""
:firstname ""
:homePhone ""
:surname ""
:title ""}
:currencyCode ""
:demo false
:items [{:bookingQuestionAnswers [{:answer ""
:questionId 0}]
:hotelId ""
:languageOptionCode ""
:partnerItemDetail {:distributorItemRef ""}
:pickupPoint ""
:productCode ""
:specialRequirements ""
:tourGradeCode ""
:travelDate ""
:travellers [{:bandId 0
:firstname ""
:leadTraveller false
:surname ""
:title ""}]}]
:partnerDetail {:distributorRef ""}}})
require "http/client"
url = "{{baseUrl}}/booking/book"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/book"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/book");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/book"
payload := strings.NewReader("{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/book HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 840
{
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": false,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": {
"distributorItemRef": ""
},
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": {
"distributorRef": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/book")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/book"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/book")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/book")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
booker: {
cellPhone: '',
cellPhoneCountryCode: '',
email: '',
firstname: '',
homePhone: '',
surname: '',
title: ''
},
currencyCode: '',
demo: false,
items: [
{
bookingQuestionAnswers: [
{
answer: '',
questionId: 0
}
],
hotelId: '',
languageOptionCode: '',
partnerItemDetail: {
distributorItemRef: ''
},
pickupPoint: '',
productCode: '',
specialRequirements: '',
tourGradeCode: '',
travelDate: '',
travellers: [
{
bandId: 0,
firstname: '',
leadTraveller: false,
surname: '',
title: ''
}
]
}
],
partnerDetail: {
distributorRef: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/book');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/book',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
booker: {
cellPhone: '',
cellPhoneCountryCode: '',
email: '',
firstname: '',
homePhone: '',
surname: '',
title: ''
},
currencyCode: '',
demo: false,
items: [
{
bookingQuestionAnswers: [{answer: '', questionId: 0}],
hotelId: '',
languageOptionCode: '',
partnerItemDetail: {distributorItemRef: ''},
pickupPoint: '',
productCode: '',
specialRequirements: '',
tourGradeCode: '',
travelDate: '',
travellers: [{bandId: 0, firstname: '', leadTraveller: false, surname: '', title: ''}]
}
],
partnerDetail: {distributorRef: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/book';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"booker":{"cellPhone":"","cellPhoneCountryCode":"","email":"","firstname":"","homePhone":"","surname":"","title":""},"currencyCode":"","demo":false,"items":[{"bookingQuestionAnswers":[{"answer":"","questionId":0}],"hotelId":"","languageOptionCode":"","partnerItemDetail":{"distributorItemRef":""},"pickupPoint":"","productCode":"","specialRequirements":"","tourGradeCode":"","travelDate":"","travellers":[{"bandId":0,"firstname":"","leadTraveller":false,"surname":"","title":""}]}],"partnerDetail":{"distributorRef":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/book',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "booker": {\n "cellPhone": "",\n "cellPhoneCountryCode": "",\n "email": "",\n "firstname": "",\n "homePhone": "",\n "surname": "",\n "title": ""\n },\n "currencyCode": "",\n "demo": false,\n "items": [\n {\n "bookingQuestionAnswers": [\n {\n "answer": "",\n "questionId": 0\n }\n ],\n "hotelId": "",\n "languageOptionCode": "",\n "partnerItemDetail": {\n "distributorItemRef": ""\n },\n "pickupPoint": "",\n "productCode": "",\n "specialRequirements": "",\n "tourGradeCode": "",\n "travelDate": "",\n "travellers": [\n {\n "bandId": 0,\n "firstname": "",\n "leadTraveller": false,\n "surname": "",\n "title": ""\n }\n ]\n }\n ],\n "partnerDetail": {\n "distributorRef": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/book")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/book',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
booker: {
cellPhone: '',
cellPhoneCountryCode: '',
email: '',
firstname: '',
homePhone: '',
surname: '',
title: ''
},
currencyCode: '',
demo: false,
items: [
{
bookingQuestionAnswers: [{answer: '', questionId: 0}],
hotelId: '',
languageOptionCode: '',
partnerItemDetail: {distributorItemRef: ''},
pickupPoint: '',
productCode: '',
specialRequirements: '',
tourGradeCode: '',
travelDate: '',
travellers: [{bandId: 0, firstname: '', leadTraveller: false, surname: '', title: ''}]
}
],
partnerDetail: {distributorRef: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/book',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
booker: {
cellPhone: '',
cellPhoneCountryCode: '',
email: '',
firstname: '',
homePhone: '',
surname: '',
title: ''
},
currencyCode: '',
demo: false,
items: [
{
bookingQuestionAnswers: [{answer: '', questionId: 0}],
hotelId: '',
languageOptionCode: '',
partnerItemDetail: {distributorItemRef: ''},
pickupPoint: '',
productCode: '',
specialRequirements: '',
tourGradeCode: '',
travelDate: '',
travellers: [{bandId: 0, firstname: '', leadTraveller: false, surname: '', title: ''}]
}
],
partnerDetail: {distributorRef: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/book');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
booker: {
cellPhone: '',
cellPhoneCountryCode: '',
email: '',
firstname: '',
homePhone: '',
surname: '',
title: ''
},
currencyCode: '',
demo: false,
items: [
{
bookingQuestionAnswers: [
{
answer: '',
questionId: 0
}
],
hotelId: '',
languageOptionCode: '',
partnerItemDetail: {
distributorItemRef: ''
},
pickupPoint: '',
productCode: '',
specialRequirements: '',
tourGradeCode: '',
travelDate: '',
travellers: [
{
bandId: 0,
firstname: '',
leadTraveller: false,
surname: '',
title: ''
}
]
}
],
partnerDetail: {
distributorRef: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/book',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
booker: {
cellPhone: '',
cellPhoneCountryCode: '',
email: '',
firstname: '',
homePhone: '',
surname: '',
title: ''
},
currencyCode: '',
demo: false,
items: [
{
bookingQuestionAnswers: [{answer: '', questionId: 0}],
hotelId: '',
languageOptionCode: '',
partnerItemDetail: {distributorItemRef: ''},
pickupPoint: '',
productCode: '',
specialRequirements: '',
tourGradeCode: '',
travelDate: '',
travellers: [{bandId: 0, firstname: '', leadTraveller: false, surname: '', title: ''}]
}
],
partnerDetail: {distributorRef: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/book';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"booker":{"cellPhone":"","cellPhoneCountryCode":"","email":"","firstname":"","homePhone":"","surname":"","title":""},"currencyCode":"","demo":false,"items":[{"bookingQuestionAnswers":[{"answer":"","questionId":0}],"hotelId":"","languageOptionCode":"","partnerItemDetail":{"distributorItemRef":""},"pickupPoint":"","productCode":"","specialRequirements":"","tourGradeCode":"","travelDate":"","travellers":[{"bandId":0,"firstname":"","leadTraveller":false,"surname":"","title":""}]}],"partnerDetail":{"distributorRef":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"booker": @{ @"cellPhone": @"", @"cellPhoneCountryCode": @"", @"email": @"", @"firstname": @"", @"homePhone": @"", @"surname": @"", @"title": @"" },
@"currencyCode": @"",
@"demo": @NO,
@"items": @[ @{ @"bookingQuestionAnswers": @[ @{ @"answer": @"", @"questionId": @0 } ], @"hotelId": @"", @"languageOptionCode": @"", @"partnerItemDetail": @{ @"distributorItemRef": @"" }, @"pickupPoint": @"", @"productCode": @"", @"specialRequirements": @"", @"tourGradeCode": @"", @"travelDate": @"", @"travellers": @[ @{ @"bandId": @0, @"firstname": @"", @"leadTraveller": @NO, @"surname": @"", @"title": @"" } ] } ],
@"partnerDetail": @{ @"distributorRef": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/book"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/book" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/book",
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([
'booker' => [
'cellPhone' => '',
'cellPhoneCountryCode' => '',
'email' => '',
'firstname' => '',
'homePhone' => '',
'surname' => '',
'title' => ''
],
'currencyCode' => '',
'demo' => null,
'items' => [
[
'bookingQuestionAnswers' => [
[
'answer' => '',
'questionId' => 0
]
],
'hotelId' => '',
'languageOptionCode' => '',
'partnerItemDetail' => [
'distributorItemRef' => ''
],
'pickupPoint' => '',
'productCode' => '',
'specialRequirements' => '',
'tourGradeCode' => '',
'travelDate' => '',
'travellers' => [
[
'bandId' => 0,
'firstname' => '',
'leadTraveller' => null,
'surname' => '',
'title' => ''
]
]
]
],
'partnerDetail' => [
'distributorRef' => ''
]
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/book', [
'body' => '{
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": false,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": {
"distributorItemRef": ""
},
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": {
"distributorRef": ""
}
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/book');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'booker' => [
'cellPhone' => '',
'cellPhoneCountryCode' => '',
'email' => '',
'firstname' => '',
'homePhone' => '',
'surname' => '',
'title' => ''
],
'currencyCode' => '',
'demo' => null,
'items' => [
[
'bookingQuestionAnswers' => [
[
'answer' => '',
'questionId' => 0
]
],
'hotelId' => '',
'languageOptionCode' => '',
'partnerItemDetail' => [
'distributorItemRef' => ''
],
'pickupPoint' => '',
'productCode' => '',
'specialRequirements' => '',
'tourGradeCode' => '',
'travelDate' => '',
'travellers' => [
[
'bandId' => 0,
'firstname' => '',
'leadTraveller' => null,
'surname' => '',
'title' => ''
]
]
]
],
'partnerDetail' => [
'distributorRef' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'booker' => [
'cellPhone' => '',
'cellPhoneCountryCode' => '',
'email' => '',
'firstname' => '',
'homePhone' => '',
'surname' => '',
'title' => ''
],
'currencyCode' => '',
'demo' => null,
'items' => [
[
'bookingQuestionAnswers' => [
[
'answer' => '',
'questionId' => 0
]
],
'hotelId' => '',
'languageOptionCode' => '',
'partnerItemDetail' => [
'distributorItemRef' => ''
],
'pickupPoint' => '',
'productCode' => '',
'specialRequirements' => '',
'tourGradeCode' => '',
'travelDate' => '',
'travellers' => [
[
'bandId' => 0,
'firstname' => '',
'leadTraveller' => null,
'surname' => '',
'title' => ''
]
]
]
],
'partnerDetail' => [
'distributorRef' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/booking/book');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/book' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": false,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": {
"distributorItemRef": ""
},
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": {
"distributorRef": ""
}
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/book' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": false,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": {
"distributorItemRef": ""
},
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": {
"distributorRef": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/book", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/book"
payload = {
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": False,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": { "distributorItemRef": "" },
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": False,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": { "distributorRef": "" }
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/book"
payload <- "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/book")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/book') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"booker\": {\n \"cellPhone\": \"\",\n \"cellPhoneCountryCode\": \"\",\n \"email\": \"\",\n \"firstname\": \"\",\n \"homePhone\": \"\",\n \"surname\": \"\",\n \"title\": \"\"\n },\n \"currencyCode\": \"\",\n \"demo\": false,\n \"items\": [\n {\n \"bookingQuestionAnswers\": [\n {\n \"answer\": \"\",\n \"questionId\": 0\n }\n ],\n \"hotelId\": \"\",\n \"languageOptionCode\": \"\",\n \"partnerItemDetail\": {\n \"distributorItemRef\": \"\"\n },\n \"pickupPoint\": \"\",\n \"productCode\": \"\",\n \"specialRequirements\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0,\n \"firstname\": \"\",\n \"leadTraveller\": false,\n \"surname\": \"\",\n \"title\": \"\"\n }\n ]\n }\n ],\n \"partnerDetail\": {\n \"distributorRef\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/book";
let payload = json!({
"booker": json!({
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
}),
"currencyCode": "",
"demo": false,
"items": (
json!({
"bookingQuestionAnswers": (
json!({
"answer": "",
"questionId": 0
})
),
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": json!({"distributorItemRef": ""}),
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": (
json!({
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
})
)
})
),
"partnerDetail": json!({"distributorRef": ""})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/book \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": false,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": {
"distributorItemRef": ""
},
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": {
"distributorRef": ""
}
}'
echo '{
"booker": {
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
},
"currencyCode": "",
"demo": false,
"items": [
{
"bookingQuestionAnswers": [
{
"answer": "",
"questionId": 0
}
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": {
"distributorItemRef": ""
},
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
}
]
}
],
"partnerDetail": {
"distributorRef": ""
}
}' | \
http POST {{baseUrl}}/booking/book \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "booker": {\n "cellPhone": "",\n "cellPhoneCountryCode": "",\n "email": "",\n "firstname": "",\n "homePhone": "",\n "surname": "",\n "title": ""\n },\n "currencyCode": "",\n "demo": false,\n "items": [\n {\n "bookingQuestionAnswers": [\n {\n "answer": "",\n "questionId": 0\n }\n ],\n "hotelId": "",\n "languageOptionCode": "",\n "partnerItemDetail": {\n "distributorItemRef": ""\n },\n "pickupPoint": "",\n "productCode": "",\n "specialRequirements": "",\n "tourGradeCode": "",\n "travelDate": "",\n "travellers": [\n {\n "bandId": 0,\n "firstname": "",\n "leadTraveller": false,\n "surname": "",\n "title": ""\n }\n ]\n }\n ],\n "partnerDetail": {\n "distributorRef": ""\n }\n}' \
--output-document \
- {{baseUrl}}/booking/book
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"booker": [
"cellPhone": "",
"cellPhoneCountryCode": "",
"email": "",
"firstname": "",
"homePhone": "",
"surname": "",
"title": ""
],
"currencyCode": "",
"demo": false,
"items": [
[
"bookingQuestionAnswers": [
[
"answer": "",
"questionId": 0
]
],
"hotelId": "",
"languageOptionCode": "",
"partnerItemDetail": ["distributorItemRef": ""],
"pickupPoint": "",
"productCode": "",
"specialRequirements": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
[
"bandId": 0,
"firstname": "",
"leadTraveller": false,
"surname": "",
"title": ""
]
]
]
],
"partnerDetail": ["distributorRef": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/book")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"bookerEmail": "apitest@viator.com",
"bookingDate": "2020-02-11",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITINERARY",
"pending": false,
"status": 3,
"text": "Confirmed",
"type": "CONFIRMED"
},
"currencyCode": "USD",
"distributorRef": "distributorRef100000",
"exchangeRate": 1,
"hasVoucher": true,
"itemSummaries": [
{
"applePassSupported": false,
"appleWalletURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"barcodeOption": "tour",
"barcodeType": "code128",
"bookingEngineId": "FO",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITEM",
"pending": false,
"status": 1,
"text": "Paid & Confirmed",
"type": "CONFIRMED"
},
"currencyCode": "USD",
"departsFrom": "Las Vegas, United States",
"departurePoint": "Traveler pickup is offered<br><br>",
"departurePointAddress": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"departurePointDirections": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destId": 684,
"distributorItemRef": "itemRef1000000",
"hoursConfirmed": 0,
"itemId": 580669678,
"itineraryId": 1005851866,
"languageServicesLanguageCode": "en",
"lastRetailPrice": 388.72,
"lastRetailPriceFormatted": "$388.72",
"leadTravellerFirstname": "Homer test",
"leadTravellerSurname": "Simpson test",
"leadTravellerTitle": "Mr",
"merchantCancellable": true,
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"merchantTermsAndConditions": {
"amountRefundable": "USD 412.04",
"cancellationFromTourDate": [
{
"dayRangeMax": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"dayRangeMin": 1,
"percentageRefundable": 100,
"policyEndTimestamp": 1585580400,
"policyStartTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"dayRangeMax": 1,
"dayRangeMin": 0,
"percentageRefundable": 0,
"policyEndTimestamp": 1585666800,
"policyStartTimestamp": 1585580400
}
],
"merchantTermsAndConditionsType": 1,
"termsAndConditions": "For a full refund, cancel at least 24 hours in advance of the start date of the experience."
},
"obfsId": 362208,
"passbooks": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelName": "null",
"price": 412.04,
"priceFormatted": "$412.04",
"priceUSD": 412.04,
"productCode": "2280AAHT",
"productPulledDown": false,
"productTitle": "Grand Canyon All-American Helicopter Tour",
"productWidgetList": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rnplInfo": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"savingAmount": 0,
"savingAmountFormated": "$0.00",
"sortOrder": 0,
"startingTime": "8:00 AM",
"supplierName": "Sundance Helicopters",
"supplierPhoneNumber": "+1 123 456 7890",
"termsAndConditions": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"tourGradeCode": "TG1~08:00",
"tourGradeDescription": "Morning Departure; A-Star 08:00 (TG1~08:00)",
"travelDate": "2020-03-31",
"travellerAgeBands": [
{
"ageBandId": 1,
"count": 1,
"description": "Adult",
"pluralDescription": "Adults",
"sortOrder": 0
}
],
"voucherKey": "1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e:580669678",
"voucherOption": "VOUCHER_E",
"voucherRequirements": "You can present either a paper or an electronic voucher for this activity.",
"voucherURL": "https://viatorapi.live.rc.viator.com/service/merchant/voucher.jspa?code=1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e:580669678&embedResources=false",
"vouchers": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"itineraryId": 1005851866,
"omniPreRuleList": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"paypalRedirectURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"securityToken": "4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e",
"sortOrder": 0,
"totalPrice": 412.04,
"totalPriceFormatted": "$412.04",
"totalPriceUSD": 412.04,
"userId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"voucherKey": "1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e",
"voucherURL": "https://viatorapi.live.rc.viator.com/service/merchant/voucher.jspa?code=1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e&embedResources=false"
},
"dateStamp": "2020-02-11T16:55:47+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
POST
-booking-calculateprice
{{baseUrl}}/booking/calculateprice
HEADERS
Accept-Language
BODY json
{
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0
}
]
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/calculateprice");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/calculateprice" {:headers {:accept-language ""}
:content-type :json
:form-params {:currencyCode ""
:items [{:productCode ""
:tourGradeCode ""
:travelDate ""
:travellers [{:bandId 0}]}]}})
require "http/client"
url = "{{baseUrl}}/booking/calculateprice"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/calculateprice"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/calculateprice");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/calculateprice"
payload := strings.NewReader("{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/calculateprice HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 202
{
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0
}
]
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/calculateprice")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/calculateprice"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/calculateprice")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/calculateprice")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}")
.asString();
const data = JSON.stringify({
currencyCode: '',
items: [
{
productCode: '',
tourGradeCode: '',
travelDate: '',
travellers: [
{
bandId: 0
}
]
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/calculateprice');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/calculateprice',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
currencyCode: '',
items: [
{productCode: '', tourGradeCode: '', travelDate: '', travellers: [{bandId: 0}]}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/calculateprice';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","items":[{"productCode":"","tourGradeCode":"","travelDate":"","travellers":[{"bandId":0}]}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/calculateprice',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "currencyCode": "",\n "items": [\n {\n "productCode": "",\n "tourGradeCode": "",\n "travelDate": "",\n "travellers": [\n {\n "bandId": 0\n }\n ]\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/calculateprice")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/calculateprice',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
currencyCode: '',
items: [
{productCode: '', tourGradeCode: '', travelDate: '', travellers: [{bandId: 0}]}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/calculateprice',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
currencyCode: '',
items: [
{productCode: '', tourGradeCode: '', travelDate: '', travellers: [{bandId: 0}]}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/calculateprice');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
currencyCode: '',
items: [
{
productCode: '',
tourGradeCode: '',
travelDate: '',
travellers: [
{
bandId: 0
}
]
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/calculateprice',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
currencyCode: '',
items: [
{productCode: '', tourGradeCode: '', travelDate: '', travellers: [{bandId: 0}]}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/calculateprice';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","items":[{"productCode":"","tourGradeCode":"","travelDate":"","travellers":[{"bandId":0}]}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"currencyCode": @"",
@"items": @[ @{ @"productCode": @"", @"tourGradeCode": @"", @"travelDate": @"", @"travellers": @[ @{ @"bandId": @0 } ] } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/calculateprice"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/calculateprice" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/calculateprice",
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([
'currencyCode' => '',
'items' => [
[
'productCode' => '',
'tourGradeCode' => '',
'travelDate' => '',
'travellers' => [
[
'bandId' => 0
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/calculateprice', [
'body' => '{
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0
}
]
}
]
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/calculateprice');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currencyCode' => '',
'items' => [
[
'productCode' => '',
'tourGradeCode' => '',
'travelDate' => '',
'travellers' => [
[
'bandId' => 0
]
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currencyCode' => '',
'items' => [
[
'productCode' => '',
'tourGradeCode' => '',
'travelDate' => '',
'travellers' => [
[
'bandId' => 0
]
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/booking/calculateprice');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/calculateprice' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0
}
]
}
]
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/calculateprice' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0
}
]
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/calculateprice", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/calculateprice"
payload = {
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [{ "bandId": 0 }]
}
]
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/calculateprice"
payload <- "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/calculateprice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/calculateprice') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"currencyCode\": \"\",\n \"items\": [\n {\n \"productCode\": \"\",\n \"tourGradeCode\": \"\",\n \"travelDate\": \"\",\n \"travellers\": [\n {\n \"bandId\": 0\n }\n ]\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/calculateprice";
let payload = json!({
"currencyCode": "",
"items": (
json!({
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": (json!({"bandId": 0}))
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/calculateprice \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0
}
]
}
]
}'
echo '{
"currencyCode": "",
"items": [
{
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [
{
"bandId": 0
}
]
}
]
}' | \
http POST {{baseUrl}}/booking/calculateprice \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "currencyCode": "",\n "items": [\n {\n "productCode": "",\n "tourGradeCode": "",\n "travelDate": "",\n "travellers": [\n {\n "bandId": 0\n }\n ]\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/booking/calculateprice
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"currencyCode": "",
"items": [
[
"productCode": "",
"tourGradeCode": "",
"travelDate": "",
"travellers": [["bandId": 0]]
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/calculateprice")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"currencyCode": "USD",
"hasPromoCode": false,
"itinerary": {
"bookerEmail": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"bookingDate": "2020-02-10",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": false,
"failed": false,
"level": "ITINERARY",
"pending": false,
"status": 0,
"text": "Waiting to be Booked",
"type": "WAITING"
},
"currencyCode": "USD",
"distributorRef": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"exchangeRate": 1,
"hasVoucher": false,
"itemSummaries": [
{
"applePassSupported": false,
"appleWalletURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"barcodeOption": "perperson",
"barcodeType": "qrcode",
"bookingEngineId": "UF",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": false,
"failed": false,
"level": "ITEM",
"pending": false,
"status": 0,
"text": "Waiting to be Booked",
"type": "WAITING"
},
"currencyCode": "USD",
"departsFrom": "The Rocks, Australia",
"departurePoint": "You may start this tour at any of the stops listed.",
"departurePointAddress": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"departurePointDirections": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destId": 357,
"distributorItemRef": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"hoursConfirmed": 0,
"itemId": 580659274,
"itineraryId": 1005847086,
"languageServicesLanguageCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"lastRetailPrice": 29.53,
"lastRetailPriceFormatted": "$29.53",
"leadTravellerFirstname": "",
"leadTravellerSurname": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"leadTravellerTitle": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPrice": 29.53,
"merchantNetPriceFormatted": "$29.53",
"obfsId": 31185,
"passbooks": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"price": 31.3,
"priceFormatted": "$31.30",
"priceUSD": 31.3,
"productCode": "5010SYDNEY",
"productPulledDown": false,
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productWidgetList": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rnplInfo": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"savingAmount": 0,
"savingAmountFormated": "$0.00",
"sortOrder": 0,
"startingTime": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"supplierName": "Big Bus Tours",
"supplierPhoneNumber": "+1 123 456 7890",
"termsAndConditions": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"tourGradeCode": "24HOUR",
"tourGradeDescription": "24 Hour Classic Ticket (24HOUR)",
"travelDate": "2020-03-03",
"travellerAgeBands": [
{
"ageBandId": 1,
"count": 1,
"description": "Adult",
"pluralDescription": "Adults",
"sortOrder": 0
}
],
"voucherKey": "",
"voucherOption": "VOUCHER_E",
"voucherRequirements": "You can present either a paper or an electronic voucher for this activity.",
"voucherURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"vouchers": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"itineraryId": 1005847086,
"omniPreRuleList": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"paypalRedirectURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"securityToken": "595798ee27965d5178ab6a800f9b796ed7efac8fd303086e4113e1e99848932c",
"sortOrder": 0,
"totalPrice": 31.3,
"totalPriceFormatted": "$31.30",
"totalPriceUSD": 31.3,
"userId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"voucherKey": "",
"voucherURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"itineraryFromPrice": 29.53,
"itineraryFromPriceFormatted": "$29.53",
"itineraryNewPrice": 29.53,
"itineraryNewPriceFormatted": "$29.53",
"itinerarySaving": 0,
"itinerarySavingFormatted": "$0.00",
"paymentGatewayInfo": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"promoCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"promoCodeExpired": false,
"promoCodeValid": false,
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"dateStamp": "2020-02-10T18:26:49+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
GET
-booking-hotels
{{baseUrl}}/booking/hotels
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/hotels");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/booking/hotels" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/booking/hotels"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/booking/hotels"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/hotels");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/hotels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/booking/hotels HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/booking/hotels")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/hotels"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/hotels")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/booking/hotels")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/booking/hotels');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/hotels',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/hotels';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/hotels',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/booking/hotels")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/hotels',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/hotels',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/booking/hotels');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/hotels',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/hotels';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/hotels"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/hotels" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/hotels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/booking/hotels', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/hotels');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/booking/hotels');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/hotels' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/hotels' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/booking/hotels", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/hotels"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/hotels"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/hotels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/booking/hotels') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/hotels";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/booking/hotels \
--header 'accept-language: '
http GET {{baseUrl}}/booking/hotels \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/booking/hotels
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/hotels")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"address": "35 Main St",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Hahndorf",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1001419406",
"latitude": -35.031216,
"longitude": 138.81102,
"name": "The Hahndorf Inn",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5245",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 1
},
{
"address": "Lot 112 Neagles Rock Road",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "10984108",
"latitude": -33.863453,
"longitude": 138.61,
"name": "Neagles Retreat Villas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 2
},
{
"address": "310 Main North Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "11205163",
"latitude": -33.831417,
"longitude": 138.60942,
"name": "The Mill Apartments",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 3
},
{
"address": "14 Bridge St, Old Reynella",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Reynella",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1255430",
"latitude": -35.08964,
"longitude": 138.53828,
"name": "St. Francis Winery",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5161",
"productCodes": [
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1"
],
"sortOrder": 4
},
{
"address": "Motel 574 Main North Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Enfield",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1255431",
"latitude": -34.845764,
"longitude": 138.60115,
"name": "Adelaide Manor",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5094",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 5
},
{
"address": "471 Main North Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Enfield",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1255432",
"latitude": -34.85016,
"longitude": 138.60077,
"name": "Comfort Inn Manhattan",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5085",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 6
},
{
"address": "Morphettville Motor Inn 444 - 446 Anzac Hwy",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Camden Park",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1257946",
"latitude": -34.97334,
"longitude": 138.54086,
"name": "Morphettville Motor Inn",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5038",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 7
},
{
"address": "1 Nottage Tce, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Medindie",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1257951",
"latitude": -34.89378,
"longitude": 138.60353,
"name": "Comfort Inn Scottys",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5081",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"120684P5",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 8
},
{
"address": "White Hut Road, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1262285",
"latitude": -33.820854,
"longitude": 138.61382,
"name": "Clare Country Club",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 9
},
{
"address": "74a Main North Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1262636",
"latitude": -33.848263,
"longitude": 138.6178,
"name": "Clare Valley Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 10
},
{
"address": "Quarry Rd, Sevenhill via Clare Valley",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1289197",
"latitude": -33.87362,
"longitude": 138.6354,
"name": "Thorn Park by the Vines",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 11
},
{
"address": "141 Brebner Dr",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "West Lakes",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1301167",
"latitude": -34.88005,
"longitude": 138.48842,
"name": "Lakes Hotel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5021",
"productCodes": [
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 12
},
{
"address": "198 Esplanade",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Largs Bay",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1301173",
"latitude": -34.825584,
"longitude": 138.4865,
"name": "Largs Pier Hotel - Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5016",
"productCodes": [
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1"
],
"sortOrder": 13
},
{
"address": "24 Dequetteville Tce",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Kent Town",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1301183",
"latitude": -34.924698,
"longitude": 138.6194,
"name": "Adelaide Royal Coach",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5067",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"120684P5",
"142696P2",
"142696P5",
"196440P1",
"19852P6",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"21300P2",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5",
"40887P6",
"65854P1",
"65854P2",
"65854P3",
"65854P6",
"6763ULTIMATE",
"67705P1",
"67705P2"
],
"sortOrder": 14
},
{
"address": "540 Marion Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Marion",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1320631",
"latitude": -34.97743,
"longitude": 138.55557,
"name": "Marion Motel and Apartments",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5038",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 15
},
{
"address": "17 Colley Tce, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Glenelg",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1579776",
"latitude": -34.97872,
"longitude": 138.51253,
"name": "Glenelg Beachside Apartments",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5045",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 16
},
{
"address": "373 Glen Osmond Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Glen Osmond",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1584919",
"latitude": -34.9604,
"longitude": 138.64185,
"name": "Jacksons Motor Inn",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5064",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 17
},
{
"address": "288-292 Main North Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Prospect",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1589097",
"latitude": -34.87285,
"longitude": 138.60158,
"name": "Comfort Inn & Suites Sombrero",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5082",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 18
},
{
"address": "Warenda Road, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1626470",
"latitude": -33.854675,
"longitude": 138.62292,
"name": "Brice Hill Country Lodge",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 19
},
{
"address": "Clare Valley, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1630042",
"latitude": -33.84362,
"longitude": 138.63342,
"name": "Springfarm Cottage",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 20
},
{
"address": "647 North East Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Gilles Plains",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1633907",
"latitude": -34.852222,
"longitude": 138.665,
"name": "Highlander Hotel Bar Kitchen Rooftop",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5086",
"productCodes": [
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 21
},
{
"address": "277 Glen Osmond Road, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Frewville",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1661623",
"latitude": -34.95136,
"longitude": 138.63423,
"name": "Welcome Inn 277",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5063",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"120684P5",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 22
},
{
"address": "325 Main North Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1729496",
"latitude": -33.829445,
"longitude": 138.60802,
"name": "Comfort Inn Clare Central",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 23
},
{
"address": "73 St Andrews Bvd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Normanville",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1803904",
"latitude": -35.46194,
"longitude": 138.31508,
"name": "Links Lady Bay Resort",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5204",
"productCodes": [
"200245P4"
],
"sortOrder": 24
},
{
"address": "406 Sir Donald Bradman Dr, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Brooklyn Park",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2076447",
"latitude": -34.93242,
"longitude": 138.5395,
"name": "Adelaide Airport Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5032",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"21300P1",
"21300P7",
"21300P9",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 25
},
{
"address": "10 Main St",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Mawson Lakes",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2122469",
"latitude": -34.80973,
"longitude": 138.61734,
"name": "Mawson Lakes Hotel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5095",
"productCodes": [
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1"
],
"sortOrder": 26
},
{
"address": "647 North East Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Gilles Plains",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2218971",
"latitude": -34.85213,
"longitude": 138.6651,
"name": "Comfort Inn Riverfront Berriedale",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5086",
"productCodes": [
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 27
},
{
"address": "72 Warenda Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2453318",
"latitude": -33.856297,
"longitude": 138.62358,
"name": "St Helens Country Cottages",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 28
},
{
"address": "190 Gover St, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2479967",
"latitude": -34.904903,
"longitude": 138.5927,
"name": "North Adelaide Boutique Stays Accommodation",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5006",
"productCodes": [
"21300P1",
"21300P11",
"21300P14",
"21300P6",
"21300P7",
"21300P9"
],
"sortOrder": 29
},
{
"address": "199 Glen Osmond Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Frewville",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2482535",
"latitude": -34.94779,
"longitude": 138.62839,
"name": "Frewville Motor Inn",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5063",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"120684P5",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5",
"6763ULTIMATE"
],
"sortOrder": 30
},
{
"address": "493 Portrush Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Glenunga",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2501758",
"latitude": -34.94681,
"longitude": 138.6427,
"name": "Best Western Adelaide Granada Motor Inn",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5064",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"120684P5",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 31
},
{
"address": "33 - 37 Main St",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Mawson Lakes",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2575802",
"latitude": -34.806805,
"longitude": 138.61667,
"name": "Quest Mawson Lakes",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5095",
"productCodes": [
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"21300P10",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1"
],
"sortOrder": 32
},
{
"address": "859 Main North Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Pooraka",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2628301",
"latitude": -34.82837,
"longitude": 138.61504,
"name": "Pavlos Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5095",
"productCodes": [
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 33
},
{
"address": "23-25 Church St, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Penola",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2640160",
"latitude": -37.381992,
"longitude": 140.83783,
"name": "Alexander Cameron Suites",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5277",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 34
},
{
"address": "151 St Georges Tce",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2773041",
"latitude": -33.82023,
"longitude": 138.58174,
"name": "Patly Hill Farm",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 35
},
{
"address": "corner of South & West Terrace, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Stansbury",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2774580",
"latitude": -34.91078,
"longitude": 137.79254,
"name": "Oyster Court Motel & Holiday Units",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5582",
"productCodes": [
"200245P4"
],
"sortOrder": 36
},
{
"address": "1274 South Rd, Adelaide",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Tonsley",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2786536",
"latitude": -35.00457,
"longitude": 138.5747,
"name": "Tonsley Hotel Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5042",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 37
},
{
"address": "445 Torrens Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Woodville Park",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2853212",
"latitude": -34.87638,
"longitude": 138.54959,
"name": "Lindy Lodge Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5011",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 38
},
{
"address": "516 Glynburn Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Burnside",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "3002527",
"latitude": -34.93765,
"longitude": 138.66063,
"name": "The Feathers Hotel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5066",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 39
},
{
"address": "20 Mount Barker Rd, (Corner Gill Terrace)",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Glen Osmond",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "3235180",
"latitude": -34.9643,
"longitude": 138.6466,
"name": "Tollgate Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5064",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 40
},
{
"address": "9 Warenda Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "3240942",
"latitude": -33.846573,
"longitude": 138.62152,
"name": "Riesling Trail and Clare Valley Cottages",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 41
},
{
"address": "Sevenhill, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "3281019",
"latitude": -33.90826,
"longitude": 138.6238,
"name": "Skillogalee Cottages",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 42
},
{
"address": "191 Main North Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "3516966",
"latitude": -33.835503,
"longitude": 138.61389,
"name": "Bentleys Hotel Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 43
},
{
"address": "220 Spring Gully Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "3668974",
"latitude": -33.866726,
"longitude": 138.59903,
"name": "Clare View Accommodation",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 44
},
{
"address": "Motel 393 Main North Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Enfield",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "4257826",
"latitude": -34.86265,
"longitude": 138.60156,
"name": "Enfield Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5085",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"120684P2",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 45
},
{
"address": "Lot 136 Main North Road",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "4345469",
"latitude": -33.864716,
"longitude": 138.62134,
"name": "Discovery Parks - Clare",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 46
},
{
"address": "16-28 Adelaide Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Stansbury",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "4856431",
"latitude": -34.903656,
"longitude": 137.79562,
"name": "Stansbury Holiday Motel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5582",
"productCodes": [
"200245P4"
],
"sortOrder": 47
},
{
"address": "135 Esplanade, cnr Jetty Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Brighton",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "4861044",
"latitude": -35.01719,
"longitude": 138.51463,
"name": "Esplanade Hotel Adelaide",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5048",
"productCodes": [
"181322P2"
],
"sortOrder": 48
},
{
"address": "off Gaelic Cemetery Road, Stanley Flat",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "4971218",
"latitude": -33.78769,
"longitude": 138.60567,
"name": "Wuthering Heights",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5034",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 49
},
{
"address": "431 Bungaree Road, (Off Highway B82)",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "5004100",
"latitude": -33.7714,
"longitude": 138.5837,
"name": "Bungaree Station",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 50
},
{
"address": "18 Victoria Rd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "6029450",
"latitude": -33.83657,
"longitude": 138.61197,
"name": "Clare Valley Heritage Retreat",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": [
"56243P2",
"56243P3",
"56243P6"
],
"sortOrder": 51
},
{
"address": "29 Hope St",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Clare",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "6461957",
"latitude": -33.83995,
"longitude": 138.61311,
"name": "The Reserve Apartment",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5453",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 52
},
{
"address": "The Watson 33 Warwick St",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Walkerville",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "7755816",
"latitude": -34.896725,
"longitude": 138.61743,
"name": "The Watson Adelaide - Art Series",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5081",
"productCodes": [
"119946P4",
"119946P5",
"119946P6",
"119946P8",
"119946P9",
"120684P2",
"120684P5",
"142696P2",
"142696P5",
"200245P1",
"200245P4",
"200245P5",
"200245P7",
"201625P1",
"215244P1",
"233580P1",
"233580P2",
"233580P4",
"238603P1",
"40887P5"
],
"sortOrder": 53
},
{
"address": "Moana Tourist Park 44 Nashwauk Cres",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Moana",
"destinationId": 123,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "7870501",
"latitude": -35.19921,
"longitude": 138.47296,
"name": "Moana Beach Tourist Park",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "5169",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 54
}
],
"dateStamp": "2020-02-10T18:33:02+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331004"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"address": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destinationId": 0,
"hotelString": "I live locally / I'm staying with friends, relatives",
"id": "local",
"latitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"longitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"name": "I live locally / I'm staying with friends, relatives",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"postcode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 1
},
{
"address": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destinationId": 0,
"hotelString": "My hotel is not yet booked",
"id": "notBooked",
"latitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"longitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"name": "My hotel is not yet booked",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"postcode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 2
},
{
"address": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destinationId": 0,
"hotelString": "My hotel is not listed",
"id": "notListed",
"latitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"longitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"name": "My hotel is not listed",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"postcode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 3
},
{
"address": "3730 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091925",
"latitude": 36.107323,
"longitude": -115.17628,
"name": "ARIA Resort & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89158-4300",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 4
},
{
"address": "3645 Las Vegas Blvd S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1121312",
"latitude": 36.113705,
"longitude": -115.16985,
"name": "Bally's Las Vegas Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4321",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 5
},
{
"address": "3600 Las Vegas Blvd S",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091703",
"latitude": 36.112026,
"longitude": -115.175285,
"name": "Bellagio Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4303",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 6
},
{
"address": "3570 Las Vegas Blvd South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091762",
"latitude": 36.115753,
"longitude": -115.174446,
"name": "Caesars Palace",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8933",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 7
},
{
"address": "2880 Las Vegas Blvd S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091770",
"latitude": 36.13704,
"longitude": -115.16351,
"name": "Circus Circus Hotel & Casino Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-1138",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 8
},
{
"address": "3940 S Las Vegas Blvd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1496876",
"latitude": 36.093147,
"longitude": -115.17744,
"name": "Delano Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89119-1002",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 9
},
{
"address": "206 N. 3rd Street",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "5790631",
"latitude": 36.17198,
"longitude": -115.14171,
"name": "Downtown Grand",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89101-2931",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 10
},
{
"address": "600 East Fremont Street, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1111692",
"latitude": 36.169106,
"longitude": -115.139015,
"name": "El Cortez Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89101-5614",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 11
},
{
"address": "80 East Harmon Avenue, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2639337",
"latitude": 36.108875,
"longitude": -115.16867,
"name": "Elara By Hilton Grand Vacations - Center Strip",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4539",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 12
},
{
"address": "3131 Las Vegas Boulevard S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2123368",
"latitude": 36.128822,
"longitude": -115.1649,
"name": "Encore At Wynn Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-1967",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 13
},
{
"address": "3850 S Las Vegas Blvd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1097786",
"latitude": 36.098976,
"longitude": -115.17598,
"name": "Excalibur Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4300",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 14
},
{
"address": "3555 Las Vegas Blvd S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091844",
"latitude": 36.116383,
"longitude": -115.172195,
"name": "Flamingo Las Vegas Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8901",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 15
},
{
"address": "200 Fremont St",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1111699",
"latitude": 36.170788,
"longitude": -115.14377,
"name": "Fremont Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89101-5622",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 16
},
{
"address": "4000 W Flamingo Rd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091823",
"latitude": 36.11706,
"longitude": -115.19205,
"name": "Gold Coast Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89103-4088",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 17
},
{
"address": "129 Fremont St, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091828",
"latitude": 36.17005,
"longitude": -115.145645,
"name": "Golden Nugget Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89101-5603",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 18
},
{
"address": "3475 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1114889",
"latitude": 36.119415,
"longitude": -115.17206,
"name": "Harrah's Las Vegas Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8922",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 19
},
{
"address": "3575 Las Vegas Blvd S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1217597",
"latitude": 36.116592,
"longitude": -115.1696,
"name": "Hilton Grand Vacations at the Flamingo",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8919",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 20
},
{
"address": "3950 Koval Ln, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2164660",
"latitude": 36.11815,
"longitude": -115.16341,
"name": "Holiday Inn Club Vacations at Desert Club Resort",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4702",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 21
},
{
"address": "3900 S Las Vegas Blvd, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1111709",
"latitude": 36.09734,
"longitude": -115.17634,
"name": "Luxor Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89119-1004",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 22
},
{
"address": "3950 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091886",
"latitude": 36.0959,
"longitude": -115.174095,
"name": "Mandalay Bay Resort & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89119-1006",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 23
},
{
"address": "75 East Harmon Avenue, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1567617",
"latitude": 36.10761,
"longitude": -115.16966,
"name": "Marriott's Grand Chateau",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 24
},
{
"address": "3799 S Las Vegas Blvd",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091891",
"latitude": 36.102436,
"longitude": -115.16935,
"name": "MGM Grand Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4319",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 25
},
{
"address": "3790 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091904",
"latitude": 36.102093,
"longitude": -115.17433,
"name": "New York - New York Hotel and Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4338",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 26
},
{
"address": "115 E Tropicana Avenue, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1600446",
"latitude": 36.10006,
"longitude": -115.167595,
"name": "OYO Las Vegas Hotel and Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-7304",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 27
},
{
"address": "4321 West Flamingo Road, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1208820",
"latitude": 36.114502,
"longitude": -115.19429,
"name": "Palms Casino Resort",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89103-3903",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 28
},
{
"address": "3655 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1143336",
"latitude": 36.11242,
"longitude": -115.17175,
"name": "Paris Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4345",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 29
},
{
"address": "3770 S Las Vegas Blvd, South Part of the Strip, Next to NY Hotel",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1097712",
"latitude": 36.132004,
"longitude": -115.16145,
"name": "Park MGM Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4337",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 30
},
{
"address": "3667 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091687",
"latitude": 36.110043,
"longitude": -115.17096,
"name": "Planet Hollywood Resort & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4331",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 31
},
{
"address": "3745 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091916",
"latitude": 36.106483,
"longitude": -115.17092,
"name": "Polo Towers Suites",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4308",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 32
},
{
"address": "3700 W Flamingo, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091673",
"latitude": 36.1161,
"longitude": -115.18675,
"name": "Rio All-Suite Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89103-4043",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 33
},
{
"address": "145 East Harmon Avenue",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1601419",
"latitude": 36.106987,
"longitude": -115.166756,
"name": "Signature at MGM Grand",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4504",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 34
},
{
"address": "3708 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2829539",
"latitude": 36.109745,
"longitude": -115.17384,
"name": "The Cosmopolitan of Las Vegas, Autograph Collection",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4309",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 35
},
{
"address": "3595 Las Vegas Boulevard South",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "7537691",
"latitude": 36.114937,
"longitude": -115.172455,
"name": "The Cromwell Hotel Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8918",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 36
},
{
"address": "301 Fremont Street, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091679",
"latitude": 36.169464,
"longitude": -115.142784,
"name": "The D Casino Hotel Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89101-5600",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 37
},
{
"address": "3535 Las Vegas Blvd S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1186114",
"latitude": 36.118,
"longitude": -115.17194,
"name": "The LINQ Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8921",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 38
},
{
"address": "3400 Las Vegas Blvd. S., ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1097737",
"latitude": 36.121216,
"longitude": -115.17343,
"name": "The Mirage Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8923",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 39
},
{
"address": "3325 Las Vegas Blvd South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1675000",
"latitude": 36.12396,
"longitude": -115.16791,
"name": "The Palazzo at The Venetian",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-1414",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 40
},
{
"address": "2000 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1114898",
"latitude": 36.147305,
"longitude": -115.155594,
"name": "The STRAT Hotel, Casino & SkyPod",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89104-2507",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 41
},
{
"address": "3355 Las Vegas Blvd S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1097704",
"latitude": 36.121475,
"longitude": -115.16994,
"name": "The Venetian Resort",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8941",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 42
},
{
"address": "3300 Las Vegas Blvd S, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1091967",
"latitude": 36.123917,
"longitude": -115.17123,
"name": "Treasure Island Hotel & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-8916",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 43
},
{
"address": "3801 Las Vegas Blvd South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1097730",
"latitude": 36.09878,
"longitude": -115.17033,
"name": "Tropicana Las Vegas - A DoubleTree by Hilton Hotel",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-4325",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 44
},
{
"address": "2000 Fashion Show Drive, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2022061",
"latitude": 36.12944,
"longitude": -115.17272,
"name": "Trump International Hotel Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-1936",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 45
},
{
"address": "255 East Flamingo Road, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1224853",
"latitude": 36.113308,
"longitude": -115.160835,
"name": "Tuscany Suites & Casino",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89169-4708",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 46
},
{
"address": "2600 W. Harmon Avenue, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2474086",
"latitude": 36.109516,
"longitude": -115.17793,
"name": "Vdara Hotel & Spa at ARIA Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89158-4538",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 47
},
{
"address": "3752 S Las Vegas Blvd S\n\n, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "2456410",
"latitude": 36.106415,
"longitude": -115.17404,
"name": "Waldorf Astoria Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89158-4382",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 48
},
{
"address": "3131 Las Vegas Boulevard South, ",
"brand": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"city": "Las Vegas",
"destinationId": 684,
"hotelString": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"id": "1503598",
"latitude": 36.126553,
"longitude": -115.16552,
"name": "Wynn Las Vegas",
"notes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"phone": "+1 123 456 7890",
"postcode": "89109-1967",
"productCodes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sortOrder": 49
}
],
"dateStamp": "2020-02-10T18:29:35+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331005"
}
GET
-booking-mybookings
{{baseUrl}}/booking/mybookings
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/mybookings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/booking/mybookings" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/booking/mybookings"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/booking/mybookings"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/mybookings");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/mybookings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/booking/mybookings HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/booking/mybookings")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/mybookings"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/mybookings")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/booking/mybookings")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/booking/mybookings');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/mybookings',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/mybookings';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/mybookings',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/booking/mybookings")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/mybookings',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/mybookings',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/booking/mybookings');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/mybookings',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/mybookings';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/mybookings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/mybookings" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/mybookings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/booking/mybookings', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/mybookings');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/booking/mybookings');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/mybookings' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/mybookings' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/booking/mybookings", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/mybookings"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/mybookings"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/mybookings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/booking/mybookings') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/mybookings";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/booking/mybookings \
--header 'accept-language: '
http GET {{baseUrl}}/booking/mybookings \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/booking/mybookings
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/mybookings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"bookerEmail": "apitest@viator.com",
"bookingDate": "2020-02-11",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITINERARY",
"pending": false,
"status": 3,
"text": "Confirmed",
"type": "CONFIRMED"
},
"currencyCode": "USD",
"distributorRef": "distributorRef100000",
"exchangeRate": 1,
"hasVoucher": true,
"itemSummaries": [
{
"applePassSupported": false,
"appleWalletURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"barcodeOption": "tour",
"barcodeType": "code128",
"bookingEngineId": "FO",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITEM",
"pending": false,
"status": 1,
"text": "Paid & Confirmed",
"type": "CONFIRMED"
},
"currencyCode": "USD",
"departsFrom": "Las Vegas, United States",
"departurePoint": "Traveler pickup is offered<br><br>",
"departurePointAddress": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"departurePointDirections": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destId": 684,
"distributorItemRef": "itemRef1000000",
"hoursConfirmed": 0,
"itemId": 580669678,
"itineraryId": 1005851866,
"languageServicesLanguageCode": "en",
"lastRetailPrice": 388.72,
"lastRetailPriceFormatted": "$388.72",
"leadTravellerFirstname": "Homer test",
"leadTravellerSurname": "Simpson test",
"leadTravellerTitle": "Mr",
"merchantCancellable": true,
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"merchantTermsAndConditions": {
"amountRefundable": "USD 412.04",
"cancellationFromTourDate": [
{
"dayRangeMax": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"dayRangeMin": 1,
"percentageRefundable": 100,
"policyEndTimestamp": 1585580400,
"policyStartTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"dayRangeMax": 1,
"dayRangeMin": 0,
"percentageRefundable": 0,
"policyEndTimestamp": 1585666800,
"policyStartTimestamp": 1585580400
}
],
"merchantTermsAndConditionsType": 1,
"termsAndConditions": "For a full refund, cancel at least 24 hours in advance of the start date of the experience."
},
"obfsId": 362208,
"passbooks": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelName": "null",
"price": 412.04,
"priceFormatted": "$412.04",
"priceUSD": 412.04,
"productCode": "2280AAHT",
"productPulledDown": false,
"productTitle": "Grand Canyon All-American Helicopter Tour",
"productWidgetList": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rnplInfo": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"savingAmount": 0,
"savingAmountFormated": "$0.00",
"sortOrder": 0,
"startingTime": "8:00 AM",
"supplierName": "Sundance Helicopters",
"supplierPhoneNumber": "+1 123 456 7890",
"termsAndConditions": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"tourGradeCode": "TG1~08:00",
"tourGradeDescription": "Morning Departure; A-Star 08:00 (TG1~08:00)",
"travelDate": "2020-03-31",
"travellerAgeBands": [
{
"ageBandId": 1,
"count": 1,
"description": "Adult",
"pluralDescription": "Adults",
"sortOrder": 0
}
],
"voucherKey": "1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e:580669678",
"voucherOption": "VOUCHER_E",
"voucherRequirements": "You can present either a paper or an electronic voucher for this activity.",
"voucherURL": "https://viatorapi.live.rc.viator.com/service/merchant/voucher.jspa?code=1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e:580669678&embedResources=false",
"vouchers": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"itineraryId": 1005851866,
"omniPreRuleList": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"paypalRedirectURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"securityToken": "4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e",
"sortOrder": 1,
"totalPrice": 412.04,
"totalPriceFormatted": "$412.04",
"totalPriceUSD": 412.04,
"userId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"voucherKey": "1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e",
"voucherURL": "https://viatorapi.live.rc.viator.com/service/merchant/voucher.jspa?code=1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e&embedResources=false"
}
],
"dateStamp": "2020-02-11T20:27:20+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331004"
}
GET
-booking-pastbooking
{{baseUrl}}/booking/pastbooking
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/pastbooking");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/booking/pastbooking" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/booking/pastbooking"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/booking/pastbooking"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/pastbooking");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/pastbooking"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/booking/pastbooking HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/booking/pastbooking")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/pastbooking"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/pastbooking")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/booking/pastbooking")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/booking/pastbooking');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/pastbooking',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/pastbooking';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/pastbooking',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/booking/pastbooking")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/pastbooking',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/pastbooking',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/booking/pastbooking');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/pastbooking',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/pastbooking';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/pastbooking"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/pastbooking" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/pastbooking",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/booking/pastbooking', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/pastbooking');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/booking/pastbooking');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/pastbooking' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/pastbooking' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/booking/pastbooking", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/pastbooking"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/pastbooking"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/pastbooking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/booking/pastbooking') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/pastbooking";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/booking/pastbooking \
--header 'accept-language: '
http GET {{baseUrl}}/booking/pastbooking \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/booking/pastbooking
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/pastbooking")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"bookerEmail": "apitest@viator.com",
"bookingDate": "2020-02-11",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITINERARY",
"pending": false,
"status": 3,
"text": "Confirmed",
"type": "CONFIRMED"
},
"currencyCode": "USD",
"distributorRef": "distributorRef100000",
"exchangeRate": 1,
"hasVoucher": true,
"itemSummaries": [
{
"applePassSupported": false,
"appleWalletURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"barcodeOption": "tour",
"barcodeType": "code128",
"bookingEngineId": "FO",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITEM",
"pending": false,
"status": 1,
"text": "Paid & Confirmed",
"type": "CONFIRMED"
},
"currencyCode": "USD",
"departsFrom": "Las Vegas, United States",
"departurePoint": "Traveler pickup is offered<br><br>",
"departurePointAddress": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"departurePointDirections": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destId": 684,
"distributorItemRef": "itemRef1000000",
"hoursConfirmed": 0,
"itemId": 580669678,
"itineraryId": 1005851866,
"languageServicesLanguageCode": "en",
"lastRetailPrice": 388.72,
"lastRetailPriceFormatted": "$388.72",
"leadTravellerFirstname": "Homer test",
"leadTravellerSurname": "Simpson test",
"leadTravellerTitle": "Mr",
"merchantCancellable": true,
"merchantNetPrice": 388.72,
"merchantNetPriceFormatted": "$388.72",
"merchantTermsAndConditions": {
"amountRefundable": "USD 412.04",
"cancellationFromTourDate": [
{
"dayRangeMax": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"dayRangeMin": 1,
"percentageRefundable": 100,
"policyEndTimestamp": 1585580400,
"policyStartTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"dayRangeMax": 1,
"dayRangeMin": 0,
"percentageRefundable": 0,
"policyEndTimestamp": 1585666800,
"policyStartTimestamp": 1585580400
}
],
"merchantTermsAndConditionsType": 1,
"termsAndConditions": "For a full refund, cancel at least 24 hours in advance of the start date of the experience."
},
"obfsId": 362208,
"passbooks": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"pickupHotelName": "null",
"price": 412.04,
"priceFormatted": "$412.04",
"priceUSD": 412.04,
"productCode": "2280AAHT",
"productPulledDown": false,
"productTitle": "Grand Canyon All-American Helicopter Tour",
"productWidgetList": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rnplInfo": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"savingAmount": 0,
"savingAmountFormated": "$0.00",
"sortOrder": 0,
"startingTime": "8:00 AM",
"supplierName": "Sundance Helicopters",
"supplierPhoneNumber": "+1 123 456 7890",
"termsAndConditions": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"tourGradeCode": "TG1~08:00",
"tourGradeDescription": "Morning Departure; A-Star 08:00 (TG1~08:00)",
"travelDate": "2020-03-31",
"travellerAgeBands": [
{
"ageBandId": 1,
"count": 1,
"description": "Adult",
"pluralDescription": "Adults",
"sortOrder": 0
}
],
"voucherKey": "1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e:580669678",
"voucherOption": "VOUCHER_E",
"voucherRequirements": "You can present either a paper or an electronic voucher for this activity.",
"voucherURL": "https://viatorapi.live.rc.viator.com/service/merchant/voucher.jspa?code=1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e:580669678&embedResources=false",
"vouchers": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"itineraryId": 1005851866,
"omniPreRuleList": [],
"paypalRedirectURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rulesApplied": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"securityToken": "4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e",
"sortOrder": 0,
"totalPrice": 412.04,
"totalPriceFormatted": "$412.04",
"totalPriceUSD": 412.04,
"userId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"voucherKey": "1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e",
"voucherURL": "https://viatorapi.live.rc.viator.com/service/merchant/voucher.jspa?code=1005851866:4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e&embedResources=false"
},
"dateStamp": "2020-02-11T20:06:43+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
POST
-booking-pricingmatrix
{{baseUrl}}/booking/pricingmatrix
HEADERS
Accept-Language
BODY json
{
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/pricingmatrix");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/pricingmatrix" {:headers {:accept-language ""}
:content-type :json
:form-params {:bookingDate ""
:currencyCode ""
:productCode ""
:tourGradeCode ""}})
require "http/client"
url = "{{baseUrl}}/booking/pricingmatrix"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/pricingmatrix"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/pricingmatrix");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/pricingmatrix"
payload := strings.NewReader("{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/pricingmatrix HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 89
{
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/pricingmatrix")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/pricingmatrix"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/pricingmatrix")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/pricingmatrix")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
bookingDate: '',
currencyCode: '',
productCode: '',
tourGradeCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/pricingmatrix');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/pricingmatrix',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {bookingDate: '', currencyCode: '', productCode: '', tourGradeCode: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/pricingmatrix';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"bookingDate":"","currencyCode":"","productCode":"","tourGradeCode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/pricingmatrix',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "bookingDate": "",\n "currencyCode": "",\n "productCode": "",\n "tourGradeCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/pricingmatrix")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/pricingmatrix',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({bookingDate: '', currencyCode: '', productCode: '', tourGradeCode: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/pricingmatrix',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {bookingDate: '', currencyCode: '', productCode: '', tourGradeCode: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/pricingmatrix');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
bookingDate: '',
currencyCode: '',
productCode: '',
tourGradeCode: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/pricingmatrix',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {bookingDate: '', currencyCode: '', productCode: '', tourGradeCode: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/pricingmatrix';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"bookingDate":"","currencyCode":"","productCode":"","tourGradeCode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bookingDate": @"",
@"currencyCode": @"",
@"productCode": @"",
@"tourGradeCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/pricingmatrix"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/pricingmatrix" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/pricingmatrix",
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([
'bookingDate' => '',
'currencyCode' => '',
'productCode' => '',
'tourGradeCode' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/pricingmatrix', [
'body' => '{
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/pricingmatrix');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bookingDate' => '',
'currencyCode' => '',
'productCode' => '',
'tourGradeCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bookingDate' => '',
'currencyCode' => '',
'productCode' => '',
'tourGradeCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/booking/pricingmatrix');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/pricingmatrix' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/pricingmatrix' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/pricingmatrix", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/pricingmatrix"
payload = {
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/pricingmatrix"
payload <- "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/pricingmatrix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/pricingmatrix') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"bookingDate\": \"\",\n \"currencyCode\": \"\",\n \"productCode\": \"\",\n \"tourGradeCode\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/pricingmatrix";
let payload = json!({
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/pricingmatrix \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}'
echo '{
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
}' | \
http POST {{baseUrl}}/booking/pricingmatrix \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "bookingDate": "",\n "currencyCode": "",\n "productCode": "",\n "tourGradeCode": ""\n}' \
--output-document \
- {{baseUrl}}/booking/pricingmatrix
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"bookingDate": "",
"currencyCode": "",
"productCode": "",
"tourGradeCode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/pricingmatrix")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"ageBandPrices": [
{
"bandId": 1,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "EUR",
"merchantNetPrice": 26.64,
"merchantNetPriceFormatted": "€26,64",
"minNoOfTravellersRequiredForPrice": 1,
"price": 33.35,
"priceFormatted": "€33,35",
"sortOrder": 1
}
],
"sortOrder": 1
},
{
"bandId": 2,
"maximumCountRequired": 9,
"minimumCountRequired": 0,
"prices": [
{
"currencyCode": "EUR",
"merchantNetPrice": 18.06,
"merchantNetPriceFormatted": "€18,06",
"minNoOfTravellersRequiredForPrice": 1,
"price": 22.61,
"priceFormatted": "€22,61",
"sortOrder": 1
}
],
"sortOrder": 2
}
],
"bookingDate": "2020-03-11",
"pricingUnit": "per person",
"sortOrder": 1
}
],
"dateStamp": "2020-02-11T16:21:23+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
POST
-booking-status-items
{{baseUrl}}/booking/status/items
HEADERS
Accept-Language
BODY json
{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/status/items");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/status/items" {:headers {:accept-language ""}
:content-type :json
:form-params {:bookingDateFrom ""
:bookingDateTo ""
:distributorItemRefs []
:distributorRefs []
:itemIds []
:leadFirstName ""
:leadSurname ""
:test false}})
require "http/client"
url = "{{baseUrl}}/booking/status/items"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/status/items"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/status/items");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/status/items"
payload := strings.NewReader("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/status/items HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 182
{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/status/items")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/status/items"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/status/items")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/status/items")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
.asString();
const data = JSON.stringify({
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/status/items');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/status/items',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/status/items';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"bookingDateFrom":"","bookingDateTo":"","distributorItemRefs":[],"distributorRefs":[],"itemIds":[],"leadFirstName":"","leadSurname":"","test":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/status/items',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "bookingDateFrom": "",\n "bookingDateTo": "",\n "distributorItemRefs": [],\n "distributorRefs": [],\n "itemIds": [],\n "leadFirstName": "",\n "leadSurname": "",\n "test": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/status/items")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/status/items',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/status/items',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/status/items');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/status/items',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/status/items';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"bookingDateFrom":"","bookingDateTo":"","distributorItemRefs":[],"distributorRefs":[],"itemIds":[],"leadFirstName":"","leadSurname":"","test":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bookingDateFrom": @"",
@"bookingDateTo": @"",
@"distributorItemRefs": @[ ],
@"distributorRefs": @[ ],
@"itemIds": @[ ],
@"leadFirstName": @"",
@"leadSurname": @"",
@"test": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/status/items"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/status/items" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/status/items",
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([
'bookingDateFrom' => '',
'bookingDateTo' => '',
'distributorItemRefs' => [
],
'distributorRefs' => [
],
'itemIds' => [
],
'leadFirstName' => '',
'leadSurname' => '',
'test' => null
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/status/items', [
'body' => '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/status/items');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bookingDateFrom' => '',
'bookingDateTo' => '',
'distributorItemRefs' => [
],
'distributorRefs' => [
],
'itemIds' => [
],
'leadFirstName' => '',
'leadSurname' => '',
'test' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bookingDateFrom' => '',
'bookingDateTo' => '',
'distributorItemRefs' => [
],
'distributorRefs' => [
],
'itemIds' => [
],
'leadFirstName' => '',
'leadSurname' => '',
'test' => null
]));
$request->setRequestUrl('{{baseUrl}}/booking/status/items');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/status/items' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/status/items' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/status/items", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/status/items"
payload = {
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": False
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/status/items"
payload <- "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/status/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/status/items') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/status/items";
let payload = json!({
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": (),
"distributorRefs": (),
"itemIds": (),
"leadFirstName": "",
"leadSurname": "",
"test": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/status/items \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}'
echo '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}' | \
http POST {{baseUrl}}/booking/status/items \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "bookingDateFrom": "",\n "bookingDateTo": "",\n "distributorItemRefs": [],\n "distributorRefs": [],\n "itemIds": [],\n "leadFirstName": "",\n "leadSurname": "",\n "test": false\n}' \
--output-document \
- {{baseUrl}}/booking/status/items
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/status/items")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITEM",
"pending": false,
"status": 1,
"text": "Paid & Confirmed",
"type": "CONFIRMED"
},
"distributorItemRef": "itemRef1000000",
"itemId": 580669678
}
],
"dateStamp": "2020-02-11T19:03:06+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331001"
}
POST
-booking-status
{{baseUrl}}/booking/status
HEADERS
Accept-Language
BODY json
{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/status");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/booking/status" {:headers {:accept-language ""}
:content-type :json
:form-params {:bookingDateFrom ""
:bookingDateTo ""
:distributorItemRefs []
:distributorRefs []
:itemIds []
:leadFirstName ""
:leadSurname ""
:test false}})
require "http/client"
url = "{{baseUrl}}/booking/status"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/booking/status"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/status");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/status"
payload := strings.NewReader("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/booking/status HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 182
{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/booking/status")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/status"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/status")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/booking/status")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
.asString();
const data = JSON.stringify({
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/booking/status');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/status',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/status';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"bookingDateFrom":"","bookingDateTo":"","distributorItemRefs":[],"distributorRefs":[],"itemIds":[],"leadFirstName":"","leadSurname":"","test":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/status',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "bookingDateFrom": "",\n "bookingDateTo": "",\n "distributorItemRefs": [],\n "distributorRefs": [],\n "itemIds": [],\n "leadFirstName": "",\n "leadSurname": "",\n "test": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/booking/status")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/status',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/status',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/booking/status');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/booking/status',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
bookingDateFrom: '',
bookingDateTo: '',
distributorItemRefs: [],
distributorRefs: [],
itemIds: [],
leadFirstName: '',
leadSurname: '',
test: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/status';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"bookingDateFrom":"","bookingDateTo":"","distributorItemRefs":[],"distributorRefs":[],"itemIds":[],"leadFirstName":"","leadSurname":"","test":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bookingDateFrom": @"",
@"bookingDateTo": @"",
@"distributorItemRefs": @[ ],
@"distributorRefs": @[ ],
@"itemIds": @[ ],
@"leadFirstName": @"",
@"leadSurname": @"",
@"test": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/status"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/status" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/status",
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([
'bookingDateFrom' => '',
'bookingDateTo' => '',
'distributorItemRefs' => [
],
'distributorRefs' => [
],
'itemIds' => [
],
'leadFirstName' => '',
'leadSurname' => '',
'test' => null
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/booking/status', [
'body' => '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/status');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bookingDateFrom' => '',
'bookingDateTo' => '',
'distributorItemRefs' => [
],
'distributorRefs' => [
],
'itemIds' => [
],
'leadFirstName' => '',
'leadSurname' => '',
'test' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bookingDateFrom' => '',
'bookingDateTo' => '',
'distributorItemRefs' => [
],
'distributorRefs' => [
],
'itemIds' => [
],
'leadFirstName' => '',
'leadSurname' => '',
'test' => null
]));
$request->setRequestUrl('{{baseUrl}}/booking/status');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/booking/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/status"
payload = {
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": False
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/status"
payload <- "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/booking/status') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"bookingDateFrom\": \"\",\n \"bookingDateTo\": \"\",\n \"distributorItemRefs\": [],\n \"distributorRefs\": [],\n \"itemIds\": [],\n \"leadFirstName\": \"\",\n \"leadSurname\": \"\",\n \"test\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/status";
let payload = json!({
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": (),
"distributorRefs": (),
"itemIds": (),
"leadFirstName": "",
"leadSurname": "",
"test": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/booking/status \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}'
echo '{
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
}' | \
http POST {{baseUrl}}/booking/status \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "bookingDateFrom": "",\n "bookingDateTo": "",\n "distributorItemRefs": [],\n "distributorRefs": [],\n "itemIds": [],\n "leadFirstName": "",\n "leadSurname": "",\n "test": false\n}' \
--output-document \
- {{baseUrl}}/booking/status
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"bookingDateFrom": "",
"bookingDateTo": "",
"distributorItemRefs": [],
"distributorRefs": [],
"itemIds": [],
"leadFirstName": "",
"leadSurname": "",
"test": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"bookingDate": "2020-02-11",
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITINERARY",
"pending": false,
"status": 3,
"text": "Confirmed",
"type": "CONFIRMED"
},
"distributorRef": "distributorRef100000",
"itemSummaries": [
{
"bookingStatus": {
"amended": false,
"cancelled": false,
"confirmed": true,
"failed": false,
"level": "ITEM",
"pending": false,
"status": 1,
"text": "Paid & Confirmed",
"type": "CONFIRMED"
},
"distributorItemRef": "itemRef1000000",
"itemId": 580669678,
"itineraryId": 1005851866,
"sortOrder": 0,
"travelDate": "2020-03-31"
}
],
"itineraryId": 1005851866,
"sortOrder": 1
}
],
"dateStamp": "2020-02-11T18:38:25+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331004"
}
GET
-booking-voucher
{{baseUrl}}/booking/voucher
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/booking/voucher");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/booking/voucher" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/booking/voucher"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/booking/voucher"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/booking/voucher");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/booking/voucher"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/booking/voucher HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/booking/voucher")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/booking/voucher"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/booking/voucher")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/booking/voucher")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/booking/voucher');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/voucher',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/booking/voucher';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/booking/voucher',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/booking/voucher")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/booking/voucher',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/voucher',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/booking/voucher');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/booking/voucher',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/booking/voucher';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/booking/voucher"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/booking/voucher" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/booking/voucher",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/booking/voucher', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/booking/voucher');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/booking/voucher');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/booking/voucher' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/booking/voucher' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/booking/voucher", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/booking/voucher"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/booking/voucher"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/booking/voucher")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/booking/voucher') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/booking/voucher";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/booking/voucher \
--header 'accept-language: '
http GET {{baseUrl}}/booking/voucher \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/booking/voucher
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/booking/voucher")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width\" />\n <title>Viator</title>\n </head>\n <body>\n <div id=\"content\" class=\"voucher_box\">\n <div id=\"voucher_1\">\n\n <div class=\"section\">\n <div class=\"voucher_title\">\n Voucher 1\n of 1: Homer test Simpson test\n </div>\n </div>\n\n <div class=\"section bline\">\n <div class=\"btn_box\">\n </div>\n </div>\n\n <div style=\"line-height: 1.5;font-family:'Arial','Helvetica','Verdana',sans-serif; font-size: 12px; padding: 0 10px; border-bottom: 1px solid #CAE2EA;\">\n\n <h2 style=\"font-size:16px;font-weight:bold;margin:0.5em 0;padding:0;\">\n Grand Canyon All-American Helicopter Tour\n <span style=\"display: block;font-size:12px;\">\n Morning Departure; A-Star 08:00\n </span>\n </h2>\n\n <div class=\"barcode\">\n <img src=\"/voucher/resource?type=barcode&itineraryItemId=580669678&voucherToken=4af44c13ecf3f1a7d3f9ef2fc00c2257e08fa42ae20f877f3039ff9b52aba24e\" alt=\"\"/>\n </div>\n\n <h2 style=\"font-size:16px;font-weight:bold;margin:0.5em 0;padding:0;\">SAMPLE ONLY</h2>\n\n <ul style=\"margin:0 0 1em 1em; padding:0;\">\n <li>\n <strong>Date:</strong>\n Tuesday March 31, 2020\n </li>\n </ul>\n\n <ul style=\"margin:0 0 1em 1em; padding:0;\">\n <li>\n <strong>Lead traveler\n :\n </strong>Homer test Simpson test\n </li>\n <li>\n <strong>Number of Travelers\n :\n </strong>1 Adult</li>\n\n <li>\n <strong>Booking Reference:\n </strong>BR-580669678</li>\n\n <li>\n <strong>Product Code:\n </strong>2280AAHT</li>\n\n <li>\n <strong>Option Code:\n </strong>TG1~08:00</li>\n\n <li>\n <strong>Supplier\n : </strong>Sundance Helicopters</li>\n\n\n\n\n\n <li>\n <strong>Location\n :</strong>\n <p>Traveler pickup is offered<br><br></p>\n </li>\n\n <li>\n <strong>Tour Option Description\n :</strong>\n Morning departure between 8am and 11:45am on an A-Star Helicopter for the All American Helicopter Tour\n \n </li>\n </ul>\n\n <h3 style=\"font-size:14px;font-weight:bold;margin:0.5em 0;padding:0;\">\n Voucher Information\n </h3>\n\n <ul style=\"margin:0 0 1em 1em; padding:0;\">\n You can present either a paper or an electronic voucher for this activity.\n <span style=\"color:#888888;\"> / You can present either a paper or an electronic voucher for this activity.</span>\n </ul>\n\n <h3 style=\"font-size:14px;font-weight:bold;margin:0.5em 0;padding:0;\">\n Important Information\n </h3>\n <ul>\n<li>Your local contact is Sundance Helicopters on +17027360606.</li></ul>\n• Important: due to comfort, weight and balance of the aircraft, the maximum weight per passenger to ride in an A-Star helicopter is 275lbs (125kg / 19.6st). If passengers weigh in between 275lbs and 300lbs (136kg/21.4st), you will be required to upgrade to the EC-130.<br> • Any passenger over 300lbs will be required to purchase an additional seat. This is payable directly to the tour operator on the day of the tour.<br> • Due to the nature of this tour and the safety of all guests, the tour operator reserves the right to refuse service to passengers who are intoxicated or show signs of intoxication. If, as a result, your tour is canceled, you will not be entitled to a refund.<br> • Infant children must be under the age of two and have proof of age, such as a passport and are considered lap children.<br> • Per FAA regulations, all passenger must present photo ID at check in.<br> • If you would like a vegetarian meal as your lunch option, please contact the local operator as soon as possible.<br> • Please Note: Please look for your Limo driver who will get out and will be looking for the lead traveler’s last name of whom the reservation is under. There is also a sign in the front windshield of the Limo that will say Sundance Helicopters.<br><br>Hotel pickups commence prior to this time, you must contact the local service provider to verify your exact pickup time.<br><br>All flight times are approximate and subject to change due to weather conditions and weight restrictions.<br>\n\n <h3 style=\"font-size:14px;font-weight:bold;margin:0.5em 0;padding:0;\">\n Inclusions\n </h3>\n <ul>\n<li>45-minute (approx.) flight each way (helicopter based on option selected)</li><li>Hotel pickup and drop-off by limousine</li><li>Snacks</li><li>Glass of Champagne</li><li>All taxes and fees</li></ul>\n\n\n <h3 style=\"font-size:14px;font-weight:bold;margin:0.5em 0;padding:0;\">\n Exclusions\n </h3>\n <ul>\n<li>Gratuities</li></ul>\n\n\n\n </div>\n\n </div>\n <br/>\n\n </div>\n\n </body>\n</html>\n",
"dateStamp": "2020-02-11T19:50:39+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
GET
-bookings-cancel-reasons
{{baseUrl}}/bookings/cancel-reasons
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bookings/cancel-reasons");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/bookings/cancel-reasons" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/bookings/cancel-reasons"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/bookings/cancel-reasons"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bookings/cancel-reasons");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bookings/cancel-reasons"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/bookings/cancel-reasons HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/bookings/cancel-reasons")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bookings/cancel-reasons"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/bookings/cancel-reasons")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/bookings/cancel-reasons")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/bookings/cancel-reasons');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/bookings/cancel-reasons',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bookings/cancel-reasons';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bookings/cancel-reasons',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/bookings/cancel-reasons")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/bookings/cancel-reasons',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/bookings/cancel-reasons',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/bookings/cancel-reasons');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/bookings/cancel-reasons',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bookings/cancel-reasons';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bookings/cancel-reasons"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bookings/cancel-reasons" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bookings/cancel-reasons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/bookings/cancel-reasons', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bookings/cancel-reasons');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/bookings/cancel-reasons');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bookings/cancel-reasons' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bookings/cancel-reasons' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/bookings/cancel-reasons", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bookings/cancel-reasons"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bookings/cancel-reasons"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bookings/cancel-reasons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/bookings/cancel-reasons') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bookings/cancel-reasons";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/bookings/cancel-reasons \
--header 'accept-language: '
http GET {{baseUrl}}/bookings/cancel-reasons \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/bookings/cancel-reasons
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bookings/cancel-reasons")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"reasons": [
{
"cancellationReasonCode": "Customer_Service.Unexpected_medical_circumstances",
"cancellationReasonText": "Unexpected/medical circumstances"
},
{
"cancellationReasonCode": "Customer_Service.Duplicate_Booking",
"cancellationReasonText": "Duplicate Booking"
},
{
"cancellationReasonCode": "Customer_Service.Tour operator asked me to cancel",
"cancellationReasonText": "Tour operator asked me to cancel"
},
{
"cancellationReasonCode": "Customer_Service.Chose_a_different_cheaper_tour",
"cancellationReasonText": "Chose a different/cheaper tour"
},
{
"cancellationReasonCode": "Customer_Service.Weather",
"cancellationReasonText": "Weather"
},
{
"cancellationReasonCode": "Customer_Service.Booked_wrong_tour_date",
"cancellationReasonText": "Booked wrong tour/date"
},
{
"cancellationReasonCode": "Customer_Service.I_canceled_my_entire_trip",
"cancellationReasonText": "I canceled my entire trip"
}
]
}
GET
-bookings-{booking-reference}-cancel-quote
{{baseUrl}}/bookings/:booking-reference/cancel-quote
QUERY PARAMS
booking-reference
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bookings/:booking-reference/cancel-quote");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/bookings/:booking-reference/cancel-quote")
require "http/client"
url = "{{baseUrl}}/bookings/:booking-reference/cancel-quote"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/bookings/:booking-reference/cancel-quote"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bookings/:booking-reference/cancel-quote");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bookings/:booking-reference/cancel-quote"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/bookings/:booking-reference/cancel-quote HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/bookings/:booking-reference/cancel-quote")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bookings/:booking-reference/cancel-quote"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/bookings/:booking-reference/cancel-quote")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/bookings/:booking-reference/cancel-quote")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/bookings/:booking-reference/cancel-quote');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/bookings/:booking-reference/cancel-quote'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bookings/:booking-reference/cancel-quote';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bookings/:booking-reference/cancel-quote',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/bookings/:booking-reference/cancel-quote")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/bookings/:booking-reference/cancel-quote',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/bookings/:booking-reference/cancel-quote'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/bookings/:booking-reference/cancel-quote');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/bookings/:booking-reference/cancel-quote'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bookings/:booking-reference/cancel-quote';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bookings/:booking-reference/cancel-quote"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bookings/:booking-reference/cancel-quote" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bookings/:booking-reference/cancel-quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/bookings/:booking-reference/cancel-quote');
echo $response->getBody();
setUrl('{{baseUrl}}/bookings/:booking-reference/cancel-quote');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/bookings/:booking-reference/cancel-quote');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bookings/:booking-reference/cancel-quote' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bookings/:booking-reference/cancel-quote' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/bookings/:booking-reference/cancel-quote")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bookings/:booking-reference/cancel-quote"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bookings/:booking-reference/cancel-quote"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bookings/:booking-reference/cancel-quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/bookings/:booking-reference/cancel-quote') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bookings/:booking-reference/cancel-quote";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/bookings/:booking-reference/cancel-quote
http GET {{baseUrl}}/bookings/:booking-reference/cancel-quote
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/bookings/:booking-reference/cancel-quote
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bookings/:booking-reference/cancel-quote")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bookingId": "BR-580669678",
"refundDetails": {
"currencyCode": "USD",
"itemPrice": 412.04,
"refundAmount": 412.04,
"refundPercentage": 100
},
"status": "CANCELLABLE"
}
POST
-bookings-{booking-reference}-cancel
{{baseUrl}}/bookings/:booking-reference/cancel
HEADERS
Accept-Language
QUERY PARAMS
booking-reference
BODY json
{
"reasonCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bookings/:booking-reference/cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"reasonCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bookings/:booking-reference/cancel" {:headers {:accept-language ""}
:content-type :json
:form-params {:reasonCode ""}})
require "http/client"
url = "{{baseUrl}}/bookings/:booking-reference/cancel"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"reasonCode\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bookings/:booking-reference/cancel"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"reasonCode\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bookings/:booking-reference/cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"reasonCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bookings/:booking-reference/cancel"
payload := strings.NewReader("{\n \"reasonCode\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bookings/:booking-reference/cancel HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"reasonCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bookings/:booking-reference/cancel")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"reasonCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bookings/:booking-reference/cancel"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"reasonCode\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"reasonCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bookings/:booking-reference/cancel")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bookings/:booking-reference/cancel")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"reasonCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
reasonCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bookings/:booking-reference/cancel');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bookings/:booking-reference/cancel',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {reasonCode: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bookings/:booking-reference/cancel';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"reasonCode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bookings/:booking-reference/cancel',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "reasonCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"reasonCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bookings/:booking-reference/cancel")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bookings/:booking-reference/cancel',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({reasonCode: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bookings/:booking-reference/cancel',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {reasonCode: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bookings/:booking-reference/cancel');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
reasonCode: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bookings/:booking-reference/cancel',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {reasonCode: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bookings/:booking-reference/cancel';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"reasonCode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"reasonCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bookings/:booking-reference/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bookings/:booking-reference/cancel" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"reasonCode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bookings/:booking-reference/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([
'reasonCode' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bookings/:booking-reference/cancel', [
'body' => '{
"reasonCode": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bookings/:booking-reference/cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'reasonCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'reasonCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bookings/:booking-reference/cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bookings/:booking-reference/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"reasonCode": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bookings/:booking-reference/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"reasonCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"reasonCode\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/bookings/:booking-reference/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bookings/:booking-reference/cancel"
payload = { "reasonCode": "" }
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bookings/:booking-reference/cancel"
payload <- "{\n \"reasonCode\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bookings/:booking-reference/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"reasonCode\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bookings/:booking-reference/cancel') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"reasonCode\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bookings/:booking-reference/cancel";
let payload = json!({"reasonCode": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bookings/:booking-reference/cancel \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"reasonCode": ""
}'
echo '{
"reasonCode": ""
}' | \
http POST {{baseUrl}}/bookings/:booking-reference/cancel \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "reasonCode": ""\n}' \
--output-document \
- {{baseUrl}}/bookings/:booking-reference/cancel
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = ["reasonCode": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bookings/:booking-reference/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bookingId": "BR-580669678",
"status": "ACCEPTED"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bookingId": "BR-580669678",
"reason": "ALREADY_CANCELLED",
"status": "DECLINED"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"code": "BAD_REQUEST",
"message": "Missing cancellation reason",
"timestamp": "2019-09-17T03:20:45.737043Z",
"trackingId": "XXXX"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"code": "NOT_FOUND",
"message": "Booking not found",
"timestamp": "2019-09-17T03:20:45.737043Z",
"trackingId": "XXXX"
}
POST
-merchant-cancellation
{{baseUrl}}/merchant/cancellation
HEADERS
Accept-Language
BODY json
{
"cancelItems": [
{
"cancelCode": "",
"cancelDescription": "",
"distributorItemRef": "",
"itemId": 0
}
],
"distributorRef": "",
"itineraryId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchant/cancellation");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchant/cancellation" {:headers {:accept-language ""}
:content-type :json
:form-params {:distributorRef "Jdp122"
:itineraryId 1234655}})
require "http/client"
url = "{{baseUrl}}/merchant/cancellation"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchant/cancellation"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchant/cancellation");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchant/cancellation"
payload := strings.NewReader("{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchant/cancellation HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"distributorRef": "Jdp122",
"itineraryId": 1234655
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchant/cancellation")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchant/cancellation"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchant/cancellation")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchant/cancellation")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}")
.asString();
const data = JSON.stringify({
distributorRef: 'Jdp122',
itineraryId: 1234655
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchant/cancellation');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchant/cancellation',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {distributorRef: 'Jdp122', itineraryId: 1234655}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchant/cancellation';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"distributorRef":"Jdp122","itineraryId":1234655}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchant/cancellation',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "distributorRef": "Jdp122",\n "itineraryId": 1234655\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchant/cancellation")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchant/cancellation',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({distributorRef: 'Jdp122', itineraryId: 1234655}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchant/cancellation',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {distributorRef: 'Jdp122', itineraryId: 1234655},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchant/cancellation');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
distributorRef: 'Jdp122',
itineraryId: 1234655
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/merchant/cancellation',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {distributorRef: 'Jdp122', itineraryId: 1234655}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchant/cancellation';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"distributorRef":"Jdp122","itineraryId":1234655}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"distributorRef": @"Jdp122",
@"itineraryId": @1234655 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchant/cancellation"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/merchant/cancellation" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchant/cancellation",
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([
'distributorRef' => 'Jdp122',
'itineraryId' => 1234655
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchant/cancellation', [
'body' => '{
"distributorRef": "Jdp122",
"itineraryId": 1234655
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchant/cancellation');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'distributorRef' => 'Jdp122',
'itineraryId' => 1234655
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'distributorRef' => 'Jdp122',
'itineraryId' => 1234655
]));
$request->setRequestUrl('{{baseUrl}}/merchant/cancellation');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchant/cancellation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"distributorRef": "Jdp122",
"itineraryId": 1234655
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchant/cancellation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"distributorRef": "Jdp122",
"itineraryId": 1234655
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/merchant/cancellation", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchant/cancellation"
payload = {
"distributorRef": "Jdp122",
"itineraryId": 1234655
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchant/cancellation"
payload <- "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchant/cancellation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/merchant/cancellation') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"distributorRef\": \"Jdp122\",\n \"itineraryId\": 1234655\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchant/cancellation";
let payload = json!({
"distributorRef": "Jdp122",
"itineraryId": 1234655
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchant/cancellation \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"distributorRef": "Jdp122",
"itineraryId": 1234655
}'
echo '{
"distributorRef": "Jdp122",
"itineraryId": 1234655
}' | \
http POST {{baseUrl}}/merchant/cancellation \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "distributorRef": "Jdp122",\n "itineraryId": 1234655\n}' \
--output-document \
- {{baseUrl}}/merchant/cancellation
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"distributorRef": "Jdp122",
"itineraryId": 1234655
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchant/cancellation")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
-health-check
{{baseUrl}}/health/check
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/health/check");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/health/check" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/health/check"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/health/check"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/health/check");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/health/check"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/health/check HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/health/check")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/health/check"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/health/check")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/health/check")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/health/check');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/health/check',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/health/check';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/health/check',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/health/check")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/health/check',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/health/check',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/health/check');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/health/check',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/health/check';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/health/check"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/health/check" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/health/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/health/check', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/health/check');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/health/check');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/health/check' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/health/check' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/health/check", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/health/check"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/health/check"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/health/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/health/check') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/health/check";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/health/check \
--header 'accept-language: '
http GET {{baseUrl}}/health/check \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/health/check
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/health/check")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"allGood": true,
"capiOk": true,
"dbOk": true,
"memcachedOk": true,
"message": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
POST
-available-products
{{baseUrl}}/available/products
HEADERS
Accept-Language
BODY json
{
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/available/products");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/available/products" {:headers {:accept-language ""}
:content-type :json
:form-params {:currencyCode ""
:endDate ""
:numAdults 0
:productCodes []
:startDate ""}})
require "http/client"
url = "{{baseUrl}}/available/products"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/available/products"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/available/products");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/available/products"
payload := strings.NewReader("{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/available/products HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 100
{
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/available/products")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/available/products"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/available/products")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/available/products")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}")
.asString();
const data = JSON.stringify({
currencyCode: '',
endDate: '',
numAdults: 0,
productCodes: [],
startDate: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/available/products');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/available/products',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {currencyCode: '', endDate: '', numAdults: 0, productCodes: [], startDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/available/products';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","endDate":"","numAdults":0,"productCodes":[],"startDate":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/available/products',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "currencyCode": "",\n "endDate": "",\n "numAdults": 0,\n "productCodes": [],\n "startDate": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/available/products")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/available/products',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({currencyCode: '', endDate: '', numAdults: 0, productCodes: [], startDate: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/available/products',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {currencyCode: '', endDate: '', numAdults: 0, productCodes: [], startDate: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/available/products');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
currencyCode: '',
endDate: '',
numAdults: 0,
productCodes: [],
startDate: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/available/products',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {currencyCode: '', endDate: '', numAdults: 0, productCodes: [], startDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/available/products';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","endDate":"","numAdults":0,"productCodes":[],"startDate":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"currencyCode": @"",
@"endDate": @"",
@"numAdults": @0,
@"productCodes": @[ ],
@"startDate": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/available/products"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/available/products" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/available/products",
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([
'currencyCode' => '',
'endDate' => '',
'numAdults' => 0,
'productCodes' => [
],
'startDate' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/available/products', [
'body' => '{
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/available/products');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currencyCode' => '',
'endDate' => '',
'numAdults' => 0,
'productCodes' => [
],
'startDate' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currencyCode' => '',
'endDate' => '',
'numAdults' => 0,
'productCodes' => [
],
'startDate' => ''
]));
$request->setRequestUrl('{{baseUrl}}/available/products');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/available/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/available/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/available/products", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/available/products"
payload = {
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/available/products"
payload <- "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/available/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/available/products') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"currencyCode\": \"\",\n \"endDate\": \"\",\n \"numAdults\": 0,\n \"productCodes\": [],\n \"startDate\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/available/products";
let payload = json!({
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": (),
"startDate": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/available/products \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}'
echo '{
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
}' | \
http POST {{baseUrl}}/available/products \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "currencyCode": "",\n "endDate": "",\n "numAdults": 0,\n "productCodes": [],\n "startDate": ""\n}' \
--output-document \
- {{baseUrl}}/available/products
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"currencyCode": "",
"endDate": "",
"numAdults": 0,
"productCodes": [],
"startDate": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/available/products")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "UnconditionalBE",
"catIds": [
6,
12
],
"code": "5010SYDNEY",
"currencyCode": "USD",
"duration": "2 hours",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 29.52,
"merchantNetPriceFromFormatted": "$29.52",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"incompleteQuote": false,
"productCode": "5010SYDNEY",
"removedChildAges": [],
"tourGrades": {
"24HOUR": {
"availDates": [
{
"dateList": "20200321 20200322 20200323 20200324 20200325 20200326 20200327 20200328 20200329 20200330 20200331 20200401 20200402 20200403 20200404 20200405 20200406 20200407 20200408 20200409 20200410 20200411 20200412 20200413 20200414 20200415 20200416 20200417 20200418 20200419 20200420 20200421 ",
"priceFrom": "USD 36.97",
"priceQuote": {
"generalRetailPrice": "USD 36.97",
"merchantNetPrice": "USD 29.52",
"priceSource": "MANUAL",
"retailPrice": "USD 36.97"
}
}
],
"bookingEngine": "UNCONDITIONAL_FREESALE",
"description": "Unlimited use on Big Bus Sydney & Bondi Hop-on Hop-off Tour for 24 hours from time of first use",
"languageServices": {
"de": [
"AUDIO"
],
"en": [
"AUDIO"
],
"es": [
"AUDIO"
],
"fr": [
"AUDIO"
],
"ja": [
"AUDIO"
],
"ko": [
"AUDIO"
],
"zh": [
"AUDIO"
]
},
"sapi": false,
"title": "24 Hour Classic Ticket ",
"tourGradeCode": "24HOUR"
},
"48HOUR": {
"availDates": [
{
"dateList": "20200321 20200322 20200323 20200324 20200325 20200326 20200327 20200328 20200329 20200330 20200331 20200401 20200402 20200403 20200404 20200405 20200406 20200407 20200408 20200409 20200410 20200411 20200412 20200413 20200414 20200415 20200416 20200417 20200418 20200419 20200420 20200421 ",
"priceFrom": "USD 49.50",
"priceQuote": {
"generalRetailPrice": "USD 49.50",
"merchantNetPrice": "USD 39.53",
"priceSource": "MANUAL",
"retailPrice": "USD 49.50"
}
}
],
"bookingEngine": "UNCONDITIONAL_FREESALE",
"description": "48 Hour Premium Ticket: Unlimited use on Big Bus Sydney & Bondi Tour for 48 hours from time of first use PLUS a guided walking tour of The Rocks, Syd",
"languageServices": {
"de": [
"AUDIO"
],
"en": [
"AUDIO"
],
"es": [
"AUDIO"
],
"fr": [
"AUDIO"
],
"ja": [
"AUDIO"
],
"ko": [
"AUDIO"
],
"zh": [
"AUDIO"
]
},
"sapi": false,
"title": "48 Hour Premium Ticket ",
"tourGradeCode": "48HOUR"
},
"DELUXE": {
"availDates": [
{
"dateList": "20200321 20200322 20200323 20200324 20200325 20200326 20200327 20200328 20200329 20200330 20200331 20200401 20200402 20200403 20200404 20200405 20200406 20200407 20200408 20200409 20200410 20200411 20200412 20200413 20200414 20200415 20200416 20200417 20200418 20200419 20200420 20200421 ",
"priceFrom": "USD 68.93",
"priceQuote": {
"generalRetailPrice": "USD 68.93",
"merchantNetPrice": "USD 55.05",
"priceSource": "MANUAL",
"retailPrice": "USD 68.93"
}
}
],
"bookingEngine": "UNCONDITIONAL_FREESALE",
"description": "Big Bus and Habour Cruise: Combine two great Sydney experiences into one with a hop-on hop off Big Bus Tours and a hop-on hop-off Sydney Harbour cruise <br/>Duration: 2 days: SPECIAL OFFER: EXTRA FREE DAY when you purchase a Deluxe ticket - have 3 days to explore Sydney not 2. Limited time only.\n<br/>Complimentary Walking Tour: Complimentary English-speaking 90-minute guided walking tour of “The Rocks” historic and harbourside precinct.",
"languageServices": {
"de": [
"AUDIO"
],
"en": [
"AUDIO"
],
"es": [
"AUDIO"
],
"fr": [
"AUDIO"
],
"ja": [
"AUDIO"
],
"ko": [
"AUDIO"
],
"zh": [
"AUDIO"
]
},
"sapi": false,
"title": "48 Hour Deluxe Bus and Cruise",
"tourGradeCode": "DELUXE"
},
"TG1": {
"availDates": [
{
"dateList": "20200321 20200322 20200323 20200324 20200325 20200326 20200327 20200328 20200329 20200330 20200331 20200401 20200402 20200403 20200404 20200405 20200406 20200407 20200408 20200409 20200410 20200411 20200412 20200413 20200414 20200415 20200416 20200417 20200418 20200419 20200420 20200421 ",
"priceFrom": "USD 89.81",
"priceQuote": {
"generalRetailPrice": "USD 89.81",
"merchantNetPrice": "USD 71.74",
"priceSource": "MANUAL",
"retailPrice": "USD 89.81"
}
}
],
"bookingEngine": "UNCONDITIONAL_FREESALE",
"description": "Hop-on Hop-Off and Attractions: 48hr Big Bus Tours, 1-day Hop-On Hop-Off Harbour Cruise, 4 Attractions: Tower Eye, Madame Tussauds, Wildlife Zoo, Aquarium<br/>Duration: 2 days: SPECIAL OFFER: EXTRA FREE DAY when you purchase a Deluxe ticket - have 3 days to explore Sydney not 2. Limited time only.\n<br/>Complimentary Walking Tours: Complimentary English-speaking guided walking tour of “The Rocks” historic and harbourside precinct.",
"languageServices": {
"de": [
"AUDIO"
],
"en": [
"AUDIO"
],
"es": [
"AUDIO"
],
"fr": [
"AUDIO"
],
"ja": [
"AUDIO"
],
"ko": [
"AUDIO"
],
"zh": [
"AUDIO"
]
},
"sapi": false,
"title": "48Hour Deluxe PLUS Attractions",
"tourGradeCode": "TG1"
}
},
"travellerMix": "1A"
},
"photoCount": 124,
"price": 36.97,
"priceFormatted": "$36.97",
"primaryDestinationId": 357,
"primaryDestinationName": "Sydney",
"primaryDestinationUrlName": "Sydney",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"rating": 4.5,
"reviewCount": 1605,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Explore Sydney and Bondi Beach on this hop-on hop-off sightseeing tour, which takes you by double-decker bus to 34 stops around the city including Sydney Opera House, Sydney Harbour Bridge, Darling Harbour, Bondi Beach and more. Enjoy unobstructed views and recorded commentary on board. Simply hop off to walk around and sightsee in depth. Your ticket is valid for 24 or 48 hours, so you can experience Sydney and Bondi's most noteworthy attractions, sights, and shopping and dining areas at your own pace.",
"shortTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"sortOrder": 1,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
97,
98,
5330,
26963,
32024,
45
],
"supplierCode": "5010",
"supplierName": "Big Bus Tours",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/94/40/f3.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/94/40/f3.jpg",
"title": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 1,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "FreesaleOnRequestBE",
"catIds": [
1,
25,
12
],
"code": "2280SUN",
"currencyCode": "USD",
"duration": "3 hours 30 minutes",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 420.68,
"merchantNetPriceFromFormatted": "$420.68",
"onRequestPeriod": 336,
"onSale": false,
"panoramaCount": 0,
"pas": {
"incompleteQuote": false,
"productCode": "2280SUN",
"removedChildAges": [],
"tourGrades": {
"SUNSET_ASTAR": {
"availDates": [
{
"dateList": "20200321 20200322 20200323 20200324 20200325 20200326 20200327 20200328 20200329 20200330 20200331 20200401 20200402 20200403 20200404 20200405 20200406 20200407 20200408 20200409 20200410 20200411 20200412 20200413 20200414 20200415 20200416 20200417 20200418 20200419 20200420 20200421 ",
"priceFrom": "USD 490.00",
"priceQuote": {
"generalRetailPrice": "USD 490.00",
"merchantNetPrice": "USD 420.68",
"priceSource": "MANUAL",
"retailPrice": "USD 490.00"
}
}
],
"bookingEngine": "FREESALE_ON_REQUEST",
"description": "Grand Canyon West Rim Deluxe Sunset Tour by A-Star Helicopter",
"languageServices": {
"de": [
"AUDIO"
],
"en": [
"AUDIO"
],
"es": [
"AUDIO"
],
"fr": [
"AUDIO"
],
"it": [
"AUDIO"
],
"ja": [
"AUDIO"
],
"ko": [
"AUDIO"
],
"pt": [
"AUDIO"
],
"ru": [
"AUDIO"
],
"tw": [
"AUDIO"
]
},
"sapi": false,
"title": "A-Star Helicopter ",
"tourGradeCode": "SUNSET_ASTAR"
},
"SUNSET_EC130": {
"availDates": [
{
"dateList": "20200321 20200322 20200323 20200324 20200325 20200326 20200327 20200328 20200329 20200330 20200331 20200401 20200402 20200403 20200404 20200405 20200406 20200407 20200408 20200409 20200410 20200411 20200412 20200413 20200414 20200415 20200416 20200417 20200418 20200419 20200420 20200421 ",
"priceFrom": "USD 515.00",
"priceQuote": {
"generalRetailPrice": "USD 515.00",
"merchantNetPrice": "USD 441.98",
"priceSource": "MANUAL",
"retailPrice": "USD 515.00"
}
}
],
"bookingEngine": "FREESALE_ON_REQUEST",
"description": "Grand Canyon West Rim Deluxe Sunset Tour by EC-130 Helicopter ",
"languageServices": {
"de": [
"AUDIO"
],
"en": [
"AUDIO"
],
"es": [
"AUDIO"
],
"fr": [
"AUDIO"
],
"it": [
"AUDIO"
],
"ja": [
"AUDIO"
],
"ko": [
"AUDIO"
],
"pt": [
"AUDIO"
],
"ru": [
"AUDIO"
],
"tw": [
"AUDIO"
]
},
"sapi": false,
"title": "EC-130 Helicopter Upgrade",
"tourGradeCode": "SUNSET_EC130"
}
},
"travellerMix": "1A"
},
"photoCount": 7,
"price": 490,
"priceFormatted": "$490.00",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Grand-Canyon-West-Rim-Deluxe-Sunset-Helicopter-Tour",
"rating": 5,
"reviewCount": 399,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Take off from Las Vegas on a magical sunset helicopter tour to the Grand Canyon. You'll enjoy a 45-minute helicopter flight each way, land at the Grand Canyon for a glass of Champagne and snacks while you watch the sun start it's descent behind the walls of the canyon, then fly low over the famous neon-lit Las Vegas Strip on your return.",
"shortTitle": "Grand Canyon from Las Vegas West Rim Sunset Helicopter Tour",
"sortOrder": 2,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
113,
2,
98,
26963,
45,
95
],
"supplierCode": "2280",
"supplierName": "Sundance Helicopters",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/7a/ec/1c.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/7a/ec/1c.jpg",
"title": "Grand Canyon West Rim Deluxe Sunset Helicopter Tour",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 1,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"dateStamp": "2020-02-10T15:41:53+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331005"
}
GET
-product-photos
{{baseUrl}}/product/photos
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/product/photos");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/product/photos" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/product/photos"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/product/photos"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/product/photos");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/product/photos"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/product/photos HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/product/photos")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/product/photos"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/product/photos")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/product/photos")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/product/photos');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/product/photos',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/product/photos';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/product/photos',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/product/photos")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/product/photos',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/product/photos',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/product/photos');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/product/photos',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/product/photos';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/product/photos"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/product/photos" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/product/photos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/product/photos', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/product/photos');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/product/photos');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/product/photos' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/product/photos' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/product/photos", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/product/photos"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/product/photos"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/product/photos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/product/photos') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/product/photos";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/product/photos \
--header 'accept-language: '
http GET {{baseUrl}}/product/photos \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/product/photos
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/product/photos")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"caption": "<p>Carl and Karen meeting a new friend at the Wildlife park.</p>",
"editorsPick": true,
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 1755909,
"ownerName": "Husker1k",
"photoHiResURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-1536tall.jpg",
"photoId": 1909732,
"photoMediumResURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-260tall.jpg",
"photoURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-770tall.jpg",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"sortOrder": 1,
"sslSupported": false,
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-133sq.jpg",
"timeUploaded": "2012-02-07",
"title": "DSC00471"
},
{
"caption": "Sydney Opera House",
"editorsPick": true,
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": "Australia",
"ownerId": 288013,
"ownerName": "Kylie G",
"photoHiResURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-1536tall.jpg",
"photoId": 997106,
"photoMediumResURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-260tall.jpg",
"photoURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-770tall.jpg",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"sortOrder": 2,
"sslSupported": false,
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-133sq.jpg",
"timeUploaded": "2009-07-22",
"title": "Sydney Opera House"
},
{
"caption": "<p>This was taken from a water taxi</p>",
"editorsPick": false,
"ownerAvatarURL": "http://cache-graphicslib.viator.com/graphicslib/media/d7/sheila-t-account_1327319-45sq.jpg",
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 1327319,
"ownerName": "Sheila T",
"photoHiResURL": "http://cache-graphicslib.viator.com/graphicslib/media/8a/-photo_31376266-1536tall.jpg",
"photoId": 31376266,
"photoMediumResURL": "http://cache-graphicslib.viator.com/graphicslib/media/8a/-photo_31376266-260tall.jpg",
"photoURL": "http://cache-graphicslib.viator.com/graphicslib/media/8a/-photo_31376266-770tall.jpg",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"sortOrder": 3,
"sslSupported": false,
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/media/8a/-photo_31376266-133sq.jpg",
"timeUploaded": "2018-03-28",
"title": ""
}
],
"dateStamp": "2020-02-10T15:32:59+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 118,
"vmid": "331001"
}
GET
-product-reviews
{{baseUrl}}/product/reviews
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/product/reviews");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/product/reviews" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/product/reviews"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/product/reviews"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/product/reviews");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/product/reviews"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/product/reviews HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/product/reviews")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/product/reviews"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/product/reviews")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/product/reviews")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/product/reviews');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/product/reviews',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/product/reviews';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/product/reviews',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/product/reviews")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/product/reviews',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/product/reviews',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/product/reviews');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/product/reviews',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/product/reviews';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/product/reviews"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/product/reviews" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/product/reviews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/product/reviews', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/product/reviews');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/product/reviews');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/product/reviews' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/product/reviews' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/product/reviews", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/product/reviews"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/product/reviews"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/product/reviews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/product/reviews') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/product/reviews";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/product/reviews \
--header 'accept-language: '
http GET {{baseUrl}}/product/reviews \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/product/reviews
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/product/reviews")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 29510203,
"ownerName": "Lauren",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"publishedDate": "2019-12-31",
"rating": 1,
"review": "<p>We did the hop on hop off bus for the second half of our day. The buses were supposed to stop running at 7:30 pm. At 6:58 our bus driver kicked everyone off the bus before the end time. We were almost 3 miles from our hotel. We all asked if we could get off at an actual stop which was 2 miles closer to our hotel and the driver said no. I want my money back because it was awful!!! I would give 0 stars if I could!</p>",
"reviewId": 63679157,
"sortOrder": 1,
"sslSupported": false,
"submissionDate": "2019-11-04",
"viatorFeedback": "",
"viatorNotes": ""
},
{
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 30185188,
"ownerName": "Robin R",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"publishedDate": "2018-05-09",
"rating": 1,
"review": "<p>The bus was so crowded people were standing in the aisle which made it very difficult to see the sights. I got the last available seat which was facing backwards, so what little I could see, was of no value. The audio system was unusable because the sound quality was terrible. </p>\n\n<p>When we finally got to Bondi Beach which was lovely, we opted to uber back to our hotel which was much more convenient, efficient and had unobstructed views.</p>",
"reviewId": 32425348,
"sortOrder": 2,
"sslSupported": false,
"submissionDate": "2018-05-09",
"viatorFeedback": "",
"viatorNotes": ""
},
{
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 29062502,
"ownerName": "Nancy S",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"publishedDate": "2018-03-26",
"rating": 1,
"review": "<p>There were not buses. At one stop we waited almost 30 minutes and then the bus was so crowded we had to stand. We had bought our tickets in advance to be sure to have a place on the bus but when we got on they were still selling tickets. Never again.</p>",
"reviewId": 31322881,
"sortOrder": 3,
"sslSupported": false,
"submissionDate": "2018-03-26",
"viatorFeedback": "",
"viatorNotes": ""
}
],
"dateStamp": "2020-02-09T19:05:03+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1561,
"vmid": "331004"
}
GET
-product
{{baseUrl}}/product
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/product");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/product" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/product"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/product"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/product");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/product"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/product HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/product")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/product"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/product")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/product")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/product');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/product',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/product';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/product',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/product")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/product',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/product',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/product');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/product',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/product';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/product"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/product" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/product', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/product');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/product');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/product' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/product' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/product", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/product"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/product"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/product")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/product') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/product";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/product \
--header 'accept-language: '
http GET {{baseUrl}}/product \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/product
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/product")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"additionalInfo": [
"Confirmation will be received at time of booking",
"Wheelchair accessible",
"When booking the 24 or 48 hour Family Pass, only the lead passenger name is required for a booking of up to 2 Adults and 2 children 16 years and under. At time of booking you only need to enter 1 adult to complete your booking",
"Infants aged 0 to 4 years travel free of charge"
],
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ageBands": [
{
"adult": true,
"ageFrom": 16,
"ageTo": 99,
"bandId": 1,
"count": 0,
"description": "Adult",
"pluralDescription": "Adults",
"sortOrder": 1,
"treatAsAdult": true
},
{
"adult": false,
"ageFrom": 5,
"ageTo": 15,
"bandId": 2,
"count": 0,
"description": "Child",
"pluralDescription": "Children",
"sortOrder": 2,
"treatAsAdult": true
},
{
"adult": false,
"ageFrom": 0,
"ageTo": 4,
"bandId": 3,
"count": 0,
"description": "Infant",
"pluralDescription": "Infants",
"sortOrder": 3,
"treatAsAdult": false
}
],
"allTravellerNamesRequired": true,
"applePassSupported": true,
"available": true,
"bookingEngineId": "UnconditionalBE",
"bookingQuestions": [],
"catIds": [
6,
12
],
"city": "Sydney",
"code": "5010SYDNEY",
"country": "Australia",
"currencyCode": "USD",
"departurePoint": "You may start this tour at any of the stops listed.",
"departureTime": "See itinerary",
"departureTimeComments": "",
"description": "<b>Itinerary</b><br><br><p><strong>Red Route - Sydney Icons</strong></p><p>Route Duration: 2 hours</p><div>Stops on the Red Route - Sydney Icons:</div><ul><li>T Galleria x Petal met Sugar - Circular Quay, George St, cnr Alfred St. (opp DFS Galleria)</li>\n<li>Martin Place Station, Elizabeth St, Stand E - Sydney Tower/ Westfield</li>\n<li>1 William St - Australian Museum</li>\n<li>William St at Palmer St - William St, Kings Cross</li>\n<li>121 Darlinghurst Rd - Kings Cross Train Station on Darlinghurst Rd.</li>\n<li>123-125 MacLeay St - El Alamein Fountain</li>\n<li>2 Bourke St - Cowper Wharf Rd, outside the Woollomooloo Hotel</li>\n<li>2A Macquarie St - Sydney Opera House</li>\n<li>Macquarie Street - Botanical Garden, Scenic Walk to Mrs Macquarie Chair</li>\n<li>State Library of New South Wales - State Library</li>\n<li>Prince Albert Rd opp College St - Hyde Park</li>\n<li>Greyhound Australia - Central Station, Pitt Street, Bus Bay 18</li>\n<li>Powerhouse Museum, Harris St - Powerhouse Museum</li>\n<li>Fish Market - Harris St, cnr Pyrmont Bridge Rd</li>\n<li>Marquee Sydney - The Star Casino</li>\n<li>Maritime Museum</li>\n<li>ICC Sydney</li>\n<li>Chinese Garden of Friendship</li>\n<li>SEA LIFE Sydney Aquarium</li>\n<li>ibis Sydney King Street Wharf - Kings Street Wharf</li>\n<li>Hickson Road</li>\n<li>Dawes Point - Sydney Harbour Bridge</li>\n<li>The Rocks</li></ul><div>Attractions on the Red Route - Sydney Icons:</div><p>Hyde Park Barracks / Australian Museum / Sea Life Sydney Aquarium / Darling Harbour / The Rocks / Bondi Beach / Sydney Harbour Bridge / Royal Botanic Garden Sydney / Sydney Town Hall / Hyde Park / Circular Quay / City Sightseeing Sydney / Madame Tussauds Sydney / Big Bus Sydney</p><p><i>Operates:</i> 1st bus departs from Stop 1 Circular Quay at 8.30am.\nFrequency every 20 minutes\nLast bus departs from stop 1 at 6.30pm</p><p><strong>Blue Route - Bondi Lifestyle</strong></p><p>Route Duration: 2 hours</p><div>Stops on the Blue Route - Bondi Lifestyle:</div><ul><li>492 Pitt St - Central Station, Pitt Street, Bus Bay 18</li>\n<li>1 William St - Australian Museum </li>\n<li>Paddington Town Hall, Oxford St</li>\n<li>Oxford St opp Moncur St</li>\n<li>Bondi Beach</li>\n<li>North Bondi Beach, Campbell Pde</li>\n<li>Rose Bay</li>\n<li>Double Bay</li></ul><div>Attractions on the Blue Route - Bondi Lifestyle:</div><p>Paddington Markets / Centennial Park / Bondi Beach / Rose Bay / Double Bay</p><p><i>Operates:</i> 1st bus departs from Stop 1 Circular Quay at 9.30am.\nFrequency every 30 minutes\nLast bus departs from stop 1 at 6.30pm</p>",
"destinationId": 357,
"duration": "2 hours",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"exclusions": [
"Food and drinks",
"Admission"
],
"highlights": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"hotelPickup": false,
"inclusions": [
"Choice of 24 hour or 48 hour pass",
"Pre-recorded commentary in English, French, Spanish, German, Italian, Mandarin, Japanese, Korean",
"Free wifi onboard"
],
"itinerary": "",
"location": "The Rocks, Australia",
"mapURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"maxTravellerCount": 9,
"merchantCancellable": true,
"merchantNetPriceFrom": 29.52,
"merchantNetPriceFromFormatted": "$29.52",
"merchantTermsAndConditions": {
"amountRefundable": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"cancellationFromTourDate": [
{
"dayRangeMax": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"dayRangeMin": 1,
"percentageRefundable": 100,
"policyEndTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"policyStartTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"dayRangeMax": 1,
"dayRangeMin": 0,
"percentageRefundable": 0,
"policyEndTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"policyStartTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"merchantTermsAndConditionsType": 1,
"termsAndConditions": "For a full refund, cancel at least 24 hours in advance of the start date of the experience."
},
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"operates": "<p>Daily</p>",
"panoramaCount": 0,
"pas": null,
"passengerAttributes": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 124,
"price": 36.97,
"priceFormatted": "$36.97",
"primaryDestinationId": 357,
"primaryDestinationName": "Sydney",
"primaryDestinationUrlName": "Sydney",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productPhotos": [
{
"caption": "Selfies at Bondi Beach",
"path": "attractions-splice-spp-674x446/09/c5/d3/87.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/c5/d3/87.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "",
"path": "attractions-splice-spp-674x446/09/c5/d2/d1.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/c5/d2/d1.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "",
"path": "attractions-splice-spp-674x446/07/94/40/f3.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/94/40/f3.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "Sydney and Bondi Hop-On Hop-Off Tour",
"path": "attractions-splice-spp-674x446/09/c5/d2/d4.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/c5/d2/d4.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "Bondi Beach",
"path": "attractions-splice-spp-674x446/09/c5/d2/c7.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/c5/d2/c7.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "Visit icons",
"path": "attractions-splice-spp-674x446/07/90/5a/68.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/90/5a/68.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "Big Bus App provides live tracking",
"path": "attractions-splice-spp-674x446/07/90/5a/6a.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/90/5a/6a.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "The Rocks",
"path": "attractions-splice-spp-674x446/07/90/5a/7d.jpg",
"photoURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/90/5a/7d.jpg",
"supplier": "SUPPLIER"
}
],
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"rating": 4.5,
"ratingCounts": {
"1": 38,
"2": 99,
"3": 198,
"4": 500,
"5": 770
},
"region": "New South Wales",
"returnDetails": "You may disembark at any of the available stops.",
"reviewCount": 1605,
"reviews": [
{
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 32351278,
"ownerName": "esperanza h",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"publishedDate": "2020-01-16",
"rating": 5,
"review": "<p>Excellent way of visiting the city! It’s the only way to see atttactions in Sydney as I only have three days to stay . The next day I went back to Bondi beach to spend half of my day for the birthday of my son. Went to Iceberg Club overlooking the beach with surfers. It’s the best view you can get while having lunch! Walked along the coast to enjoy the magnificent view. I plan to go back again to this beautiful city. Spent sometime at the opera house area where there’s plenty of nice cafes to eat while admiring the view!</p>",
"reviewId": 67907371,
"sortOrder": 1,
"sslSupported": false,
"submissionDate": "2020-01-16",
"viatorFeedback": "",
"viatorNotes": ""
},
{
"ownerAvatarURL": "http://cache-graphicslib.viator.com/graphicslib/media/f5/tomzak21-account_47925237-45sq.jpg",
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 47925237,
"ownerName": "tomzak21",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"publishedDate": "2020-01-09",
"rating": 5,
"review": "<p>Love The Big Bus, Hop On / Hop Off Tour Company! This is the way to see just about all the key areas and tourist attractions. You don't have to rent a car and they are actually comfortable. We also did a Hop On, Hop Off in Budapest, Hungary and that was great also, saw all the major attractions!</p>\n\n<p> They provide you with earbuds and there are 6+ languages that you can choose. Being in Sydney, there was Chinese, Korean, Japanese, along with French, Spanish, English and I believe German.</p>\n\n<p> There is also a \"package deal\" in which you can purchase a pass to other attractions along the route.. like Wildlife Sydney Zoo, Madame Tussaud's, Sydney Eye. You can buy a 2, 3 or 4 attraction pass in which The Big Bus is one of the attractions.</p>\n\n<p> Love The Big Bus! If you want a quick tour or spend a couples days of exploring, this is the way to go!</p>\n\n<p> Only complaint... the drop off and pick up spots could be better labeled. They should put there logo on a sign and make it noticeable. Some stops had some kind of sign, but there were a few stops that we weren't sure we were in the right spot. It wound up that we were in the correct spot. Addresses are listed in the provided in the pamphlet / flyer provided.</p>",
"reviewId": 67480203,
"sortOrder": 2,
"sslSupported": false,
"submissionDate": "2020-01-09",
"viatorFeedback": "",
"viatorNotes": ""
}
],
"rrp": 0,
"rrpformatted": "",
"salesPoints": [],
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Explore Sydney and Bondi Beach on this hop-on hop-off sightseeing tour, which takes you by double-decker bus to 34 stops around the city including Sydney Opera House, Sydney Harbour Bridge, Darling Harbour, Bondi Beach and more. Enjoy unobstructed views and recorded commentary on board. Simply hop off to walk around and sightsee in depth. Your ticket is valid for 24 or 48 hours, so you can experience Sydney and Bondi's most noteworthy attractions, sights, and shopping and dining areas at your own pace.",
"shortTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"specialOffer": "",
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
97,
98,
5330,
26963,
32024,
45
],
"supplierCode": "5010",
"supplierName": "Big Bus Tours",
"termsAndConditions": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/94/40/f3.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/94/40/f3.jpg",
"title": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"tourGrades": [
{
"currencyCode": "USD",
"defaultLanguageCode": "en",
"gradeCode": "24HOUR",
"gradeDepartureTime": "",
"gradeDescription": "Unlimited use on Big Bus Sydney & Bondi Hop-on Hop-off Tour for 24 hours from time of first use",
"gradeTitle": "24 Hour Classic Ticket ",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPriceFrom": 29.52,
"merchantNetPriceFromFormatted": "$29.52",
"priceFrom": 36.97,
"priceFromFormatted": "$36.97",
"sortOrder": 1
},
{
"currencyCode": "USD",
"defaultLanguageCode": "en",
"gradeCode": "48HOUR",
"gradeDepartureTime": "",
"gradeDescription": "48 Hour Premium Ticket: Unlimited use on Big Bus Sydney & Bondi Tour for 48 hours from time of first use PLUS a guided walking tour of The Rocks, Syd",
"gradeTitle": "48 Hour Premium Ticket ",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPriceFrom": 39.53,
"merchantNetPriceFromFormatted": "$39.53",
"priceFrom": 49.5,
"priceFromFormatted": "$49.50",
"sortOrder": 2
},
{
"currencyCode": "USD",
"defaultLanguageCode": "en",
"gradeCode": "DELUXE",
"gradeDepartureTime": "",
"gradeDescription": "Big Bus and Habour Cruise: Combine two great Sydney experiences into one with a hop-on hop off Big Bus Tours and a hop-on hop-off Sydney Harbour cruise <br/>Duration: 2 days: SPECIAL OFFER: EXTRA FREE DAY when you purchase a Deluxe ticket - have 3 days to explore Sydney not 2. Limited time only.\n<br/>Complimentary Walking Tour: Complimentary English-speaking 90-minute guided walking tour of “The Rocks” historic and harbourside precinct.",
"gradeTitle": "48 Hour Deluxe Bus and Cruise",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPriceFrom": 55.05,
"merchantNetPriceFromFormatted": "$55.05",
"priceFrom": 68.93,
"priceFromFormatted": "$68.93",
"sortOrder": 3
},
{
"currencyCode": "USD",
"defaultLanguageCode": "en",
"gradeCode": "TG1",
"gradeDepartureTime": "",
"gradeDescription": "Hop-on Hop-Off and Attractions: 48hr Big Bus Tours, 1-day Hop-On Hop-Off Harbour Cruise, 4 Attractions: Tower Eye, Madame Tussauds, Wildlife Zoo, Aquarium<br/>Duration: 2 days: SPECIAL OFFER: EXTRA FREE DAY when you purchase a Deluxe ticket - have 3 days to explore Sydney not 2. Limited time only.\n<br/>Complimentary Walking Tours: Complimentary English-speaking guided walking tour of “The Rocks” historic and harbourside precinct.",
"gradeTitle": "48Hour Deluxe PLUS Attractions",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"zh/SERVICE_AUDIO": "Chinese - Audio"
},
"merchantNetPriceFrom": 71.74,
"merchantNetPriceFromFormatted": "$71.74",
"priceFrom": 89.81,
"priceFromFormatted": "$89.81",
"sortOrder": 4
}
],
"tourGradesAvailable": true,
"translationLevel": 0,
"userPhotos": [
{
"caption": "<p>Carl and Karen meeting a new friend at the Wildlife park.</p>",
"editorsPick": true,
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 1755909,
"ownerName": "Husker1k",
"photoHiResURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-1536tall.jpg",
"photoId": 1909732,
"photoMediumResURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-260tall.jpg",
"photoURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-770tall.jpg",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"sortOrder": 1,
"sslSupported": false,
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/media/e4/dsc00471-photo_1909732-133sq.jpg",
"timeUploaded": "2012-02-07",
"title": "DSC00471"
},
{
"caption": "Sydney Opera House",
"editorsPick": true,
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": "Australia",
"ownerId": 288013,
"ownerName": "Kylie G",
"photoHiResURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-1536tall.jpg",
"photoId": 997106,
"photoMediumResURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-260tall.jpg",
"photoURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-770tall.jpg",
"productCode": "5010SYDNEY",
"productTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"sortOrder": 2,
"sslSupported": false,
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/media/f2/sydney-opera-house-photo_997106-133sq.jpg",
"timeUploaded": "2009-07-22",
"title": "Sydney Opera House"
}
],
"videoCount": 1,
"videos": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"voucherOption": "VOUCHER_E",
"voucherRequirements": "You can present either a paper or an electronic voucher for this activity.",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"dateStamp": "2020-02-06T18:15:04+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331001"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"additionalInfo": [
"Confirmation will be received at time of booking, unless booked within 30 days of travel. In this case confirmation will be received within 48 hours, subject to availability",
"Tours require a minimum number of passengers to operate",
"Due to comfort, weight and balance of the aircraft, the maximum weight per passenger to ride in an A-Star helicopter is 275lbs (125kg / 19.6st). If passengers weigh in between 275lbs and 300lbs (136kg/21.4st), you will be required to upgrade to the EC-130.",
"Any passenger over 300lbs will be required to purchase an additional seat. This is payable directly to the tour operator on the day of the tour.",
"Individual passenger weights, including infants, MUST be advised at time of booking",
"Collapsible wheelchairs with removable wheels may be accommodated provided the passenger is accompanied by someone who can assist them with boarding and disembarking the aircraft",
"Infant children are considered a lap child if they are under the age of two and have proof of age, such as a passport or a copy of their birth certificate",
"Veggie options are available. Please note this request in the special requirement field at check out.",
"Please note: Seats are determined by passengers weights and front seats cannot be guaranteed at any time.",
"Wheelchair accessible",
"Service animals allowed",
"Infants must sit on laps",
"Infant seats available",
"Transportation is wheelchair accessible",
"Most travelers can participate",
"This experience requires good weather. If it’s canceled due to poor weather, you’ll be offered a different date or a full refund",
"This experience requires a minimum number of travelers. If it’s canceled because the minimum isn’t met, you’ll be offered a different date/experience or a full refund"
],
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ageBands": [
{
"adult": true,
"ageFrom": 2,
"ageTo": 99,
"bandId": 1,
"count": 0,
"description": "Adult",
"pluralDescription": "Adults",
"sortOrder": 1,
"treatAsAdult": true
},
{
"adult": false,
"ageFrom": 0,
"ageTo": 1,
"bandId": 3,
"count": 0,
"description": "Infant",
"pluralDescription": "Infants",
"sortOrder": 2,
"treatAsAdult": false
}
],
"allTravellerNamesRequired": true,
"applePassSupported": true,
"available": true,
"bookingEngineId": "FreesaleOnRequestBE",
"bookingQuestions": [
{
"message": "For safety reasons you must enter the weight of all passengers. Please indicate pounds or kilos.",
"questionId": 23,
"required": true,
"sortOrder": 1,
"stringQuestionId": "weights_passengerWeights",
"subTitle": "(e.g. 127 pounds, 145 kilos, etc)",
"title": "Passenger Weights"
}
],
"catIds": [
1,
25,
12
],
"city": "Las Vegas",
"code": "2280AAHT",
"country": "United States",
"currencyCode": "EUR",
"departurePoint": "Traveler pickup is offered<br><br>",
"departureTime": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"departureTimeComments": "",
"description": "<b>Itinerary</b><br>This is a typical itinerary for this product<br><br><b>Pass By:</b> Lake Mead National Recreation Area, 10 Lakeshore Rd, NV 89005<br><br>This tour is likely to sell-out! The Grand Canyon All-American Helicopter Tour regularly sells out weeks in advance, so book ahead to avoid disappointment!<br><br>During the flight, you can listen to a recorded commentary about the Grand Canyon and its surrounds via audio headphones. You'll discover the natural beauty of the Grand Canyon as your air-conditioned helicopter flies to the West Rim, passing over Lake Las Vegas, Lake Mead and the Hoover Dam en route. <br><br><b>Pass By:</b> Hoover Dam Access Road, Boulder City, NV 89109<br><br>Hoover Dam is a spectacular sight from the air, curved between the rock canyon walls. <br><br><b>Pass By:</b> Colorado River, Grand Canyon National Park, AZ<br><br>As you enter the Grand Canyon, you'll soar over the mighty Colorado River. <br><br><b>Stop At:</b> Grand Canyon West, AZ 86434, USA<br><br>You'll land for an unforgettable experience, 3,200 feet (960 meters) below the rim. While you share a bottle of champagne under an authentic Native American Ramada shelter and a basket of snacks, your pilot/guide will be happy to answer any questions you may have about the canyon or your helicopter flight.<br><br>Duration: 45 minutes<br><br><b>Pass By:</b> The Strip, S Las Vegas Blvd, Las Vegas, NV 89109<br><br>Your Grand Canyon helicopter scenic flight ends with a low-level pass over the west side of the famous Las Vegas Strip. On landing, your limousine is waiting to whisk you back to your hotel.<br><br>",
"destinationId": 684,
"duration": "3 hours 30 minutes",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"exclusions": [
"Gratuities"
],
"highlights": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"hotelPickup": true,
"inclusions": [
"45-minute (approx.) flight each way (helicopter based on option selected)",
"Hotel pickup and drop-off by limousine",
"Snacks",
"Glass of Champagne",
"All taxes and fees"
],
"itinerary": "",
"location": "Las Vegas, United States",
"mapURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"maxTravellerCount": 9,
"merchantCancellable": true,
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"merchantTermsAndConditions": {
"amountRefundable": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"cancellationFromTourDate": [
{
"dayRangeMax": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"dayRangeMin": 1,
"percentageRefundable": 100,
"policyEndTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"policyStartTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"dayRangeMax": 1,
"dayRangeMin": 0,
"percentageRefundable": 0,
"policyEndTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"policyStartTimestamp": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"merchantTermsAndConditionsType": 1,
"termsAndConditions": "For a full refund, cancel at least 24 hours in advance of the start date of the experience."
},
"onRequestPeriod": 720,
"onSale": false,
"operates": "Daily",
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"passengerAttributes": [
{
"customAttribute_kg": "kgs",
"customAttribute_lb": "lbs",
"errorMissingMessage": "The weight entered is not valid. Please provide weight as a number (i.e. 95)",
"errorValidationMessage": "The weight entered is not valid. Please provide weight as a number (i.e. 95)",
"questionId": "weights_passengerWeights",
"required": true,
"title": "Weight",
"validateType": "positiveInteger"
}
],
"photoCount": 5,
"price": 376.3,
"priceFormatted": "€376,30",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productPhotos": [
{
"caption": "Grand Canyon All-American Helicopter Tour",
"path": "attractions-splice-spp-674x446/07/38/cd/90.jpg",
"photoURL": "https://media.tacdn.com/media/attractions-splice-spp-674x446/07/38/cd/90.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "",
"path": "attractions-splice-spp-674x446/07/90/58/3c.jpg",
"photoURL": "https://media.tacdn.com/media/attractions-splice-spp-674x446/07/90/58/3c.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "",
"path": "attractions-splice-spp-674x446/07/90/58/3d.jpg",
"photoURL": "https://media.tacdn.com/media/attractions-splice-spp-674x446/07/90/58/3d.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "",
"path": "attractions-splice-spp-674x446/07/1b/3e/94.jpg",
"photoURL": "https://media.tacdn.com/media/attractions-splice-spp-674x446/07/1b/3e/94.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "",
"path": "attractions-splice-spp-674x446/07/90/58/21.jpg",
"photoURL": "https://media.tacdn.com/media/attractions-splice-spp-674x446/07/90/58/21.jpg",
"supplier": "SUPPLIER"
},
{
"caption": "Grand Canyon All-American Helicopter Tour",
"path": "attractions-splice-spp-674x446/07/75/b2/fb.jpg",
"photoURL": "https://media.tacdn.com/media/attractions-splice-spp-674x446/07/75/b2/fb.jpg",
"supplier": "SUPPLIER"
}
],
"productUrlName": "Grand-Canyon-All-American-Helicopter-Tour",
"rating": 5,
"ratingCounts": {
"1": 41,
"2": 78,
"3": 131,
"4": 883,
"5": 5913
},
"region": "Nevada",
"returnDetails": "",
"reviewCount": 7046,
"reviews": [
{
"ownerAvatarURL": "http://cache-graphicslib.viator.com/graphicslib/media/8e/meri-s-account_6638734-45sq.jpg",
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 6638734,
"ownerName": "Meri S",
"productCode": "2280AAHT",
"productTitle": "Grand Canyon All-American Helicopter Tour",
"productUrlName": "Grand-Canyon-All-American-Helicopter-Tour",
"publishedDate": "2020-01-22",
"rating": 5,
"review": "<p>Wonderful trip! The limo picked us up at the MGM and took us directly to the helipad. We were a group of 6, and we had our own helicopter. Our pilot was amazing, and the flight was breathtaking. We had a great time! Definitely worth the money!</p>",
"reviewId": 68309931,
"sortOrder": 1,
"sslSupported": false,
"submissionDate": "2020-01-22",
"viatorFeedback": "",
"viatorNotes": ""
},
{
"ownerAvatarURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 65594303,
"ownerName": "June Ling C",
"productCode": "2280AAHT",
"productTitle": "Grand Canyon All-American Helicopter Tour",
"productUrlName": "Grand-Canyon-All-American-Helicopter-Tour",
"publishedDate": "2020-01-20",
"rating": 5,
"review": "<p>Best tour ever! our pilot Ryan explained as we fly across each location. We managed to took good view of Grand Canyon picture and the tour is worth to go .Never regret of booking this tour . I would recommend everyone to go if you have time in Vegas</p>",
"reviewId": 68183211,
"sortOrder": 2,
"sslSupported": false,
"submissionDate": "2020-01-20",
"viatorFeedback": "",
"viatorNotes": ""
}
],
"rrp": 0,
"rrpformatted": "",
"salesPoints": [],
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Take off from McCarran Airport on an exhilarating helicopter flight to the Grand Canyon. You'll enjoy a 45-minute helicopter flight each way, land deep in the canyon for a glass of champagne and a basket of snacks then fly low over the famous Las Vegas Strip on your return. The Grand Canyon All American Helicopter Tour is a half-day tour, leaving you with time in the day free to explore Las Vegas and Nevada at your leisure.",
"shortTitle": "Las Vegas to Grand Canyon Helicopter Tour with Champagne",
"specialOffer": "",
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
113,
2,
98,
26963,
45,
94,
95
],
"supplierCode": "2280",
"supplierName": "Sundance Helicopters",
"termsAndConditions": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/38/cd/90.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/38/cd/90.jpg",
"title": "Grand Canyon All-American Helicopter Tour",
"tourGrades": [
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "EB_ASTAR_SP~06:45",
"gradeDepartureTime": "6:45 AM",
"gradeDescription": "Special Offer: Receive a discounted seat for the Grand Canyon All American Helicopter Tour departing between 6:45am and 7am on an A-Star helicopter",
"gradeTitle": "Special: Earlybird A-Star 06:45",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 376.3,
"priceFromFormatted": "€376,30",
"sortOrder": 1
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "EB_ASTAR_SP~07:00",
"gradeDepartureTime": "7:00 AM",
"gradeDescription": "Special Offer: Receive a discounted seat for the Grand Canyon All American Helicopter Tour departing between 6:45am and 7am on an A-Star helicopter",
"gradeTitle": "Special: Earlybird A-Star 07:00",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 376.3,
"priceFromFormatted": "€376,30",
"sortOrder": 2
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "EB_EC130_SP~06:45",
"gradeDepartureTime": "6:45 AM",
"gradeDescription": "Special Offer: Receive a discounted seat for the Grand Canyon All American Helicopter Tour departing between 6:45am and 7am on an EC-130",
"gradeTitle": "Special: Earlybird EC-130 06:45",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 399.25,
"priceFromFormatted": "€399,25",
"sortOrder": 3
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "EB_EC130_SP~07:00",
"gradeDepartureTime": "7:00 AM",
"gradeDescription": "Special Offer: Receive a discounted seat for the Grand Canyon All American Helicopter Tour departing between 6:45am and 7am on an EC-130",
"gradeTitle": "Special: Earlybird EC-130 07:00",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 399.25,
"priceFromFormatted": "€399,25",
"sortOrder": 4
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG1~08:00",
"gradeDepartureTime": "8:00 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; A-Star 08:00",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 356.79,
"merchantNetPriceFromFormatted": "€356,79",
"priceFrom": 422.19,
"priceFromFormatted": "€422,19",
"sortOrder": 5
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG1~09:30",
"gradeDepartureTime": "9:30 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; A-Star 09:30",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 356.79,
"merchantNetPriceFromFormatted": "€356,79",
"priceFrom": 422.19,
"priceFromFormatted": "€422,19",
"sortOrder": 6
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG1~09:45",
"gradeDepartureTime": "9:45 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; A-Star 09:45",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 356.79,
"merchantNetPriceFromFormatted": "€356,79",
"priceFrom": 422.19,
"priceFromFormatted": "€422,19",
"sortOrder": 7
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG1~10:45",
"gradeDepartureTime": "10:45 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; A-Star 10:45",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 356.79,
"merchantNetPriceFromFormatted": "€356,79",
"priceFrom": 422.19,
"priceFromFormatted": "€422,19",
"sortOrder": 8
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG2~08:00",
"gradeDepartureTime": "8:00 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; EC-130 08:00",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 376.34,
"merchantNetPriceFromFormatted": "€376,34",
"priceFrom": 445.14,
"priceFromFormatted": "€445,14",
"sortOrder": 9
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG2~09:30",
"gradeDepartureTime": "9:30 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; EC-130 09:30",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 376.34,
"merchantNetPriceFromFormatted": "€376,34",
"priceFrom": 445.14,
"priceFromFormatted": "€445,14",
"sortOrder": 10
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG2~09:45",
"gradeDepartureTime": "9:45 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; EC-130 09:45",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 376.34,
"merchantNetPriceFromFormatted": "€376,34",
"priceFrom": 445.14,
"priceFromFormatted": "€445,14",
"sortOrder": 11
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG2~10:45",
"gradeDepartureTime": "10:45 AM",
"gradeDescription": "Morning departure between 8am and 11:45am on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Morning Departure; EC-130 10:45",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 376.34,
"merchantNetPriceFromFormatted": "€376,34",
"priceFrom": 445.14,
"priceFromFormatted": "€445,14",
"sortOrder": 12
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG3~12:15",
"gradeDepartureTime": "12:15 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; A-Star 12:15",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 413.02,
"priceFromFormatted": "€413,02",
"sortOrder": 13
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG3~12:30",
"gradeDepartureTime": "12:30 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; A-Star 12:30",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 413.02,
"priceFromFormatted": "€413,02",
"sortOrder": 14
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG3~13:30",
"gradeDepartureTime": "1:30 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; A-Star 13:30",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 413.02,
"priceFromFormatted": "€413,02",
"sortOrder": 15
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG3~15:00",
"gradeDepartureTime": "3:00 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; A-Star 15:00",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 413.02,
"priceFromFormatted": "€413,02",
"sortOrder": 16
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG3~15:15",
"gradeDepartureTime": "3:15 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; A-Star 15:15",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 413.02,
"priceFromFormatted": "€413,02",
"sortOrder": 17
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG3~16:15",
"gradeDepartureTime": "4:15 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an A-Star Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; A-Star 16:15",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 351.9,
"merchantNetPriceFromFormatted": "€351,90",
"priceFrom": 413.02,
"priceFromFormatted": "€413,02",
"sortOrder": 18
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG4~12:15",
"gradeDepartureTime": "12:15 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; EC-130 12:15",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 435.96,
"priceFromFormatted": "€435,96",
"sortOrder": 19
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG4~12:30",
"gradeDepartureTime": "12:30 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; EC-130 12:30",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 435.96,
"priceFromFormatted": "€435,96",
"sortOrder": 20
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG4~13:30",
"gradeDepartureTime": "1:30 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; EC-130 13:30",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 435.96,
"priceFromFormatted": "€435,96",
"sortOrder": 21
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG4~15:00",
"gradeDepartureTime": "3:00 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; EC-130 15:00",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 435.96,
"priceFromFormatted": "€435,96",
"sortOrder": 22
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG4~15:15",
"gradeDepartureTime": "3:15 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; EC-130 15:15",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 435.96,
"priceFromFormatted": "€435,96",
"sortOrder": 23
},
{
"currencyCode": "EUR",
"defaultLanguageCode": "en",
"gradeCode": "TG4~16:15",
"gradeDepartureTime": "4:15 PM",
"gradeDescription": "Afternoon departure between 12pm and 4:15pm on an EC-130 Helicopter for the All American Helicopter Tour",
"gradeTitle": "Afternoon Departure; EC-130 16:15",
"langServices": {
"de/SERVICE_AUDIO": "German - Audio",
"en/SERVICE_AUDIO": "English - Audio",
"es/SERVICE_AUDIO": "Spanish - Audio",
"fr/SERVICE_AUDIO": "French - Audio",
"it/SERVICE_AUDIO": "Italian - Audio",
"ja/SERVICE_AUDIO": "Japanese - Audio",
"ko/SERVICE_AUDIO": "Korean - Audio",
"pt/SERVICE_AUDIO": "Portuguese - Audio",
"ru/SERVICE_AUDIO": "Russian - Audio",
"tw/SERVICE_AUDIO": "Chinese (Traditional) - Audio"
},
"merchantNetPriceFrom": 371.45,
"merchantNetPriceFromFormatted": "€371,45",
"priceFrom": 435.96,
"priceFromFormatted": "€435,96",
"sortOrder": 24
}
],
"tourGradesAvailable": true,
"translationLevel": 0,
"userPhotos": [
{
"caption": "Grand Canyon All-American Helicopter Tour",
"editorsPick": false,
"ownerAvatarURL": "http://cache-graphicslib.viator.com/graphicslib/media/09/viator-insider-account_9179657-45sq.jpg",
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 9179657,
"ownerName": "Viator Insider",
"photoHiResURL": "http://cache-graphicslib.viator.com/graphicslib/media/01/img_4048-jpg-photo_30186497-1536tall.jpg",
"photoId": 30186497,
"photoMediumResURL": "http://cache-graphicslib.viator.com/graphicslib/media/01/img_4048-jpg-photo_30186497-260tall.jpg",
"photoURL": "http://cache-graphicslib.viator.com/graphicslib/media/01/img_4048-jpg-photo_30186497-770tall.jpg",
"productCode": "2280AAHT",
"productTitle": "Grand Canyon All-American Helicopter Tour",
"productUrlName": "Grand-Canyon-All-American-Helicopter-Tour",
"sortOrder": 1,
"sslSupported": false,
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/media/01/img_4048-jpg-photo_30186497-133sq.jpg",
"timeUploaded": "2018-01-26",
"title": "IMG_4048.jpg"
},
{
"caption": "Grand Canyon All-American Helicopter Tour",
"editorsPick": false,
"ownerAvatarURL": "http://cache-graphicslib.viator.com/graphicslib/media/09/viator-insider-account_9179657-45sq.jpg",
"ownerCountry": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"ownerId": 9179657,
"ownerName": "Viator Insider",
"photoHiResURL": "http://cache-graphicslib.viator.com/graphicslib/media/f5/img_4102-jpg-photo_30186485-1536tall.jpg",
"photoId": 30186485,
"photoMediumResURL": "http://cache-graphicslib.viator.com/graphicslib/media/f5/img_4102-jpg-photo_30186485-260tall.jpg",
"photoURL": "http://cache-graphicslib.viator.com/graphicslib/media/f5/img_4102-jpg-photo_30186485-770tall.jpg",
"productCode": "2280AAHT",
"productTitle": "Grand Canyon All-American Helicopter Tour",
"productUrlName": "Grand-Canyon-All-American-Helicopter-Tour",
"sortOrder": 2,
"sslSupported": false,
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/media/f5/img_4102-jpg-photo_30186485-133sq.jpg",
"timeUploaded": "2018-01-26",
"title": "IMG_4102.jpg"
}
],
"videoCount": 1,
"videos": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"voucherOption": "VOUCHER_E",
"voucherRequirements": "You can present either a paper or an electronic voucher for this activity.",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"dateStamp": "2020-02-06T18:19:27+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331003"
}
POST
-search-freetext
{{baseUrl}}/search/freetext
HEADERS
Accept-Language
BODY json
{
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/search/freetext");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/search/freetext" {:headers {:accept-language ""}
:content-type :json
:form-params {:currencyCode ""
:destId 0
:searchTypes []
:sortOrder ""
:text ""
:topX ""}})
require "http/client"
url = "{{baseUrl}}/search/freetext"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/search/freetext"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/search/freetext");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/search/freetext"
payload := strings.NewReader("{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/search/freetext HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 107
{
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/search/freetext")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/search/freetext"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/search/freetext")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/search/freetext")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}")
.asString();
const data = JSON.stringify({
currencyCode: '',
destId: 0,
searchTypes: [],
sortOrder: '',
text: '',
topX: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/search/freetext');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/search/freetext',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
currencyCode: '',
destId: 0,
searchTypes: [],
sortOrder: '',
text: '',
topX: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/search/freetext';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","destId":0,"searchTypes":[],"sortOrder":"","text":"","topX":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/search/freetext',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "currencyCode": "",\n "destId": 0,\n "searchTypes": [],\n "sortOrder": "",\n "text": "",\n "topX": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/search/freetext")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/search/freetext',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
currencyCode: '',
destId: 0,
searchTypes: [],
sortOrder: '',
text: '',
topX: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/search/freetext',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
currencyCode: '',
destId: 0,
searchTypes: [],
sortOrder: '',
text: '',
topX: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/search/freetext');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
currencyCode: '',
destId: 0,
searchTypes: [],
sortOrder: '',
text: '',
topX: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/search/freetext',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
currencyCode: '',
destId: 0,
searchTypes: [],
sortOrder: '',
text: '',
topX: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/search/freetext';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","destId":0,"searchTypes":[],"sortOrder":"","text":"","topX":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"currencyCode": @"",
@"destId": @0,
@"searchTypes": @[ ],
@"sortOrder": @"",
@"text": @"",
@"topX": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/search/freetext"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/search/freetext" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/search/freetext",
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([
'currencyCode' => '',
'destId' => 0,
'searchTypes' => [
],
'sortOrder' => '',
'text' => '',
'topX' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/search/freetext', [
'body' => '{
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/search/freetext');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currencyCode' => '',
'destId' => 0,
'searchTypes' => [
],
'sortOrder' => '',
'text' => '',
'topX' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currencyCode' => '',
'destId' => 0,
'searchTypes' => [
],
'sortOrder' => '',
'text' => '',
'topX' => ''
]));
$request->setRequestUrl('{{baseUrl}}/search/freetext');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/search/freetext' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/search/freetext' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/search/freetext", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/search/freetext"
payload = {
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/search/freetext"
payload <- "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/search/freetext")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/search/freetext') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"searchTypes\": [],\n \"sortOrder\": \"\",\n \"text\": \"\",\n \"topX\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/search/freetext";
let payload = json!({
"currencyCode": "",
"destId": 0,
"searchTypes": (),
"sortOrder": "",
"text": "",
"topX": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/search/freetext \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}'
echo '{
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
}' | \
http POST {{baseUrl}}/search/freetext \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "currencyCode": "",\n "destId": 0,\n "searchTypes": [],\n "sortOrder": "",\n "text": "",\n "topX": ""\n}' \
--output-document \
- {{baseUrl}}/search/freetext
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"currencyCode": "",
"destId": 0,
"searchTypes": [],
"sortOrder": "",
"text": "",
"topX": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/search/freetext")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"data": {
"attractionCity": "Peach Springs",
"attractionLatitude": 36.011871,
"attractionLongitude": -113.81094,
"attractionState": "Arizona",
"attractionStreetAddress": "Eagle Point Road",
"descriptionIntro": "Grand Canyon Skywalk",
"descriptionText": "The Grand Canyon Skywalk is a glass, 70-foot long, open-air bridge suspended 4,000 feet above the canyon floor, providing 720-degree views. The Skywalk is operated by the Hualapai Tribe, which owns and protects more than one million acres of land throughout the Grand Canyon’s western rim. Even with its remote location some 120 miles from Las Vegas, you can easily experience the Grand Canyon Skywalk on a day trip or overnight excursion to the West Rim.",
"destinationId": 684,
"editorsPick": false,
"keywordCount": 0,
"keywords": [],
"overviewSummary": "<div style=\"\">There’s no doubt that 4,000 feet (1,220 meters) is a long way down, especially when standing on a bridge made of glass—and you’re looking down toward the Grand Canyon floor. That’s the experience visitors find at the Grand Canyon Skywalk, a horseshoe-shaped, glass-bottomed bridge that juts out 70 feet (20 meters) above one of America’s most scenic sites. Travelers who step out onto the bridge are rewarded with panoramic West Rim and Colorado River views that extend 720 degrees, wrapping around, below, and behind. </div><div style=\"\"><br></div><div style=\"\"><b>The Basics</b></div><div style=\"\">Most tours to the Grand Canyon Skywalk begin in Las Vegas, where travelers head east to the Arizona desert by road, plane, or helicopter. A Skywalk ticket can be combined with a Hoover Dam trip or a scenic helicopter tour over the canyon, while other options include visits with Hualapai tribe members or a boat ride up the Colorado River. Those short on time can opt for a skip-the-line experience.</div><div style=\"\"><br></div><div style=\"\"><b>Things to Know Before You Go</b></div><div style=\"\"><ul><li>The Skywalk is a must-visit for thrill-seekers.<br></li><li>Cameras aren’t permitted on the Skywalk, but it is possible to purchase photos from Grand Canyon West’s professional photographers.<br></li><li>Outside food and drink are not permitted within Grand Canyon West or on the Skywalk.<br></li><li>Tours to the Skywalk can last upwards of nine hours depending on the option chosen.<br></li></ul></div><div style=\"\"><br></div><div style=\"\"><b>How to Get There</b></div><div style=\"\">McCarran International Airport in Las Vegas is the nearest commercial airport to the Skywalk bridge, about two hours away by road. Because the Grand Canyon Skywalk is a part of Grand Canyon West—a remote and rugged section of canyon managed by the Hualapai—entry to the bridge can only be purchased as part of a package excursion. While many visitors come on a guided tour, it’s also possible to drive yourself to Grand Canyon West, then take the hop-on, hop-off shuttle to the Skywalk and other attractions.</div><div style=\"\"><br></div><div style=\"\"><b>When to Get There</b></div><div style=\"\">Daytime temperatures at the Grand Canyon hover at or above 85°F (30°C) in summer, making fall and spring much more appealing times to visit. The glass bridge tends to be busiest around midday, so plan to arrive in the morning or later in the afternoon to ensure you have more elbow room.</div><div style=\"\"><b><br></b></div><div style=\"\"><b>Other Activities at Grand Canyon West</b></div><div style=\"\">The Grand Canyon West complex lies outside the national park and is operated by the Hualapai tribe. In addition to the Skywalk, visitors can explore an American Indian village at Eagle Point, cruise along the Colorado River, hike to the ruins of an old guano mine, or even rent a rustic cabin at Hualapai Ranch.</div>",
"pagePrimaryLanguage": "en",
"pageTitle": "Grand Canyon Skywalk",
"pageUrlName": "Grand-Canyon-Skywalk",
"panoramaCount": 0,
"photoCount": 110,
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"productCount": 10,
"publishedDate": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rating": 4.5,
"reviewCount": 1695,
"seoId": 10,
"seoType": "ATTRACTION",
"showPhotos": false,
"showReviews": false,
"sortOrder": 1,
"tabTitle": "Grand Canyon Skywalk",
"thumbnailHiResURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/742x525/100565_Las%20Vegas_Grand%20Canyon%20Skywalk_d684-224.jpg",
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/100565_Las%20Vegas_Grand%20Canyon%20Skywalk_d684-224.jpg",
"title": "Grand Canyon Skywalk",
"userName": "",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"searchType": "ATTRACTION",
"sortOrder": 1
},
{
"data": {
"attractionCity": "Grand Canyon National Park",
"attractionLatitude": 36.059053,
"attractionLongitude": -112.12825,
"attractionState": "Arizona",
"attractionStreetAddress": "",
"descriptionIntro": "Grand Canyon South Rim\n",
"descriptionText": "<p>Of the two major rims of the Grand Canyon, many visitors choose the South Rim, which boasts easy access, the bulk of services, and the panoramic vistas for which the park is famous. Every summer, visitors throng the park's most popular rim, mainly to ogle its easily accessible dramatic, sweeping canyon views.</p><p>\n\nBut the Grand Canyon South Rim is more then those spectacular canyon views. The first stop for many is Grand Canyon Village, which is filled with many historic buildings. Other historic highlights in the South Rim is Desert View Watchtower, which has one of the few views of the bottom of the Canyon and the Colorado River; Grand Canyon Railway Depot, built in 1909; and Bright Angel Lodge, a rustic lodge built of logs and stones.</p><p>\n\nFor hikers, the Grand Canyon South Rim is where you'll find Bright Angel Trail, Rim Trail, and South Kaibab Trail - all of which offer the most dazzling views of the Grand Canyon.</p>",
"destinationId": 684,
"editorsPick": true,
"keywordCount": 0,
"keywords": [],
"overviewSummary": "The South Rim is the most popular area of Grand Canyon National Park, boasting easy access to the canyon, the bulk of available amenities and services, and the panoramic vistas for which the natural wonder is famous. One of the most famous attractions in the American Southwest, the area offers breathtaking views over the Colorado River and the chance to immerse yourself in Native American culture.<div><br><b>The Basics<br></b>The South Rim of the Grand Canyon averages 7,000 feet (2,134 meters) above sea level, with natural wonders including Navajo Point, Hermit Road, and the Abyss. Grand Canyon Village is home to a variety of historic buildings, while other popular stops include the Grand Canyon Railway Depot, the Bright Angel Lodge, Kolb Studio, and the Desert View Watchtower, which features work by Hopi artists and incorporates Native American art and design.</div><div><br></div><div>Choosing a group bus tour, helicopter tour, air tour, or a self-drive tour makes the South Rim conveniently accessible from Las Vegas. Tours also leave from Sedona and Phoenix, and some combine the trip with a visit to the West Rim, the North Rim, or the Hoover Dam. A Grand Canyon helicopter tour is undoubtedly the fastest and most dramatic way to visit the canyon from Vegas.</div><div><br></div><div><b>Things to Know Before You Go</b><br><ul><li>The Canyon View Visitor Center, near the south entrance, stocks maps, books, and videos, while the Cameron Trading Post, outside the east entrance to the park, boasts a selection of souvenirs and supplies.<br></li><li>Stop by the Hopi House Gift Store and Art Gallery to see art and crafts from the local tribes.<br></li><li>If driving, be sure you have plenty of gas in your car before setting out for the canyon; there are few service stations in this remote part of Arizona.<br></li></ul><div><br></div><b>How to Get There<br></b>Located in the Arizona national park, the South Rim is a three-hour drive from Las Vegas or a short plane ride via Grand Canyon Airport. Driving from Flagstaff, take US 180 directly to the South Rim or US 89 to Arizona 64 and the east entrance to the park.</div><div><br><b>When to Get There<br></b>The South Rim gets quite crowded with visitors in the summertime. Consider visiting in the shoulder season, or booking a South Rim bus or jeep tour so you don't have to struggle with traffic and parking.</div><div><br><b>Hiking the Grand Canyon South Rim</b></div><div>The Grand Canyon South Rim is home to the Bright Angel Trail, Rim Trail, and South Kaibab Trail—all of which offer the most dazzling views of the canyon. Keep your eyes open for the regal California condors, which have recently returned to the area.</div>",
"pagePrimaryLanguage": "en",
"pageTitle": "Grand Canyon South Rim",
"pageUrlName": "Grand-Canyon-South-Rim",
"panoramaCount": 0,
"photoCount": 54,
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"productCount": 11,
"publishedDate": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rating": 4,
"reviewCount": 32,
"seoId": 1249,
"seoType": "ATTRACTION",
"showPhotos": false,
"showReviews": false,
"sortOrder": 2,
"tabTitle": "Grand Canyon South",
"thumbnailHiResURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/742x525/811289_grand-canyon-south-rim.jpg",
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/811289_grand-canyon-south-rim.jpg",
"title": "Grand Canyon South Rim",
"userName": "",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"searchType": "ATTRACTION",
"sortOrder": 2
},
{
"data": {
"attractionCity": "",
"attractionLatitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"attractionLongitude": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"attractionState": "",
"attractionStreetAddress": "",
"descriptionIntro": "",
"descriptionText": "",
"destinationId": 684,
"editorsPick": false,
"keywordCount": 0,
"keywords": [],
"overviewSummary": "<div>The Grand Canyon is an inspiring sight from any angle, but seeing it from the air is an unforgettable experience. With a helicopter tour from Las Vegas, you'll travel in style and enjoy incredible aerial views of the canyon. Here are your options.</div><div><br></div><div><b>Highlights</b></div><div><ul><li>Skip the tour bus and reach the Grand Canyon in just 45 minutes on a helicopter ride from Las Vegas.</li><li>Catch views of the famous Las Vegas Strip from above on your way in and out of the city.</li><li>Take in the natural beauty of the Grand Canyon and the Colorado River through expansive helicopter windows.</li><li>Enjoy easy access to the sights of your choices, from scenic overlooks to the Grand Canyon Skywalk.<br></li><li>Most tours also fly low over the Hoover Dam, affording more scenic views.</li></ul></div><div><br></div><div><b>VIP & Exclusive Tours</b></div><div>From pickup in a luxury vehicle to a multi-course gourmet meal in the canyon, VIP tours kick things up a notch. Choose a tour that pairs your helicopter ride with a below-the-rim landing, a seated meal, or a sunset champagne toast and picnic set at the canyon with table linens and fine china.</div><div><br></div><div><b>Combo Tours</b></div><div>If you have extra time, add to your Grand Canyon helicopter experience with a boat trip on the Colorado River, a stroll out on the Grand Canyon Skywalk, or some free time for hiking and exploring the national park's West Rim.</div>",
"pagePrimaryLanguage": "en",
"pageTitle": "Grand Canyon Helicopter Tours from Las Vegas",
"pageUrlName": "Grand-Canyon-Helicopter-Tours-from-Las-Vegas",
"panoramaCount": 0,
"photoCount": 229,
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"productCount": 6,
"publishedDate": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"rating": 4.5,
"reviewCount": 2652,
"seoId": 26043,
"seoType": "RECOMMENDATION",
"showPhotos": false,
"showReviews": false,
"sortOrder": 3,
"tabTitle": "",
"thumbnailHiResURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/742x525/668530_Viator_Photographer_392432.jpg",
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/668530_Viator_Photographer_392432.jpg",
"title": "Grand Canyon Helicopter Tours from Las Vegas",
"userName": "",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"searchType": "RECOMMENDATION",
"sortOrder": 3
}
],
"dateStamp": "2021-02-01T18:35:40+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 54,
"vmid": "331004"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"data": {
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": [
18
],
"code": "2596GCWED",
"currencyCode": "EUR",
"duration": "3 hours 30 minutes",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 1518.53,
"merchantNetPriceFromFormatted": "€1.518,53",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 5,
"price": 1828.02,
"priceFormatted": "€1.828,02",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Grand-Canyon-Helicopter-Wedding",
"rating": 5,
"reviewCount": 10,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Make your special day even more memorable! Say \"I do\" in the Grand Canyon and fly from Las Vegas in a six-seater helicopter. All the arrangements are made for you, and you can even have an Elvis or Johnny Cash impersonator perform the ceremony (additional cost).",
"shortTitle": "Grand Canyon Helicopter Wedding",
"sortOrder": 1,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
61,
62
],
"supplierCode": "2596",
"supplierName": "A Special Memory Wedding Chapel",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/a4/cf/24.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/a4/cf/24.jpg",
"title": "Grand Canyon Helicopter Wedding",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"searchType": "PRODUCT",
"sortOrder": 1
},
{
"data": {
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": [
16,
5,
9,
25,
12
],
"code": "43493P1",
"currencyCode": "EUR",
"duration": "15 hours",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 59.32,
"merchantNetPriceFromFormatted": "€59,32",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 82.66,
"priceFormatted": "€82,66",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Grand-Canyon-South-Rim-Day-Tour-from-Las-Vegas",
"rating": 4.2,
"reviewCount": 32,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Journey to one of the Seven Wonders of the World on this day tour from Las Vegas. After hotel pick-up from most hotels on the Strip, you'll head out to the beautiful South Rim for 3 hours. Your guide will provide you with some suggested itineraries to help maximize your time here.AT THIS TIME, THE GRAND CANYON NATIONAL PARK HAS PLACED RESTRICTIONS ON GROUP TOURS TO THE SOUTH RIM DUE TO COVID19. THEY HAVE NOT SET A SPECIFIC DATE ON WHEN RESTRICTIONS WILL BE LIFTED; HOWEVER, WE ARE ACCEPTING RESERVATIONS GIVEN THE RESTRICTIONS CAN BE REMOVED AT ANY TIME. AS THE DAY OF YOUR TOUR ARRIVES, WE WILL CONTACT YOU TO INFORM YOU IF THE TOUR WILL BE OPERATING OR NOT. IF IT DOES NOT, WE CAN ISSUE YOU A FULL REFUND OR WE CAN OFFER YOU TO MOVE TO THE GRAND CANYON WEST RIM TOUR. THE WEST RIM IS CURRENTLY OPEN AND WE ARE OPERATING TOURS THERE ON A REGULAR BASIS.<br>",
"shortTitle": "Grand Canyon South Rim Bus Tour",
"sortOrder": 2,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
113,
98,
36,
56,
94,
15
],
"supplierCode": "43493",
"supplierName": "Sweetours",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/0b/30/7e/e9.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/0b/30/7e/e9.jpg",
"title": "Grand Canyon South Rim Bus Tour",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
"searchType": "PRODUCT",
"sortOrder": 2
},
{
"data": {
"defaultCurrencyCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"destinationId": 23971,
"destinationName": "Grand Baie",
"destinationType": "CITY",
"destinationUrlName": "Grand-Baie",
"iataCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"latitude": -20.007281,
"longitude": 57.586106,
"lookupId": "1.4463.23971",
"parentId": 4463,
"selectable": true,
"sortOrder": 3,
"timeZone": "Indian/Mauritius"
},
"searchType": "DESTINATION",
"sortOrder": 3
}
],
"dateStamp": "2021-02-01T18:35:40+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 54,
"vmid": "331004"
}
POST
-search-products-codes
{{baseUrl}}/search/products/codes
HEADERS
Accept-Language
BODY json
{
"currencyCode": "",
"productCodes": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/search/products/codes");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/search/products/codes" {:headers {:accept-language ""}
:content-type :json
:form-params {:currencyCode ""
:productCodes []}})
require "http/client"
url = "{{baseUrl}}/search/products/codes"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/search/products/codes"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/search/products/codes");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/search/products/codes"
payload := strings.NewReader("{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/search/products/codes HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"currencyCode": "",
"productCodes": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/search/products/codes")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/search/products/codes"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/search/products/codes")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/search/products/codes")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}")
.asString();
const data = JSON.stringify({
currencyCode: '',
productCodes: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/search/products/codes');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/search/products/codes',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {currencyCode: '', productCodes: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/search/products/codes';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","productCodes":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/search/products/codes',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "currencyCode": "",\n "productCodes": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/search/products/codes")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/search/products/codes',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({currencyCode: '', productCodes: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/search/products/codes',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {currencyCode: '', productCodes: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/search/products/codes');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
currencyCode: '',
productCodes: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/search/products/codes',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {currencyCode: '', productCodes: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/search/products/codes';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"currencyCode":"","productCodes":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"currencyCode": @"",
@"productCodes": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/search/products/codes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/search/products/codes" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/search/products/codes",
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([
'currencyCode' => '',
'productCodes' => [
]
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/search/products/codes', [
'body' => '{
"currencyCode": "",
"productCodes": []
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/search/products/codes');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currencyCode' => '',
'productCodes' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currencyCode' => '',
'productCodes' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/search/products/codes');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/search/products/codes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"productCodes": []
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/search/products/codes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currencyCode": "",
"productCodes": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/search/products/codes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/search/products/codes"
payload = {
"currencyCode": "",
"productCodes": []
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/search/products/codes"
payload <- "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/search/products/codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/search/products/codes') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"currencyCode\": \"\",\n \"productCodes\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/search/products/codes";
let payload = json!({
"currencyCode": "",
"productCodes": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/search/products/codes \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"currencyCode": "",
"productCodes": []
}'
echo '{
"currencyCode": "",
"productCodes": []
}' | \
http POST {{baseUrl}}/search/products/codes \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "currencyCode": "",\n "productCodes": []\n}' \
--output-document \
- {{baseUrl}}/search/products/codes
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"currencyCode": "",
"productCodes": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/search/products/codes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "UnconditionalBE",
"catIds": [
6,
12
],
"code": "5010SYDNEY",
"currencyCode": "EUR",
"duration": "2 hours",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 26.64,
"merchantNetPriceFromFormatted": "€26,64",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 124,
"price": 33.35,
"priceFormatted": "€33,35",
"primaryDestinationId": 357,
"primaryDestinationName": "Sydney",
"primaryDestinationUrlName": "Sydney",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Sydney-and-Bondi-Hop-on-Hop-off-Tour",
"rating": 4.5,
"reviewCount": 1605,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Explore Sydney and Bondi Beach on this hop-on hop-off sightseeing tour, which takes you by double-decker bus to 34 stops around the city including Sydney Opera House, Sydney Harbour Bridge, Darling Harbour, Bondi Beach and more. Enjoy unobstructed views and recorded commentary on board. Simply hop off to walk around and sightsee in depth. Your ticket is valid for 24 or 48 hours, so you can experience Sydney and Bondi's most noteworthy attractions, sights, and shopping and dining areas at your own pace.",
"shortTitle": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"sortOrder": 1,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
97,
98,
5330,
26963,
32024,
45
],
"supplierCode": "5010",
"supplierName": "Big Bus Tours",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/94/40/f3.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/94/40/f3.jpg",
"title": "Big Bus Sydney and Bondi Hop-on Hop-off Tour",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 1,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "FreesaleOnRequestBE",
"catIds": [
1,
25,
12
],
"code": "2280SUN",
"currencyCode": "EUR",
"duration": "3 hours 30 minutes",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 386.11,
"merchantNetPriceFromFormatted": "€386,11",
"onRequestPeriod": 336,
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 7,
"price": 449.74,
"priceFormatted": "€449,74",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Grand-Canyon-West-Rim-Deluxe-Sunset-Helicopter-Tour",
"rating": 5,
"reviewCount": 399,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Take off from Las Vegas on a magical sunset helicopter tour to the Grand Canyon. You'll enjoy a 45-minute helicopter flight each way, land at the Grand Canyon for a glass of Champagne and snacks while you watch the sun start it's descent behind the walls of the canyon, then fly low over the famous neon-lit Las Vegas Strip on your return.",
"shortTitle": "Grand Canyon from Las Vegas West Rim Sunset Helicopter Tour",
"sortOrder": 2,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
113,
2,
98,
26963,
45,
95
],
"supplierCode": "2280",
"supplierName": "Sundance Helicopters",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/7a/ec/1c.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/7a/ec/1c.jpg",
"title": "Grand Canyon West Rim Deluxe Sunset Helicopter Tour",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 1,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"dateStamp": "2020-02-09T16:07:17+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 2,
"vmid": "331003"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [],
"dateStamp": "2020-02-09T16:11:27+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 0,
"vmid": "331005"
}
POST
-search-products
{{baseUrl}}/search/products
HEADERS
Accept-Language
BODY json
{
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/search/products");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/search/products" {:headers {:accept-language ""}
:content-type :json
:form-params {:catId 0
:currencyCode ""
:destId 0
:endDate ""
:seoId ""
:sortOrder ""
:startDate ""
:subCatId 0
:topX ""}})
require "http/client"
url = "{{baseUrl}}/search/products"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/search/products"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/search/products");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/search/products"
payload := strings.NewReader("{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/search/products HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 154
{
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/search/products")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/search/products"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/search/products")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/search/products")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}")
.asString();
const data = JSON.stringify({
catId: 0,
currencyCode: '',
destId: 0,
endDate: '',
seoId: '',
sortOrder: '',
startDate: '',
subCatId: 0,
topX: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/search/products');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/search/products',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
catId: 0,
currencyCode: '',
destId: 0,
endDate: '',
seoId: '',
sortOrder: '',
startDate: '',
subCatId: 0,
topX: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/search/products';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"catId":0,"currencyCode":"","destId":0,"endDate":"","seoId":"","sortOrder":"","startDate":"","subCatId":0,"topX":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/search/products',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "catId": 0,\n "currencyCode": "",\n "destId": 0,\n "endDate": "",\n "seoId": "",\n "sortOrder": "",\n "startDate": "",\n "subCatId": 0,\n "topX": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/search/products")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/search/products',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
catId: 0,
currencyCode: '',
destId: 0,
endDate: '',
seoId: '',
sortOrder: '',
startDate: '',
subCatId: 0,
topX: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/search/products',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {
catId: 0,
currencyCode: '',
destId: 0,
endDate: '',
seoId: '',
sortOrder: '',
startDate: '',
subCatId: 0,
topX: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/search/products');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
catId: 0,
currencyCode: '',
destId: 0,
endDate: '',
seoId: '',
sortOrder: '',
startDate: '',
subCatId: 0,
topX: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/search/products',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {
catId: 0,
currencyCode: '',
destId: 0,
endDate: '',
seoId: '',
sortOrder: '',
startDate: '',
subCatId: 0,
topX: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/search/products';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"catId":0,"currencyCode":"","destId":0,"endDate":"","seoId":"","sortOrder":"","startDate":"","subCatId":0,"topX":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"catId": @0,
@"currencyCode": @"",
@"destId": @0,
@"endDate": @"",
@"seoId": @"",
@"sortOrder": @"",
@"startDate": @"",
@"subCatId": @0,
@"topX": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/search/products"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/search/products" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/search/products",
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([
'catId' => 0,
'currencyCode' => '',
'destId' => 0,
'endDate' => '',
'seoId' => '',
'sortOrder' => '',
'startDate' => '',
'subCatId' => 0,
'topX' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/search/products', [
'body' => '{
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/search/products');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'catId' => 0,
'currencyCode' => '',
'destId' => 0,
'endDate' => '',
'seoId' => '',
'sortOrder' => '',
'startDate' => '',
'subCatId' => 0,
'topX' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'catId' => 0,
'currencyCode' => '',
'destId' => 0,
'endDate' => '',
'seoId' => '',
'sortOrder' => '',
'startDate' => '',
'subCatId' => 0,
'topX' => ''
]));
$request->setRequestUrl('{{baseUrl}}/search/products');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/search/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/search/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/search/products", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/search/products"
payload = {
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/search/products"
payload <- "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/search/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/search/products') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"catId\": 0,\n \"currencyCode\": \"\",\n \"destId\": 0,\n \"endDate\": \"\",\n \"seoId\": \"\",\n \"sortOrder\": \"\",\n \"startDate\": \"\",\n \"subCatId\": 0,\n \"topX\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/search/products";
let payload = json!({
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/search/products \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}'
echo '{
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
}' | \
http POST {{baseUrl}}/search/products \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "catId": 0,\n "currencyCode": "",\n "destId": 0,\n "endDate": "",\n "seoId": "",\n "sortOrder": "",\n "startDate": "",\n "subCatId": 0,\n "topX": ""\n}' \
--output-document \
- {{baseUrl}}/search/products
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"catId": 0,
"currencyCode": "",
"destId": 0,
"endDate": "",
"seoId": "",
"sortOrder": "",
"startDate": "",
"subCatId": 0,
"topX": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/search/products")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": [
26051,
6,
50127
],
"code": "73492P4",
"currencyCode": "USD",
"duration": "1 hour",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": false,
"merchantNetPriceFrom": 55.38,
"merchantNetPriceFromFormatted": "$55.38",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 65,
"priceFormatted": "$65.00",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": 26051,
"productUrlName": "Viva-Las-Vinos-Wine-Yoga",
"rating": 0,
"reviewCount": 0,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Sip your wine and unwind with wine yoga! This gentle yoga class combines sipping your wine and practicing fun yoga basics in a rad environment. A tad unconventional, this class is filled with laughter, fun, and cheers-ing your neighbor.<br><br>Private parties are available upon request.<br><br>Ticket includes one glass of wine, a souvenir adult sippy (to help prevent the spillage of the wine!), and a gentle quirky yoga class.<br><br>",
"shortTitle": "Yoga Uncorked at The Gramercy",
"sortOrder": 1,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
50128,
19,
26052,
21,
40293
],
"supplierCode": "73492",
"supplierName": "MintnHoney",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/27/7e/88.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/09/27/7e/88.jpg",
"title": "Yoga Uncorked at The Gramercy",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": [
26051,
6
],
"code": "73492P17",
"currencyCode": "USD",
"duration": "1 hour",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 46.86,
"merchantNetPriceFromFormatted": "$46.86",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 55,
"priceFormatted": "$55.00",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": 6,
"productUrlName": "Yoga-Uncorked-Artisan-Hotel",
"rating": 0,
"reviewCount": 0,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Sip your wine and unwind with wine yoga! This gentle yoga class combines sipping your wine and practicing fun yoga basics in a rad environment. A tad unconventional, this class is filled with laughter, fun, and cheers-ing your neighbor.<br><br>Private parties are available upon request.<br><br>Ticket includes one glass of wine, a souvenir adult sippy (to help prevent the spillage of the wine!), and a gentle quirky yoga class.<br><br>",
"shortTitle": "Yoga Uncorked-Artisan Hotel",
"sortOrder": 2,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
19,
26052,
21,
40293
],
"supplierCode": "73492",
"supplierName": "MintnHoney",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/ac/2b/2d.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/09/ac/2b/2d.jpg",
"title": "Yoga Uncorked-Artisan Hotel",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "DeferredCRMBE",
"catIds": [
26051,
50127
],
"code": "73458P1",
"currencyCode": "USD",
"duration": "1 to 2 hours",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 213,
"merchantNetPriceFromFormatted": "$213.00",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 250,
"priceFormatted": "$250.00",
"primaryDestinationId": 22171,
"primaryDestinationName": "Nevada",
"primaryDestinationUrlName": "Nevada",
"primaryGroupId": 26051,
"productUrlName": "Sunset-Yoga-in-Las-Vegas",
"rating": 0,
"reviewCount": 0,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Enjoy a quiet, beautiful short walk to a secluded and breathtaking scene in Las Vegas. Travelers can choose to visit Calico Basin, Mt. Charleston, Wetlands, Seven Magic Mountains, or Lake Las Vegas for a private or group yoga session. Each session will provide the freedom from day-to-day distractions and allow you to immerse yourself in a unique and awe-inspiring locale. Each yoga session will be tailored to the individual and/or group in order to ensure the proper tone and intention is set. This is an all-inclusive experience. Guided walking tour, customized yoga session, yoga mats and water will be provided.",
"shortTitle": "Explore the Beauty of Las Vegas with Private and Group Yoga Classes",
"sortOrder": 3,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
50128,
26052,
40293
],
"supplierCode": "73458",
"supplierName": "Jennifer Pierotti Yoga ",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/3b/bc/78.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/3b/bc/78.jpg",
"title": "Explore the Beauty of Las Vegas with Private and Group Yoga Classes",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"dateStamp": "2020-02-09T14:34:51+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 3,
"vmid": "331005"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"admission": "3",
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"code": "5408P24",
"currencyCode": "USD",
"duration": "5 hours",
"essential": "2",
"merchantCancellable": true,
"merchantNetPriceFrom": 21.12,
"merchantNetPriceFromFormatted": "$21.12",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 9,
"price": 27.55,
"priceFormatted": "$27.55",
"primaryDestinationId": 662,
"primaryDestinationName": "Miami",
"primaryDestinationUrlName": "Miami",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Everglades-Airboat-Safari",
"rating": 4,
"reviewCount": 12,
"rrp": 29,
"rrpformatted": "$29.00",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Explore the Everglades National Park and Florida's natural eco-system on an airboat! See and experience the wild alligators in their natural habitat. Have the chance to see alligators up close in their natural habitat, as well as the many exhibits scattered throughout the park. Transportation is available from your hotel when option is selected.",
"shortTitle": "Everglades Airboat Safari",
"sortOrder": 2,
"specialOfferAvailable": true,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"supplierCode": "5408",
"supplierName": "Miami Double Decker",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/06/6e/f3/ca.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/06/6e/f3/ca.jpg",
"title": "Everglades Airboat Safari",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": "3",
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"code": "6331EVERAIRTRANS",
"currencyCode": "USD",
"duration": "5 hours",
"essential": "2",
"merchantCancellable": true,
"merchantNetPriceFrom": 40.97,
"merchantNetPriceFromFormatted": "$40.97",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 51.3,
"priceFormatted": "$51.30",
"primaryDestinationId": 662,
"primaryDestinationName": "Miami",
"primaryDestinationUrlName": "Miami",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Everglades-Airboat-Tour-with-Transport-from-Miami",
"rating": 3.5,
"reviewCount": 22,
"rrp": 54,
"rrpformatted": "$54.00",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Choose between daily morning or afternoon departure from Miami Beach or Downtown Miami and experience everything the Everglades have to offer during this ca. 4-5 hour Everglades tour (depending on traffic). English, Spanish or German guides are available on your bus. After your pick-up you will drive to the Everglades where you will first board an Airboat guided by your park ranger which takes you on an exciting high speed ride through the river of grass and allows you to discover the beauty of this unique eco-system. Observe a variety of animals including birds, turtles and alligators in their natural habitat and watch the gators up close during the alligator presentation following the airboat ride",
"shortTitle": "Everglades Airboat Ride Ranger-Guided Eco-Tour from Miami",
"sortOrder": 4,
"specialOfferAvailable": true,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"supplierCode": "6331",
"supplierName": "US2U",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/06/e9/60/52.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/06/e9/60/52.jpg",
"title": "Everglades Airboat & Gators AM or PM pick-up - English,Spanish,German or French",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": "3",
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"code": "6331P14",
"currencyCode": "USD",
"duration": "5 hours",
"essential": "2",
"merchantCancellable": true,
"merchantNetPriceFrom": 61.5,
"merchantNetPriceFromFormatted": "$61.50",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 65.45,
"priceFormatted": "$65.45",
"primaryDestinationId": 662,
"primaryDestinationName": "Miami",
"primaryDestinationUrlName": "Miami",
"primaryGroupId": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"productUrlName": "Everglades-Tour-auf-Deutsch",
"rating": 3,
"reviewCount": 1,
"rrp": 77,
"rrpformatted": "$77.00",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Discover the Everglades on this popular tour. Enjoy a one hour Airboat tour and a wildlife show displaying a variety of animals.",
"shortTitle": "Everglades Airboat 1 hour with AM or PM pick-up",
"sortOrder": 6,
"specialOfferAvailable": true,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"supplierCode": "6331",
"supplierName": "US2U",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/a5/43/8f.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/09/a5/43/8f.jpg",
"title": "Everglades Airboat 1 hour with AM or PM pick-up",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"dateStamp": "2020-02-09T14:37:22+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 24,
"vmid": "331001"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "FreesaleBE",
"catIds": [
4,
20,
9,
25,
26,
12
],
"code": "50420P54",
"currencyCode": "USD",
"duration": "15 days",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": false,
"merchantNetPriceFrom": 4792.5,
"merchantNetPriceFromFormatted": "$4,792.50",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 6000,
"priceFormatted": "$6,000.00",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": 4,
"productUrlName": "The-Old-Southwest-Grand-Circle-Leisure-Tour",
"rating": 0,
"reviewCount": 0,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "Do you want to see as many National Parks as you can? Then book our Southwest National Parks Grand Circle Tour, which includes 7 National Parks and an old train ride. Explore amazing, famous National Parks like Arches, Canyonlands, Capitol Reef, Bryce Canyon, Zion, Mesa Verde and more. This includes Utah's Mighty Five and many more. Shoot down white water rapids with an experienced guide or take a lazy, scenic river float. These are just some of the items packed into our extensive Grand Circle Tour.<br><br>Spend 14 magical days exploring petrified dunes, vibrant pine forests, and deserts with oil-painting perfect sunsets. This is a small group setting. Usually, there are no more than ten guests. Each small group has a private guide to tell stories of the old days and give insight into what you are experiencing. With its walking, scenic views, local restaurants, hidden gems, and other fantastic experiences, the Southwest National Parks Grand Circle Tour awaits you!",
"shortTitle": "The Old Southwest Grand Circle--Leisure Tour",
"sortOrder": 1,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
113,
98,
36,
116,
85,
11
],
"supplierCode": "50420",
"supplierName": "New Way Horizon Travel LLC",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/09/19/57/60.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/09/19/57/60.jpg",
"title": "The Old Southwest Grand Circle--Leisure Tour",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "DeferredCRMBE",
"catIds": [
1,
18,
26,
12
],
"code": "9424P24",
"currencyCode": "USD",
"duration": "3 hours",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": true,
"merchantNetPriceFrom": 3236.75,
"merchantNetPriceFromFormatted": "$3,236.75",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 3799.99,
"priceFormatted": "$3,799.99",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": 18,
"productUrlName": "Helicopter-Wedding-The-Grand-Canon",
"rating": 0,
"reviewCount": 0,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "If getting married in a natural wonder of the world is on your bucket list, look no farther. You and your guests will enjoy a scenic flight the Grand Canyon West Rim for a private ceremony in the basin of the canyon. Photos, cake, a Champagne toast and limousine transfers are included.",
"shortTitle": "Grand Canyon Helicopter Wedding Ceremony",
"sortOrder": 2,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
2,
26963,
116,
61,
45,
62,
95
],
"supplierCode": "9424",
"supplierName": "Destination Las Vegas Group",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/06/75/b7/96.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/06/75/b7/96.jpg",
"title": "Helicopter Wedding Ceremony: The Grand Canyon",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"admission": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"available": true,
"bookingEngineId": "DeferredCRMBE",
"catIds": [
20,
9,
26,
12
],
"code": "240839P1",
"currencyCode": "USD",
"duration": "3 days",
"essential": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"merchantCancellable": false,
"merchantNetPriceFrom": 1996.08,
"merchantNetPriceFromFormatted": "$1,996.08",
"onRequestPeriod": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"onSale": false,
"panoramaCount": 0,
"pas": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"photoCount": 0,
"price": 2499,
"priceFormatted": "$2,499.00",
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"primaryGroupId": 9,
"productUrlName": "3-Day-Zion-Adventure-Tour",
"rating": 0,
"reviewCount": 0,
"rrp": 0,
"rrpformatted": "",
"savingAmount": 0,
"savingAmountFormated": "",
"shortDescription": "The hosts and guides are locals, so we know the sweet spots away from the crowds. Our multi-lingual abilities are sure to keep the group happy and entertained as we traverse through some unique and gorgeous locations. We’ve simplified logistics, landed some amazing accommodations, and planned in high quality adventure and American meals. We’re happy to customize the tour to groups and families wanting a little more say in the adventure. Just email us!",
"shortTitle": "3 Day Zion Adventure Tour",
"sortOrder": 3,
"specialOfferAvailable": false,
"specialReservation": false,
"specialReservationDetails": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"sslSupported": false,
"subCatIds": [
32,
98,
116,
85
],
"supplierCode": "240839",
"supplierName": "Red Tread Tours LLC",
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/0a/3d/3f/ff.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/0a/3d/3f/ff.jpg",
"title": "3 Day Zion Adventure Tour",
"translationLevel": 0,
"uniqueShortDescription": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"videoCount": 0,
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"dateStamp": "2020-02-09T15:18:03+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 910,
"vmid": "331005"
}
POST
-taxonomy-attractions
{{baseUrl}}/taxonomy/attractions
HEADERS
Accept-Language
BODY json
{
"destId": 0,
"sortOrder": "",
"topX": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/taxonomy/attractions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/taxonomy/attractions" {:headers {:accept-language ""}
:content-type :json
:form-params {:destId 0
:sortOrder ""
:topX ""}})
require "http/client"
url = "{{baseUrl}}/taxonomy/attractions"
headers = HTTP::Headers{
"accept-language" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/taxonomy/attractions"),
Headers =
{
{ "accept-language", "" },
},
Content = new StringContent("{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/taxonomy/attractions");
var request = new RestRequest("", Method.Post);
request.AddHeader("accept-language", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/taxonomy/attractions"
payload := strings.NewReader("{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/taxonomy/attractions HTTP/1.1
Accept-Language:
Content-Type: application/json
Host: example.com
Content-Length: 50
{
"destId": 0,
"sortOrder": "",
"topX": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/taxonomy/attractions")
.setHeader("accept-language", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/taxonomy/attractions"))
.header("accept-language", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/taxonomy/attractions")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/taxonomy/attractions")
.header("accept-language", "")
.header("content-type", "application/json")
.body("{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}")
.asString();
const data = JSON.stringify({
destId: 0,
sortOrder: '',
topX: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/taxonomy/attractions');
xhr.setRequestHeader('accept-language', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/taxonomy/attractions',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {destId: 0, sortOrder: '', topX: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/taxonomy/attractions';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"destId":0,"sortOrder":"","topX":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/taxonomy/attractions',
method: 'POST',
headers: {
'accept-language': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "destId": 0,\n "sortOrder": "",\n "topX": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/taxonomy/attractions")
.post(body)
.addHeader("accept-language", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/taxonomy/attractions',
headers: {
'accept-language': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({destId: 0, sortOrder: '', topX: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/taxonomy/attractions',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: {destId: 0, sortOrder: '', topX: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/taxonomy/attractions');
req.headers({
'accept-language': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
destId: 0,
sortOrder: '',
topX: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/taxonomy/attractions',
headers: {'accept-language': '', 'content-type': 'application/json'},
data: {destId: 0, sortOrder: '', topX: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/taxonomy/attractions';
const options = {
method: 'POST',
headers: {'accept-language': '', 'content-type': 'application/json'},
body: '{"destId":0,"sortOrder":"","topX":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"destId": @0,
@"sortOrder": @"",
@"topX": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/taxonomy/attractions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/taxonomy/attractions" in
let headers = Header.add_list (Header.init ()) [
("accept-language", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/taxonomy/attractions",
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([
'destId' => 0,
'sortOrder' => '',
'topX' => ''
]),
CURLOPT_HTTPHEADER => [
"accept-language: ",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/taxonomy/attractions', [
'body' => '{
"destId": 0,
"sortOrder": "",
"topX": ""
}',
'headers' => [
'accept-language' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/taxonomy/attractions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'destId' => 0,
'sortOrder' => '',
'topX' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'destId' => 0,
'sortOrder' => '',
'topX' => ''
]));
$request->setRequestUrl('{{baseUrl}}/taxonomy/attractions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'accept-language' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/taxonomy/attractions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"destId": 0,
"sortOrder": "",
"topX": ""
}'
$headers=@{}
$headers.Add("accept-language", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/taxonomy/attractions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"destId": 0,
"sortOrder": "",
"topX": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}"
headers = {
'accept-language': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/taxonomy/attractions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/taxonomy/attractions"
payload = {
"destId": 0,
"sortOrder": "",
"topX": ""
}
headers = {
"accept-language": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/taxonomy/attractions"
payload <- "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('accept-language' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/taxonomy/attractions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/taxonomy/attractions') do |req|
req.headers['accept-language'] = ''
req.body = "{\n \"destId\": 0,\n \"sortOrder\": \"\",\n \"topX\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/taxonomy/attractions";
let payload = json!({
"destId": 0,
"sortOrder": "",
"topX": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/taxonomy/attractions \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--data '{
"destId": 0,
"sortOrder": "",
"topX": ""
}'
echo '{
"destId": 0,
"sortOrder": "",
"topX": ""
}' | \
http POST {{baseUrl}}/taxonomy/attractions \
accept-language:'' \
content-type:application/json
wget --quiet \
--method POST \
--header 'accept-language: ' \
--header 'content-type: application/json' \
--body-data '{\n "destId": 0,\n "sortOrder": "",\n "topX": ""\n}' \
--output-document \
- {{baseUrl}}/taxonomy/attractions
import Foundation
let headers = [
"accept-language": "",
"content-type": "application/json"
]
let parameters = [
"destId": 0,
"sortOrder": "",
"topX": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/taxonomy/attractions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"attractionCity": "",
"attractionLatitude": 35.8808,
"attractionLongitude": -113.97048,
"attractionState": "",
"attractionStreetAddress": "",
"destinationId": 684,
"pageUrlName": "Grand-Canyon-West-Rim",
"photoCount": 157,
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"productCount": 16,
"publishedDate": "2020-01-15",
"rating": 4.5,
"seoId": 1594,
"sortOrder": 1,
"thumbnailHiResURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/742x525/44811_GrandCanyon_WestRim_d815-24.jpg",
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/44811_GrandCanyon_WestRim_d815-24.jpg",
"title": "Grand Canyon West Rim",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"attractionCity": "Las Vegas",
"attractionLatitude": 36.162683,
"attractionLongitude": -115.144685,
"attractionState": "",
"attractionStreetAddress": "619 Las Vegas Boulevard South",
"destinationId": 684,
"pageUrlName": "Graceland-Wedding-Chapel",
"photoCount": 10,
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"productCount": 2,
"publishedDate": "2019-08-22",
"rating": 4.5,
"seoId": 1246,
"sortOrder": 2,
"thumbnailHiResURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/742x525/785937_Viator_Photographer_395090.jpg",
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/785937_Viator_Photographer_395090.jpg",
"title": "Graceland Wedding Chapel",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
},
{
"attractionCity": "Las Vegas",
"attractionLatitude": 36.126374,
"attractionLongitude": -115.166749,
"attractionState": "",
"attractionStreetAddress": "3131 Las Vegas Blvd South",
"destinationId": 684,
"pageUrlName": "Wynn-Las-Vegas",
"photoCount": 5,
"primaryDestinationId": 684,
"primaryDestinationName": "Las Vegas",
"primaryDestinationUrlName": "Las-Vegas",
"productCount": 2,
"publishedDate": "2019-07-30",
"rating": 0,
"seoId": 1266,
"sortOrder": 3,
"thumbnailHiResURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/742x525/100516_Las%20Vegas_Wynn%20Hotel%20&%20Casino_d684-508.jpg",
"thumbnailURL": "http://cache-graphicslib.viator.com/graphicslib/page-images/100516_Las%20Vegas_Wynn%20Hotel%20&%20Casino_d684-508.jpg",
"title": "Wynn Las Vegas",
"webURL": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
}
}
],
"dateStamp": "2020-02-06T19:55:25+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 72,
"vmid": "331004"
}
GET
-taxonomy-categories
{{baseUrl}}/taxonomy/categories
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/taxonomy/categories");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/taxonomy/categories" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/taxonomy/categories"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/taxonomy/categories"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/taxonomy/categories");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/taxonomy/categories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/taxonomy/categories HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/taxonomy/categories")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/taxonomy/categories"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/taxonomy/categories")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/taxonomy/categories")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/taxonomy/categories');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/taxonomy/categories',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/taxonomy/categories';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/taxonomy/categories',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/taxonomy/categories")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/taxonomy/categories',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/taxonomy/categories',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/taxonomy/categories');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/taxonomy/categories',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/taxonomy/categories';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/taxonomy/categories"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/taxonomy/categories" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/taxonomy/categories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/taxonomy/categories', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/taxonomy/categories');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/taxonomy/categories');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/taxonomy/categories' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/taxonomy/categories' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/taxonomy/categories", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/taxonomy/categories"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/taxonomy/categories"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/taxonomy/categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/taxonomy/categories') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/taxonomy/categories";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/taxonomy/categories \
--header 'accept-language: '
http GET {{baseUrl}}/taxonomy/categories \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/taxonomy/categories
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/taxonomy/categories")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"groupName": "Air, Helicopter & Balloon Tours",
"groupUrlName": "Air-Helicopter-and-Balloon-Tours",
"id": 1,
"productCount": 77,
"sortOrder": 1,
"subcategories": [
{
"categoryId": 1,
"sortOrder": 1,
"subcategoryId": 2,
"subcategoryName": "Helicopter Tours",
"subcategoryUrlName": "Helicopter-Tours"
},
{
"categoryId": 1,
"sortOrder": 2,
"subcategoryId": 1,
"subcategoryName": "Air Tours",
"subcategoryUrlName": "Air-Tours"
},
{
"categoryId": 1,
"sortOrder": 3,
"subcategoryId": 3,
"subcategoryName": "Balloon Rides",
"subcategoryUrlName": "Balloon-Rides"
}
],
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/07/71/7c/7d.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/07/71/7c/7d.jpg"
},
{
"groupName": "Classes & Workshops",
"groupUrlName": "Classes-and-Workshops",
"id": 26051,
"productCount": 12,
"sortOrder": 2,
"subcategories": [
{
"categoryId": 26051,
"sortOrder": 1,
"subcategoryId": 40290,
"subcategoryName": "Language Classes",
"subcategoryUrlName": "Language-Classes"
},
{
"categoryId": 26051,
"sortOrder": 2,
"subcategoryId": 40293,
"subcategoryName": "Sports Lessons",
"subcategoryUrlName": "Sports-Lessons"
},
{
"categoryId": 26051,
"sortOrder": 3,
"subcategoryId": 33939,
"subcategoryName": "Craft Classes",
"subcategoryUrlName": "Craft-Classes"
},
{
"categoryId": 26051,
"sortOrder": 4,
"subcategoryId": 26052,
"subcategoryName": "Yoga Classes",
"subcategoryUrlName": "Yoga-Classes"
},
{
"categoryId": 26051,
"sortOrder": 5,
"subcategoryId": 40286,
"subcategoryName": "Art Classes",
"subcategoryUrlName": "Art-Classes"
}
],
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/0a/03/9e/ca.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/0a/03/9e/ca.jpg"
},
{
"groupName": "Cruises, Sailing & Water Tours",
"groupUrlName": "Cruises-Sailing-and-Water-Tours",
"id": 3,
"productCount": 21,
"sortOrder": 3,
"subcategories": [
{
"categoryId": 3,
"sortOrder": 1,
"subcategoryId": 5640,
"subcategoryName": "Dinner Cruises",
"subcategoryUrlName": "Dinner-Cruises"
},
{
"categoryId": 3,
"sortOrder": 2,
"subcategoryId": 7,
"subcategoryName": "Day Cruises",
"subcategoryUrlName": "Day-Cruises"
},
{
"categoryId": 3,
"sortOrder": 3,
"subcategoryId": 40295,
"subcategoryName": "Water Tours",
"subcategoryUrlName": "Water-Tours"
}
],
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/06/e5/a3/54.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/06/e5/a3/54.jpg"
},
{
"groupName": "Cultural & Theme Tours",
"groupUrlName": "Cultural-and-Theme-Tours",
"id": 4,
"productCount": 94,
"sortOrder": 4,
"subcategories": [
{
"categoryId": 4,
"sortOrder": 1,
"subcategoryId": 14,
"subcategoryName": "Literary, Art & Music Tours",
"subcategoryUrlName": "Literary-Art-and-Music-Tours"
},
{
"categoryId": 4,
"sortOrder": 2,
"subcategoryId": 118,
"subcategoryName": "Ghost & Vampire Tours",
"subcategoryUrlName": "Ghost-and-Vampire-Tours"
},
{
"categoryId": 4,
"sortOrder": 3,
"subcategoryId": 12,
"subcategoryName": "Historical & Heritage Tours",
"subcategoryUrlName": "Historical-and-Heritage-Tours"
},
{
"categoryId": 4,
"sortOrder": 4,
"subcategoryId": 11,
"subcategoryName": "Cultural Tours",
"subcategoryUrlName": "Cultural-Tours"
},
{
"categoryId": 4,
"sortOrder": 5,
"subcategoryId": 26967,
"subcategoryName": "Architecture Tours",
"subcategoryUrlName": "Architecture-Tours"
},
{
"categoryId": 4,
"sortOrder": 6,
"subcategoryId": 13,
"subcategoryName": "Movie & TV Tours",
"subcategoryUrlName": "Movie-and-TV-Tours"
},
{
"categoryId": 4,
"sortOrder": 7,
"subcategoryId": 40338,
"subcategoryName": "LGBT Friendly Tours",
"subcategoryUrlName": "LGBT-Friendly-Tours"
},
{
"categoryId": 4,
"sortOrder": 8,
"subcategoryId": 5332,
"subcategoryName": "Archaeology Tours",
"subcategoryUrlName": "Archaeology-Tours"
}
],
"thumbnailHiResURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-674x446/06/73/48/34.jpg",
"thumbnailURL": "https://hare-media-cdn.tripadvisor.com/media/attractions-splice-spp-154x109/06/73/48/34.jpg"
}
],
"dateStamp": "2020-02-06T19:47:58+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331001"
}
GET
-taxonomy-destinations
{{baseUrl}}/taxonomy/destinations
HEADERS
Accept-Language
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/taxonomy/destinations");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept-language: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/taxonomy/destinations" {:headers {:accept-language ""}})
require "http/client"
url = "{{baseUrl}}/taxonomy/destinations"
headers = HTTP::Headers{
"accept-language" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/taxonomy/destinations"),
Headers =
{
{ "accept-language", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/taxonomy/destinations");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept-language", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/taxonomy/destinations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept-language", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/taxonomy/destinations HTTP/1.1
Accept-Language:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/taxonomy/destinations")
.setHeader("accept-language", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/taxonomy/destinations"))
.header("accept-language", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/taxonomy/destinations")
.get()
.addHeader("accept-language", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/taxonomy/destinations")
.header("accept-language", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/taxonomy/destinations');
xhr.setRequestHeader('accept-language', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/taxonomy/destinations',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/taxonomy/destinations';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/taxonomy/destinations',
method: 'GET',
headers: {
'accept-language': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/taxonomy/destinations")
.get()
.addHeader("accept-language", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/taxonomy/destinations',
headers: {
'accept-language': ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/taxonomy/destinations',
headers: {'accept-language': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/taxonomy/destinations');
req.headers({
'accept-language': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/taxonomy/destinations',
headers: {'accept-language': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/taxonomy/destinations';
const options = {method: 'GET', headers: {'accept-language': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept-language": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/taxonomy/destinations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/taxonomy/destinations" in
let headers = Header.add (Header.init ()) "accept-language" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/taxonomy/destinations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept-language: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/taxonomy/destinations', [
'headers' => [
'accept-language' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/taxonomy/destinations');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'accept-language' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/taxonomy/destinations');
$request->setRequestMethod('GET');
$request->setHeaders([
'accept-language' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/taxonomy/destinations' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept-language", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/taxonomy/destinations' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'accept-language': "" }
conn.request("GET", "/baseUrl/taxonomy/destinations", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/taxonomy/destinations"
headers = {"accept-language": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/taxonomy/destinations"
response <- VERB("GET", url, add_headers('accept-language' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/taxonomy/destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept-language"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/taxonomy/destinations') do |req|
req.headers['accept-language'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/taxonomy/destinations";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept-language", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/taxonomy/destinations \
--header 'accept-language: '
http GET {{baseUrl}}/taxonomy/destinations \
accept-language:''
wget --quiet \
--method GET \
--header 'accept-language: ' \
--output-document \
- {{baseUrl}}/taxonomy/destinations
import Foundation
let headers = ["accept-language": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/taxonomy/destinations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": [
{
"defaultCurrencyCode": "USD",
"destinationId": 77,
"destinationName": "USA",
"destinationType": "COUNTRY",
"destinationUrlName": "USA",
"iataCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"latitude": 37.09024,
"longitude": -95.712891,
"lookupId": "8.77",
"parentId": 8,
"selectable": false,
"sortOrder": 1,
"timeZone": "America/New_York"
},
{
"defaultCurrencyCode": "USD",
"destinationId": 22212,
"destinationName": "Alabama",
"destinationType": "REGION",
"destinationUrlName": "Alabama",
"iataCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"latitude": 32.34,
"longitude": -86.26,
"lookupId": "8.77.22212",
"parentId": 77,
"selectable": true,
"sortOrder": 1,
"timeZone": ""
},
{
"defaultCurrencyCode": "USD",
"destinationId": 270,
"destinationName": "Alaska",
"destinationType": "REGION",
"destinationUrlName": "Alaska",
"iataCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"latitude": 63.588753,
"longitude": -154.4930619,
"lookupId": "8.77.270",
"parentId": 77,
"selectable": true,
"sortOrder": 2,
"timeZone": "America/Anchorage"
},
{
"defaultCurrencyCode": "USD",
"destinationId": 271,
"destinationName": "Arizona",
"destinationType": "REGION",
"destinationUrlName": "Arizona",
"iataCode": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"latitude": 34.0489281,
"longitude": -111.0937311,
"lookupId": "8.77.271",
"parentId": 77,
"selectable": true,
"sortOrder": 3,
"timeZone": "America/Phoenix"
}
],
"dateStamp": "2020-02-06T19:43:09+0000",
"errorCodes": [],
"errorMessage": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorMessageText": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorName": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorReference": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"errorType": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"extraInfo": {},
"extraObject": {
"$ref": "#/components/examples/product-example-1/value/data/pas"
},
"success": true,
"totalCount": 1,
"vmid": "331001"
}