Trip.com Hotel
curl --request POST \
--url https://api.aisa.one/apis/v1/trip/hotel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"adults": 4503599627370496,
"checkIn": "2023-12-25",
"checkOut": "2023-12-25",
"children": 4503599627370495,
"currency": "<string>",
"hotelId": "<string>",
"locale": "<string>",
"login": 0,
"rooms": 4503599627370496
}
'import requests
url = "https://api.aisa.one/apis/v1/trip/hotel"
payload = {
"adults": 4503599627370496,
"checkIn": "2023-12-25",
"checkOut": "2023-12-25",
"children": 4503599627370495,
"currency": "<string>",
"hotelId": "<string>",
"locale": "<string>",
"login": 0,
"rooms": 4503599627370496
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
adults: 4503599627370496,
checkIn: '2023-12-25',
checkOut: '2023-12-25',
children: 4503599627370495,
currency: '<string>',
hotelId: '<string>',
locale: '<string>',
login: 0,
rooms: 4503599627370496
})
};
fetch('https://api.aisa.one/apis/v1/trip/hotel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/trip/hotel",
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([
'adults' => 4503599627370496,
'checkIn' => '2023-12-25',
'checkOut' => '2023-12-25',
'children' => 4503599627370495,
'currency' => '<string>',
'hotelId' => '<string>',
'locale' => '<string>',
'login' => 0,
'rooms' => 4503599627370496
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/trip/hotel"
payload := strings.NewReader("{\n \"adults\": 4503599627370496,\n \"checkIn\": \"2023-12-25\",\n \"checkOut\": \"2023-12-25\",\n \"children\": 4503599627370495,\n \"currency\": \"<string>\",\n \"hotelId\": \"<string>\",\n \"locale\": \"<string>\",\n \"login\": 0,\n \"rooms\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/trip/hotel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"adults\": 4503599627370496,\n \"checkIn\": \"2023-12-25\",\n \"checkOut\": \"2023-12-25\",\n \"children\": 4503599627370495,\n \"currency\": \"<string>\",\n \"hotelId\": \"<string>\",\n \"locale\": \"<string>\",\n \"login\": 0,\n \"rooms\": 4503599627370496\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/trip/hotel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"adults\": 4503599627370496,\n \"checkIn\": \"2023-12-25\",\n \"checkOut\": \"2023-12-25\",\n \"children\": 4503599627370495,\n \"currency\": \"<string>\",\n \"hotelId\": \"<string>\",\n \"locale\": \"<string>\",\n \"login\": 0,\n \"rooms\": 4503599627370496\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Trip.com
Trip.com Hotel
Trip.com Hotel
<!-- aisa-pricing:start -->
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
POST
https://api.aisa.one
/
apis
/
v1
/
trip
/
hotel
Trip.com Hotel
curl --request POST \
--url https://api.aisa.one/apis/v1/trip/hotel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"adults": 4503599627370496,
"checkIn": "2023-12-25",
"checkOut": "2023-12-25",
"children": 4503599627370495,
"currency": "<string>",
"hotelId": "<string>",
"locale": "<string>",
"login": 0,
"rooms": 4503599627370496
}
'import requests
url = "https://api.aisa.one/apis/v1/trip/hotel"
payload = {
"adults": 4503599627370496,
"checkIn": "2023-12-25",
"checkOut": "2023-12-25",
"children": 4503599627370495,
"currency": "<string>",
"hotelId": "<string>",
"locale": "<string>",
"login": 0,
"rooms": 4503599627370496
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
adults: 4503599627370496,
checkIn: '2023-12-25',
checkOut: '2023-12-25',
children: 4503599627370495,
currency: '<string>',
hotelId: '<string>',
locale: '<string>',
login: 0,
rooms: 4503599627370496
})
};
fetch('https://api.aisa.one/apis/v1/trip/hotel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/trip/hotel",
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([
'adults' => 4503599627370496,
'checkIn' => '2023-12-25',
'checkOut' => '2023-12-25',
'children' => 4503599627370495,
'currency' => '<string>',
'hotelId' => '<string>',
'locale' => '<string>',
'login' => 0,
'rooms' => 4503599627370496
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/trip/hotel"
payload := strings.NewReader("{\n \"adults\": 4503599627370496,\n \"checkIn\": \"2023-12-25\",\n \"checkOut\": \"2023-12-25\",\n \"children\": 4503599627370495,\n \"currency\": \"<string>\",\n \"hotelId\": \"<string>\",\n \"locale\": \"<string>\",\n \"login\": 0,\n \"rooms\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/trip/hotel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"adults\": 4503599627370496,\n \"checkIn\": \"2023-12-25\",\n \"checkOut\": \"2023-12-25\",\n \"children\": 4503599627370495,\n \"currency\": \"<string>\",\n \"hotelId\": \"<string>\",\n \"locale\": \"<string>\",\n \"login\": 0,\n \"rooms\": 4503599627370496\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/trip/hotel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"adults\": 4503599627370496,\n \"checkIn\": \"2023-12-25\",\n \"checkOut\": \"2023-12-25\",\n \"children\": 4503599627370495,\n \"currency\": \"<string>\",\n \"hotelId\": \"<string>\",\n \"locale\": \"<string>\",\n \"login\": 0,\n \"rooms\": 4503599627370496\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Request contract
- Method and path: POST /apis/v1/trip/hotel
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/trip/hotel - Runtime facts: 36cd348dfbeebb651c2c303746468cec77d2c6553836f33de18c2a778433a67c
{
"operationId": "post_trip_apis_v1_trip_hotel",
"method": "POST",
"path": "/apis/v1/trip/hotel",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"adults": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"checkIn": {
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"type": "string"
},
"checkOut": {
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"type": "string"
},
"children": {
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"currency": {
"maxLength": 3,
"minLength": 3,
"type": "string"
},
"hotelId": {
"minLength": 1,
"type": "string"
},
"locale": {
"minLength": 2,
"type": "string"
},
"login": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"rooms": {
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"hotelId",
"checkIn",
"checkOut",
"rooms",
"adults",
"children",
"currency",
"locale",
"login"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "response_units",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"estimate_source": "unavailable",
"estimate_unavailable_reason": "reference_request_unavailable",
"evidence_source": "response_body"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Cost contract: response_units
- Published reference multiplier: 1.0
- Settlement evidence source: response_body
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required range:
1 <= x <= 9007199254740991Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Required range:
0 <= x <= 9007199254740991Required string length:
3Minimum string length:
1Minimum string length:
2Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
1 <= x <= 9007199254740991Response
Normalized successful response