ReviewsAPI v2.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The ReviewsAPI facilitates extensive monitoring of review data for 2m+ hotels worldwide, including textual content of reviews, numerical scoring associated with the reviews, and sentiment analysis indicating the sentiment expressed in the reviews. Every day, thousands of customers rely on our ReviewsAPI to monitor customer feedback, improve their brand’s online presence, and monitor competitor reviews. Users have the flexibility to choose between scheduling extraction requests at specific intervals or making real-time requests to fetch the latest reviews and related data. Our ReviewsAPI integration is fully scalable, accurate and provides a fast and easy solution that can help you stay ahead of the competition.
The ReviewsAPI follows a REST architecture, providing a structured approach to accessing its resources. It utilizes resource-oriented URLs, accepts request bodies primarily in JSON format, returns responses encoded in JSON, and adheres to standard HTTP response codes, authentication methods, and HTTP verbs.
The API's endpoints can be broadly categorized into the following modules:
User: This module handles authentication and access to the API, allowing users to gain the necessary permissions and credentials for interacting with the ReviewsAPI.
Entity Information: Within this module, users can search for available sources from which hotel review data can be collected. It provides information about the various sources and their corresponding data that can be extracted through the API.
References: This module enables users to retrieve data related to dependencies associated with the hotel reviews, such as reference data, metadata, or other supporting information that may enhance the understanding and context of the extracted reviews.
Schedules: Users can manage data delivery schedules through this module. It allows for the configuration and control of when and how often data extraction requests should be made, providing flexibility for scheduled or periodic data retrieval.
Shops: A Reviews Shop serves as a predefined template that encompasses hotel codes, source codes, and shop names. Users can utilize this module to request data collection specifically tailored to their defined shop, streamlining the process of retrieving hotel review data from specific sources.
In summary, the ReviewsAPI adopts a RESTful design, offering well-defined endpoints and adhering to standard practices for resource access and manipulation. Its modules cover user authentication, source exploration, dependency retrieval, schedule management, and shop-specific data extraction for hotel reviews.
.
Web: Aggregate Intelligence Inc.
Authentication
- HTTP Authentication, scheme: bearer .
Every request sent to the ReviewsAPI must be authenticated with an access token (JWT). You can obtain an access token when you log-in using the credentials provided to you. An access token is valid ONLY for 24 hours from the time it is generated.
The obtained Access Token must be passed during all subsequent requests made to the API as standard Bearer tokens in the request header.
Usage Workflow
User
User Login
Code samples
# You can also use wget
curl -X POST /auth/token \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /auth/token HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"username": "myuser",
"password": "supersecret"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/auth/token',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post '/auth/token',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('/auth/token', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/auth/token', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/auth/token");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/auth/token", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /auth/token
This call authenticates the validity of a handle/password combination. If the authentication is successful, a valid access token is issued.
Body parameter
{
"username": "myuser",
"password": "supersecret"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | userauth | true | none |
Example responses
200 Response
{
"accessToken": "b07f85be-45da-ytgfr",
"tokenType": "Bearer",
"expiresIn": "24h",
"userName": "user@example.org",
"fullName": "ABC",
".issued": "Tue, 06 Jun 2023 06:00:00 GM",
".expires": "Wed, 07 Jun 2023 06:00:00 GM"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | userresp |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Entity Informations
Find Hotels
Code samples
# You can also use wget
curl -X POST /entity/hotels \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /entity/hotels HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"term": "department Store",
"city": "lNiaocheng",
"state": "shandong",
"country": "China",
"zip": "252500",
"geoLocationFilter": {
"latitude": "36.45",
"longitude": "115.99",
"radius": "50km"
},
"limit": 0,
"showHotelsWithNoReviews": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/entity/hotels',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/entity/hotels',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/entity/hotels', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/entity/hotels', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/entity/hotels");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/entity/hotels", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /entity/hotels
The POST /entity/hotels method enables you to search for hotels based on geolocation or text-based searches. By making a POST request to this endpoint, you can provide search parameters such as location coordinates or keywords to retrieve a list of hotels that match your criteria.
This API method also allows you to retrieve detailed information about each hotel, including the count of reviews and other relevant data. This information can be useful for displaying hotel options to users, performing analysis on hotel data, or any other operations related to hotels within your application or system.
Body parameter
{
"term": "department Store",
"city": "lNiaocheng",
"state": "shandong",
"country": "China",
"zip": "252500",
"geoLocationFilter": {
"latitude": "36.45",
"longitude": "115.99",
"radius": "50km"
},
"limit": 0,
"showHotelsWithNoReviews": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | hotelsReq | true | none |
Example responses
200 Response
[
{
"hotelcode": "688685",
"hotelname": "7Days Inn Liaocheng Department Sotre",
"address": "East 100m to Liaocheng Department Sotre",
"city": "Liaocheng",
"state": "Shandong",
"country": "China",
"location": [
{
"latitude": 36.45,
"longitude": 115.99
}
],
"zip": "252500",
"matchScore": 12.64333,
"reviewsCount": 0
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | hotelsResp |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Hotel Reviews Summary
Code samples
# You can also use wget
curl -X POST /entity/reviews/summary \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /entity/reviews/summary HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"hotelCodes": [
954167,
123
],
"sourceCodes": [
1,
2
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/entity/reviews/summary',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/entity/reviews/summary',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/entity/reviews/summary', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/entity/reviews/summary', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/entity/reviews/summary");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/entity/reviews/summary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /entity/reviews/summary
This API method retrieves review summaries for hotels based on provided hotel codes. It provides valuable insights into review ratings and feedback. The response includes average rating, total reviews, and positive/negative breakdown per hotel. Make a POST request to the specified endpoint with hotel codes in the request body. The response, in JSON format, provides review summary information. Useful for hotel review analysis, reputation monitoring, and decision-making based on customer feedback.
Body parameter
{
"hotelCodes": [
954167,
123
],
"sourceCodes": [
1,
2
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reviewsSummaryReq | true | none |
Example responses
200 Response
[
{
"hotelCode": 123,
"hotelName": "113 on Robberg",
"address": "113 Robberg Road",
"city": "Plettenberg Bay",
"state": "Western Cape",
"country": "South Africa",
"location": {
"latitude": "-34.0753",
"longitude": "23.3619"
},
"zip": "6600",
"reviewSummary": [
{
"hotelCode": 123,
"source": 2,
"scoreHotel": 9.3,
"scoreLocation": 9.4,
"scoreStaff": 9.9,
"scoreCleanliness": 9.7,
"scoreValueForMoney": 9.7,
"scoreComfort": 9.6,
"scoreFacilities": 9.4,
"scoreFreeWiFi": 9.4,
"hotelReviewNbr": 79,
"scoreService": 0,
"collectionDate": "2023-04-28T00:00:00.000Z",
"outOfReview": 10,
"guestsChoice": 0,
"hotelCondition": 0,
"reviewUrl": "https://www.booking.com/hotel/it/california-roma.en-gb.html",
"service": 5,
"sourceHotelCode": 1412345,
"starRating": 3,
"rank": 0,
"city": "Plettenberg Bay",
"websiteName": "Booking.com"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | reviewsSummaryResp |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Hotel Reviews Details
Code samples
# You can also use wget
curl -X POST /entity/reviews/details \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /entity/reviews/details HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"hotelCode": "483546",
"sourceCodes": [
324,
1
],
"limit": 5000,
"offset": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/entity/reviews/details',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/entity/reviews/details',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/entity/reviews/details', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/entity/reviews/details', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/entity/reviews/details");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/entity/reviews/details", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /entity/reviews/details
The POST /entity/reviews/details API retrieves detailed review information for a hotel. Filter options include hotel code, source code, and review date range. Send a POST request to the endpoint with the desired filters in the request body. This method provides in-depth insights into reviews, including content, rating, and reviewer information. Include the necessary headers, such as Content-Type, for the request. Integrate this API to analyze customer feedback and make informed decisions in your applications.
Body parameter
{
"hotelCode": "483546",
"sourceCodes": [
324,
1
],
"limit": 5000,
"offset": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reviewsDetailsReq | true | none |
Example responses
200 Response
{
"hotelCode": 483546,
"hotelName": "Forest Canopy Thekkady",
"address": "K K Road, Near Chelimada Junction, Thekkady, Kerala",
"city": "Thekkady",
"state": "Kerala",
"country": "India",
"location": {
"latitude": 9.61152,
"longitude": 77.1509
},
"zip": "685509",
"reviewsDetails": [
{
"uniqueId": 212019,
"source": 324,
"reviewContent": "Visited there along with my wife and found that very good environment of there and very good view from the hotel and food quality is really awesome and last but not the least room service is excellent and most important thing is behavior of the hotel staff with way of talking is pretty awesome..... Which is really describe the Kerala is really Kerala.",
"reviewContentPos": null,
"reviewContentNeg": null,
"reviewContentNeu": null,
"cleanReviewContent": null,
"cleanReviewContentPos": null,
"cleanReviewContentNeg": null,
"cleanReviewContentNeu": null,
"sentimentScore": 1.06,
"properties": {
"bathroom": {
"polarity": 0.65
},
"facilities & surrounding": {
"polarity": 0.38
},
"fnb & food": {
"polarity": 0.28
},
"location": {
"polarity": 0.64
},
"room": {
"polarity": -0.2
},
"staff": {
"polarity": 0.21
}
},
"author": "ManojP1621",
"authorCategory": "Travelled as a couple",
"authorCountry": null,
"reviewHeader": null,
"reviewedDate": "2017-12-14T00:00:00.000Z",
"reviewerType": null,
"reviewScore": 5,
"authorLocation": "",
"reviewsCount": 2,
"replyFromHotel": "Dear Guest,\\n\\nNamaste from Forest Canopy…!!!\\n\\nThank you for your lovely feedback regarding your visit to Forest Canopy .We are glad that you enjoyed the facilities of the hotel and the warm hospitality of our staff. Whilst it has always been our focus to provide our valued guests with personalized services; it is feedback such as yours that inspires the team to strive to perform better.\\n\\nWe thank you for staying with us and looking forward to welcoming you again soon.\\n\\nWarm Regards\\n\\nSujith Babu\\nGeneral Manager\\n",
"dtCollected": "2021-01-16T00:00:00.000Z",
"language": "end",
"reviewId": 547172671,
"serviceRating": null,
"valueRating": null,
"sleepQualityRating": null,
"cleanlinessRating": null,
"locationRating": null,
"roomsRating": null,
"inputUrl": "https://www.tripadvisor.in/ShowUserReviews-g297636-d8569748-r547172671-Forest_Canopy-Thekkady_Idukki_District_Kerala.html",
"respondUrl": "https://www.tripadvisor.com/OwnerResponse-g297636-d8569748?review=547172671",
"languageName": "English",
"websiteName": "tripadvisor",
"polarity": "positive",
"outOfReview": 5,
"sourceHotelCode": 8569748
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | reviewsDetailsResp |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
References
Get Sources
Code samples
# You can also use wget
curl -X GET /reference/sources \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /reference/sources HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/reference/sources',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/reference/sources',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/reference/sources', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/reference/sources', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/reference/sources");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/reference/sources", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /reference/sources
The GET /reference/sources API retrieves a list of sources with header information. It allows users to retrieve information about different sources or platforms from which hotel-related data or reviews are collected. This method provides a list of available sources along with their corresponding source codes, source names, and display names.
Example responses
200 Response
[
{
"sourceCode": 1,
"sourceName": "expedia",
"displayName": "Expedia",
"isActiveStatus": true
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» sourceCode | integer | false | none | It represents the unique identifier of the source code. |
» sourceName | string | false | none | It represents the name of the source. |
» displayName | string | false | none | It represents the display name of the source. |
» isActiveStatus | boolean | false | none | It represents whether the source is active. |
Schedules
Create Schedule
Code samples
# You can also use wget
curl -X POST /schedule \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /schedule HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"scheduleName": "X-Mas",
"shopId": 472,
"minute": 50,
"hour": 2,
"dayOfMonth": 30,
"month": 12,
"dayOfWeek": 6,
"startDate": "2023-04-18",
"endDate": "2023-04-18"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/schedule',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/schedule', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/schedule', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/schedule");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/schedule", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /schedule
A schedule is a method to program in time the extractions of shops. For example a shop can be scheduled to extract at 8am every day, or another shop can be extracted on Tuesdays only. The POST /schedule method allows users to create a schedule for extracting review data for hotels. This method enables users to define a specific schedule with a name, shop ID, and various time-based parameters such as minute, hour, day of the month, month, and day of the week. The schedule can be set to start on a specified start date and end on a specified end date.
Body parameter
{
"scheduleName": "X-Mas",
"shopId": 472,
"minute": 50,
"hour": 2,
"dayOfMonth": 30,
"month": 12,
"dayOfWeek": 6,
"startDate": "2023-04-18",
"endDate": "2023-04-18"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | createScheduleReq | true | none |
Example responses
200 Response
{
"message": "The schedule details have been successfully inserted, and the schedule ID assigned is 72"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | Inline |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
message | The schedule details have been successfully inserted, and the schedule ID assigned is 72 |
Get Schedules
Code samples
# You can also use wget
curl -X GET /schedule/list \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /schedule/list HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/schedule/list',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/schedule/list', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/schedule/list', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/schedule/list");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/schedule/list", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /schedule/list
The GET /schedule/list method allows users to retrieve a list of all schedules created by the user through the API. This method provides information about each schedule, including its unique schedule ID, schedule name, associated shop ID, time-based parameters (such as month, day of the week, day, hour, and minute), start date, end date, creation date, modification date, and status.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | query | integer | false | Enter shopId |
Example responses
200 Response
{
"result": [
{
"scheduleId": 50,
"schedulename": "Nis",
"shopId": 445,
"month": 5,
"dayOfWeek": "*",
"day": 26,
"hour": 19,
"minute": 5,
"startDate": "2023-05-26",
"endDate": "2023-05-26",
"createdDate": "2023-05-26T12:43:51.757Z",
"modifiedDate": null,
"status": 1
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | getScheduleListResp |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Get Schedule
Code samples
# You can also use wget
curl -X GET /schedule/{scheduleId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /schedule/{scheduleId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/{scheduleId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/schedule/{scheduleId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/schedule/{scheduleId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/schedule/{scheduleId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/schedule/{scheduleId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/schedule/{scheduleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /schedule/{scheduleId}
The GET /schedule/{scheduleId} method allows users to retrieve detailed information about a specific schedule created by the user. This method requires the schedule ID as a parameter to identify the specific schedule. It provides comprehensive details about the schedule, including its unique schedule ID, schedule name, associated shop ID, time-based parameters (such as month, day of the week, day, hour, minute, and seconds), start date, end date, creation date, modification date, and status.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scheduleId | path | integer | true | Enter scheduleId |
Example responses
200 Response
{
"result": [
{
"scheduleId": 50,
"scheduleName": "Nis",
"shopId": 445,
"month": 5,
"dayOfWeek": "*",
"day": 26,
"hour": 19,
"minute": 5,
"seconds": "*",
"startDate": "2023-05-26",
"endDate": "2023-05-26",
"createdDate": "2023-05-26T12:43:51.757Z",
"modifiedDate": "2023-05-11T07:09:34.100Z",
"status": 1
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | scheduleGetResp |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Update Schedule
Code samples
# You can also use wget
curl -X PUT /schedule/{scheduleId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
PUT /schedule/{scheduleId} HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"scheduleName": "Xy-Mas",
"shopId": 18,
"minute": "*",
"hour": "*",
"dayOfMonth": 30,
"month": 12,
"dayOfWeek": "*",
"startDate": "2023-04-18",
"endDate": "2023-04-18"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/{scheduleId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/schedule/{scheduleId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/schedule/{scheduleId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/schedule/{scheduleId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/schedule/{scheduleId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/schedule/{scheduleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /schedule/{scheduleId}
The PUT /schedule/{scheduleId} API updates specific details of a schedule. Provide the schedule ID in the URL to modify parameters like name, shop ID, minute, hour, and other relevant details.
Body parameter
{
"scheduleName": "Xy-Mas",
"shopId": 18,
"minute": "*",
"hour": "*",
"dayOfMonth": 30,
"month": 12,
"dayOfWeek": "*",
"startDate": "2023-04-18",
"endDate": "2023-04-18"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scheduleId | path | integer | true | Enter your scheduleId |
body | body | putScheduleReq | true | none |
Example responses
200 Response
{
"message": "The schedule details have been successfully updated"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | Inline |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
message | The schedule details have been successfully updated |
Delete Schedule
Code samples
# You can also use wget
curl -X DELETE /schedule/{scheduleId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
DELETE /schedule/{scheduleId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/{scheduleId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/schedule/{scheduleId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/schedule/{scheduleId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/schedule/{scheduleId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/schedule/{scheduleId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/schedule/{scheduleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /schedule/{scheduleId}
The DELETE /schedule/{scheduleId} API deletes specific details of a schedule. Provide the schedule ID in the URL to remove the entire schedule and associated information from your application or system. This method is useful for permanently removing schedules, including name, shop ID, minute, hour, and other parameters.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scheduleId | path | integer | true | Enter your scheduleId |
Example responses
200 Response
{
"message": "The schedule data have been successfully deleted"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | Inline |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
message | The schedule data have been successfully deleted |
Shops
Create Shop
Code samples
# You can also use wget
curl -X POST /shop \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /shop HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"hotelCodes": [
1,
12345
],
"sourceCodes": [
2,
28345
],
"shopName": "testshop"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shop',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/shop',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/shop', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/shop', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/shop");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/shop", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /shop
The POST /shop method enables users to create a data shop, which defines instructions for extracting and delivering review content, scoring, and sentiment analysis for a series of hotels from specific sources, following various time schedules. This method requires the user to provide parameters such as hotel codes, source codes, and a shop name to define the data shop.
Body parameter
{
"hotelCodes": [
1,
12345
],
"sourceCodes": [
2,
28345
],
"shopName": "testshop"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | createShopReq | true | none |
Example responses
200 Response
{
"message": "The shop details have been successfully inserted, and the shop ID assigned is 472"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | Inline |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
message | The shop details have been successfully inserted, and the shop ID assigned is 472 |
Get Shops
Code samples
# You can also use wget
curl -X GET /shop/List \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /shop/List HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shop/List',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/shop/List',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/shop/List', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/shop/List', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/shop/List");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/shop/List", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /shop/List
The GET /shop/List method allows users to retrieve a list of all the data shops created by the user. This method does not require any parameters.
Example responses
200 Response
{
"result": [
{
"shopId": 456,
"hotelCodes": [
51490,
66788
],
"sourceCodes": [
1,
283
],
"shopName": "testshop",
"userId": "clg1zrm4x0000lopahau23416",
"username": "user123",
"createdDate": "2023-06-09T07:00:18.417Z",
"modifiedDate": null,
"status": 1,
"mailStatus": 1
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | reviewsShopGetListResp |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Shops Status List
Code samples
# You can also use wget
curl -X POST /shop/statusList \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /shop/statusList HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"shopId": 2,
"scheduleId": 3,
"sinceDate": "2023-12-31"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shop/statusList',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/shop/statusList',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/shop/statusList', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/shop/statusList', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/shop/statusList");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/shop/statusList", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /shop/statusList
The POST /shop/statusList API retrieves the status of multiple shops based on user requests. Send a POST request to this endpoint to fetch shop statuses using parameters like shop ID, schedule ID, or date.
Body parameter
{
"shopId": 2,
"scheduleId": 3,
"sinceDate": "2023-12-31"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | shopStatusListReq | true | none |
Example responses
200 Response
{
"message": "No response in status list currently, please wait for further updates."
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
message | No response in status list currently, please wait for further updates. |
Get Shop
Code samples
# You can also use wget
curl -X GET /shop/{shopId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /shop/{shopId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shop/{shopId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/shop/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/shop/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/shop/{shopId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/shop/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/shop/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /shop/{shopId}
The GET /shop/{shopId} API retrieves specific details of a shop. Send a GET request to this endpoint, providing the shop ID in the URL to fetch the corresponding details.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | number | true | Enter shopId |
Example responses
200 Response
{
"result": [
{
"shopId": 472,
"hotelCodes": [
1,
12345
],
"sourceCodes": [
2,
28345
],
"shopName": "testshop",
"userId": "cl3ck53pj0000gyw5dhlz15k9",
"username": "user@example.org",
"createdDate": "2023-06-12T10:46:27.190Z",
"modifiedDate": null,
"status": 1,
"mailsatus": null
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ok | reviewGetShopResp |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Update Shop
Code samples
# You can also use wget
curl -X PUT /shop/{shopId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
PUT /shop/{shopId} HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"hotelCodes": [
1,
123
],
"sourceCodes": [
1,
283
],
"shopName": "Abc"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shop/{shopId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/shop/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/shop/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/shop/{shopId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/shop/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/shop/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /shop/{shopId}
The PUT /shop/{shopId} method allows users to modify the attributes of an existing data shop by providing the shop ID as a parameter. This method enables users to update the hotel codes, source codes, and shop name of the specified data shop.
Body parameter
{
"hotelCodes": [
1,
123
],
"sourceCodes": [
1,
283
],
"shopName": "Abc"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | integer | true | Enter shopId |
body | body | reviewsShopPutReq | true | none |
Example responses
200 Response
{
"message": "The shop details have been successfully updated"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | Inline |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
message | The shop details have been successfully updated |
Delete Shop
Code samples
# You can also use wget
curl -X DELETE /shop/{shopId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
DELETE /shop/{shopId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shop/{shopId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/shop/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/shop/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/shop/{shopId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/shop/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/shop/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /shop/{shopId}
The DELETE /shop/{shopId} API deletes a specific shop from your system using its shop ID. Provide the shop ID in the URL to permanently remove the shop and associated details from your application or system.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | integer | true | Enter shopId |
Example responses
200 Response
{
"message": "The shop details have been successfully deleted"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | Inline |
400 | Bad Request | Request data failed validation(s) | None |
401 | Unauthorized | Authentication Failed! | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
message | The shop details have been successfully deleted |
Schemas
userauth
{
"username": "myuser",
"password": "supersecret"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
username | string | true | none | It represents the username of the user. |
password | string | true | none | It represents the password associated with the user. |
userresp
{
"accessToken": "b07f85be-45da-ytgfr",
"tokenType": "Bearer",
"expiresIn": "24h",
"userName": "user@example.org",
"fullName": "ABC",
".issued": "Tue, 06 Jun 2023 06:00:00 GM",
".expires": "Wed, 07 Jun 2023 06:00:00 GM"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accessToken | string | false | none | An access token is a credential that is used to authenticate and authorize access to a specific resource. |
tokenType | string | false | none | It represents the type of token being used. |
expiresIn | number | false | none | It represents expiration time of the access token. |
userName | string | false | none | It represents the username associated with the user. |
fullName | string | false | none | It represents the full name of the user. |
.issued | string | false | none | It represents the timestamp when the access token was issued. |
.expires | string | false | none | It represents the timestamp when the access token will expire. |
hotelsReq
{
"term": "department Store",
"city": "lNiaocheng",
"state": "shandong",
"country": "China",
"zip": "252500",
"geoLocationFilter": {
"latitude": "36.45",
"longitude": "115.99",
"radius": "50km"
},
"limit": 0,
"showHotelsWithNoReviews": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
term | string | false | none | Search by a specific term. |
city | string | false | none | Match the hotels in a specific city. |
state | string | false | none | Match the hotels in a specific state. |
country | string | false | none | Match the hotels in a specific country. |
zip | string | false | none | Match the hotels in a specific zip code. |
geoLocationFilter | object | false | none | Filter matched hotels by geolocation. |
» latitude | string | false | none | Latitude of the given point. |
» longitude | string | false | none | Longitude of the given point. |
» radius | string | false | none | Scaler distance/radius in terms of meters. |
limit | number | false | none | Restrict the number of matching hotels found to this limit. |
showHotelsWithNoReviews | boolean | false | none | Specifies hotels that have no reviews. |
hotelsResp
[
{
"hotelcode": "688685",
"hotelname": "7Days Inn Liaocheng Department Sotre",
"address": "East 100m to Liaocheng Department Sotre",
"city": "Liaocheng",
"state": "Shandong",
"country": "China",
"location": [
{
"latitude": 36.45,
"longitude": 115.99
}
],
"zip": "252500",
"matchScore": 12.64333,
"reviewsCount": 0
}
]
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hotelcode | string | false | none | A unique identifier for the hotel. |
hotelname | string | false | none | The name of the hotel. |
address | string | false | none | The street address of the hotel. |
city | string | false | none | The city where the hotel is located. |
state | string | false | none | The state where the hotel is located. |
country | string | false | none | The country where the hotel is located. |
location | [object] | false | none | The geographic coordinates of the hotel's location. |
» latitude | string | false | none | Latitude of the given point. |
» longitude | string | false | none | Longitude of the given point. |
zip | string | false | none | The postal or zip code of the hotel's location. |
matchScore | number | false | none | A value indicating how well the hotel matches the given search parameters. |
reviewsCount | number | false | none | Total no. of reviews available in our DB for this hotel. |
reviewsSummaryReq
{
"hotelCodes": [
954167,
123
],
"sourceCodes": [
1,
2
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hotelCodes | [number] | true | none | A list of unique hotel codes that are used to fetch reviews for specific hotels. |
sourceCodes | [number] | true | none | The list is used to filter reviews based on specific source codes. |
reviewsSummaryResp
[
{
"hotelCode": 123,
"hotelName": "113 on Robberg",
"address": "113 Robberg Road",
"city": "Plettenberg Bay",
"state": "Western Cape",
"country": "South Africa",
"location": {
"latitude": "-34.0753",
"longitude": "23.3619"
},
"zip": "6600",
"reviewSummary": [
{
"hotelCode": 123,
"source": 2,
"scoreHotel": 9.3,
"scoreLocation": 9.4,
"scoreStaff": 9.9,
"scoreCleanliness": 9.7,
"scoreValueForMoney": 9.7,
"scoreComfort": 9.6,
"scoreFacilities": 9.4,
"scoreFreeWiFi": 9.4,
"hotelReviewNbr": 79,
"scoreService": 0,
"collectionDate": "2023-04-28T00:00:00.000Z",
"outOfReview": 10,
"guestsChoice": 0,
"hotelCondition": 0,
"reviewUrl": "https://www.booking.com/hotel/it/california-roma.en-gb.html",
"service": 5,
"sourceHotelCode": 1412345,
"starRating": 3,
"rank": 0,
"city": "Plettenberg Bay",
"websiteName": "Booking.com"
}
]
}
]
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hotelCode | string | false | none | A unique identifier for the hotel. |
hotelName | string | false | none | The name of the hotel. |
address | string | false | none | The street address of the hotel. |
city | string | false | none | The city where the hotel is located. |
state | string | false | none | The state where the hotel is located. |
country | string | false | none | The country where the hotel is located. |
location | object | false | none | The geographic coordinates of the hotel's location. |
» latitude | string | false | none | Latitude of the given point. |
» longitude | string | false | none | Longitude of the given point. |
zip | string | false | none | The postal or zip code of the hotel's location. |
reviewSummary | [object] | false | none | It provides a summary of reviews. |
» hotelCode | string | false | none | A unique identifier for the hotel associated with the review. |
» source | number | false | none | It represents the source of the review. |
» scoreHotel | number | false | none | It represents the overall score or rating given to the hotel by the reviewer. |
» scoreLocation | number | false | none | It represents the score or rating given to the hotel's location by the reviewer. |
» scoreStaff | number | false | none | It represents the score or rating given to the hotel staff by the reviewer. |
» scoreCleanliness | number | false | none | It represents the score or rating given to the cleanliness of the hotel by the reviewer. |
» scoreValueForMoney | number | false | none | It represents score or rating given to the value for money provided by the hotel according to the reviewer. |
» scoreComfort | number | false | none | It represents the score or rating given to the comfort level of the hotel by the reviewer. |
» scoreFacilities | number | false | none | It represents the score or rating given to the facilities available at the hotel by the reviewer. |
» scoreFreeWiFi | number | false | none | It represents the score or rating given to the quality of free WiFi provided by the hotel according to the reviewer. |
» hotelReviewNbr | number | false | none | It represents the total number of reviews available for the hotel. |
» scoreService | number | false | none | It represents score or rating given to the overall service provided by the hotel according to the reviewer. |
» collectionDate | string(date-time) | false | none | It represents the date and time when the review was collected or recorded. |
» outOfReview | number | false | none | It represents the maximum score or rating that can be given in the review (e.g., a review scale of 1 to 5). |
» guestsChoice | number | false | none | It represents the reviewer's choice or recommendation for the hotel based on their experience. |
» hotelCondition | number | false | none | It represents the score or rating given to the overall condition of the hotel by the reviewer. |
» reviewUrl | string | false | none | It represents the URL or link to the full review. |
» service | number | false | none | It represents the score or rating given to the specific service provided by the hotel according to the reviewer. |
» sourceHotelCode | string | false | none | It represents the source-specific code or identifier for the hotel associated with the review. |
» starRating | number | false | none | It represents the star rating of the hotel. |
» rank | string | false | none | It represents rank or position of the hotel among other hotels. |
» city | string | false | none | It represents the city where the hotel is located. |
» websiteName | string | false | none | It represents name of the website from which the review originated. |
reviewsDetailsReq
{
"hotelCode": "483546",
"sourceCodes": [
324,
1
],
"limit": 5000,
"offset": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hotelCode | string | true | none | The unique code of the hotel for which you want to fetch reviews. |
sourceCodes | [number] | true | none | A list of numbers that is utilized to filter reviews based on specific source codes. |
limit | number | false | none | Limit the no. of reviews to be shown. Note that, the reviews are always sorted by collection date (latest first). |
offset | number | false | none | The number of records to be skipped or offset in the result. |
reviewsDetailsResp
{
"hotelCode": 483546,
"hotelName": "Forest Canopy Thekkady",
"address": "K K Road, Near Chelimada Junction, Thekkady, Kerala",
"city": "Thekkady",
"state": "Kerala",
"country": "India",
"location": {
"latitude": 9.61152,
"longitude": 77.1509
},
"zip": "685509",
"reviewsDetails": [
{
"uniqueId": 212019,
"source": 324,
"reviewContent": "Visited there along with my wife and found that very good environment of there and very good view from the hotel and food quality is really awesome and last but not the least room service is excellent and most important thing is behavior of the hotel staff with way of talking is pretty awesome..... Which is really describe the Kerala is really Kerala.",
"reviewContentPos": null,
"reviewContentNeg": null,
"reviewContentNeu": null,
"cleanReviewContent": null,
"cleanReviewContentPos": null,
"cleanReviewContentNeg": null,
"cleanReviewContentNeu": null,
"sentimentScore": 1.06,
"properties": {
"bathroom": {
"polarity": 0.65
},
"facilities & surrounding": {
"polarity": 0.38
},
"fnb & food": {
"polarity": 0.28
},
"location": {
"polarity": 0.64
},
"room": {
"polarity": -0.2
},
"staff": {
"polarity": 0.21
}
},
"author": "ManojP1621",
"authorCategory": "Travelled as a couple",
"authorCountry": null,
"reviewHeader": null,
"reviewedDate": "2017-12-14T00:00:00.000Z",
"reviewerType": null,
"reviewScore": 5,
"authorLocation": "",
"reviewsCount": 2,
"replyFromHotel": "Dear Guest,\\n\\nNamaste from Forest Canopy…!!!\\n\\nThank you for your lovely feedback regarding your visit to Forest Canopy .We are glad that you enjoyed the facilities of the hotel and the warm hospitality of our staff. Whilst it has always been our focus to provide our valued guests with personalized services; it is feedback such as yours that inspires the team to strive to perform better.\\n\\nWe thank you for staying with us and looking forward to welcoming you again soon.\\n\\nWarm Regards\\n\\nSujith Babu\\nGeneral Manager\\n",
"dtCollected": "2021-01-16T00:00:00.000Z",
"language": "end",
"reviewId": 547172671,
"serviceRating": null,
"valueRating": null,
"sleepQualityRating": null,
"cleanlinessRating": null,
"locationRating": null,
"roomsRating": null,
"inputUrl": "https://www.tripadvisor.in/ShowUserReviews-g297636-d8569748-r547172671-Forest_Canopy-Thekkady_Idukki_District_Kerala.html",
"respondUrl": "https://www.tripadvisor.com/OwnerResponse-g297636-d8569748?review=547172671",
"languageName": "English",
"websiteName": "tripadvisor",
"polarity": "positive",
"outOfReview": 5,
"sourceHotelCode": 8569748
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hotelCode | number | false | none | It represents unique identifier for the hotel. |
hotelName | string | false | none | It represents the name of the hotel. |
address | string | false | none | It represents the address of the hotel. |
city | string | false | none | It represents the city where the hotel is located. |
state | string | false | none | It represents the state where the hotel is located. |
country | string | false | none | It represents the country where the hotel is located. |
location | object | false | none | It represents the geographic coordinates of the hotel's location. |
» latitude | string | false | none | none |
» longitude | string | false | none | none |
zip | string | false | none | It represents the ZIP code of the hotel's location. |
reviewsDetails | [object] | false | none | It represents the detailed information about individual reviews for the hotel. |
» uniqueId | number | false | none | A unique identifier for the review. |
» source | number | false | none | none |
» reviewContent | string | false | none | The content of the review. |
» reviewContentPos | string | false | none | Positive aspects mentioned in the review. |
» reviewContentNeg | string | false | none | Negative aspects mentioned in the review. |
» reviewContentNeu | string | false | none | Neutral aspects mentioned in the review. |
» cleanReviewContent | string | false | none | The cleaned version of the review content. |
» cleanReviewContentPos | string | false | none | Cleaned positive aspects mentioned in the review. |
» cleanReviewContentNeg | string | false | none | Cleaned negative aspects mentioned in the review. |
» cleanReviewContentNeu | string | false | none | Cleaned neutral aspects mentioned in the review. |
» sentimentScore | number | false | none | The sentiment score of the review. |
» properties | object | false | none | none |
»» bathroom | object | false | none | none |
»»» polarity | number | false | none | none |
»» facilities & surrounding | object | false | none | none |
»»» polarity | number | false | none | none |
»» fnb & food | object | false | none | none |
»»» polarity | number | false | none | none |
»» location | object | false | none | none |
»»» polarity | number | false | none | none |
»» room | object | false | none | none |
»»» polarity | number | false | none | none |
»» staff | object | false | none | none |
»»» polarity | number | false | none | none |
» author | string | false | none | none |
» authorCategory | string | false | none | none |
» authorCountry | string | false | none | none |
» reviewHeader | string | false | none | none |
» reviewedDate | string | false | none | none |
» reviewerType | string | false | none | none |
» reviewScore | number | false | none | none |
» authorLocation | string | false | none | none |
» reviewsCount | number | false | none | none |
» replyFromHotel | string | false | none | none |
» dtCollected | string | false | none | none |
» language | string | false | none | none |
» reviewId | string | false | none | none |
» serviceRating | number | false | none | none |
» valueRating | number | false | none | none |
» sleepQualityRating | number | false | none | none |
» cleanlinessRating | number | false | none | none |
» locationRating | number | false | none | none |
» roomsRating | number | false | none | none |
» inputUrl | string | false | none | none |
» respondUrl | string | false | none | none |
» languageName | string | false | none | none |
» websiteName | string | false | none | none |
» polarity | string | false | none | none |
» outOfReview | number | false | none | none |
» sourceHotelCode | string | false | none | none |
createScheduleReq
{
"scheduleName": "X-Mas",
"shopId": 472,
"minute": 50,
"hour": 2,
"dayOfMonth": 30,
"month": 12,
"dayOfWeek": 6,
"startDate": "2023-04-18",
"endDate": "2023-04-18"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
scheduleName | string | true | none | The name of the schedule. |
shopId | number | true | none | The unique identifier of the shop. |
minute | string | true | none | The minute when the scheduled event occur. |
hour | string | true | none | The hour when the scheduled event occur. |
dayOfMonth | string | true | none | The day of the month when the scheduled event occur. |
month | string | true | none | The month when the scheduled event occur. |
dayOfWeek | string | true | none | The day of the week when the scheduled event occur. |
startDate | string | true | none | The start date of the schedule. |
endDate | string | true | none | The end date of the schedule. |
scheduleGetResp
{
"result": [
{
"scheduleId": 50,
"scheduleName": "Nis",
"shopId": 445,
"month": 5,
"dayOfWeek": "*",
"day": 26,
"hour": 19,
"minute": 5,
"seconds": "*",
"startDate": "2023-05-26",
"endDate": "2023-05-26",
"createdDate": "2023-05-26T12:43:51.757Z",
"modifiedDate": "2023-05-11T07:09:34.100Z",
"status": 1
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
result | [any] | false | none | none |
» scheduleId | number | false | none | It represents a unique identifier for a schedule. |
» scheduleName | string | false | none | It represents the name of the schedule. |
» shopId | number | false | none | It represents a unique identifier for a shop. |
» month | string | false | none | It represents the month of the schedule. |
» dayOfWeek | string | false | none | It represents the day of the week for the schedule (range 0 to 6),where 0 represents Sunday and 6 represents Saturday. |
» day | string | false | none | It represents the day of the month for the schedule. |
» hour | string | false | none | It represents the hour of the schedule. |
» minute | string | false | none | It represents the minute of the schedule. |
» seconds | string | false | none | It represents the seconds of the schedule. |
» startDate | string | false | none | It represents the start date of the schedule. |
» endDate | string | false | none | It represents the end date of the schedule. |
» createdDate | string | false | none | It represents the date and time when the schedule was created. |
» modifiedDate | string | false | none | It represents the date and time when the schedule was last modified. |
» status | number | false | none | It represents the status of the schedule. 1 - In progress(default) 2 - Completed 3 - Error |
getScheduleListResp
{
"result": [
{
"scheduleId": 50,
"schedulename": "Nis",
"shopId": 445,
"month": 5,
"dayOfWeek": "*",
"day": 26,
"hour": 19,
"minute": 5,
"startDate": "2023-05-26",
"endDate": "2023-05-26",
"createdDate": "2023-05-26T12:43:51.757Z",
"modifiedDate": null,
"status": 1
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
result | [any] | false | none | none |
» scheduleId | integer | false | none | none |
» schedulename | string | false | none | none |
» shopId | integer | false | none | none |
» month | string | false | none | none |
» dayOfWeek | string | false | none | none |
» day | string | false | none | none |
» hour | string | false | none | none |
» minute | string | false | none | none |
» startDate | string(date) | false | none | none |
» endDate | string(date) | false | none | none |
» createdDate | string(date-time) | false | none | none |
» modifiedDate | string(date-time) | false | none | none |
» status | integer | false | none | none |
putScheduleReq
{
"scheduleName": "Xy-Mas",
"shopId": 18,
"minute": "*",
"hour": "*",
"dayOfMonth": 30,
"month": 12,
"dayOfWeek": "*",
"startDate": "2023-04-18",
"endDate": "2023-04-18"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
scheduleName | string | false | none | The name of the schedule. |
shopId | number | false | none | The unique identifier of the shop. |
minute | string | false | none | The minute when the scheduled event occur.("*" indicates event can occur at any minute.) |
hour | string | false | none | The hour when the scheduled event occur.("*" indicates event can occur at any hour.) |
dayOfMonth | string | false | none | The day of the month when the scheduled event occur. |
month | string | false | none | The month when the scheduled event occur. |
dayOfWeek | string | false | none | The day of the week when the scheduled event occur.("*" indicates any day of the week.) |
startDate | string | false | none | The start date of the schedule. |
endDate | string | false | none | The end date of the schedule. |
createShopReq
{
"hotelCodes": [
1,
12345
],
"sourceCodes": [
2,
28345
],
"shopName": "testshop"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hotelCodes | [number] | true | none | It represents a list of unique identifiers for hotel codes. |
sourceCodes | [number] | true | none | It represents a list of unique identifiers for source codes. |
shopName | string | true | none | This represents the name of the shop and is used to identify and distinguish it from other shops. |
shopStatusListReq
{
"shopId": 2,
"scheduleId": 3,
"sinceDate": "2023-12-31"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
shopId | number | false | none | The ID of the shop. |
scheduleId | number | false | none | The ID of the schedule associated with the shop. |
sinceDate | string | false | none | The date from which data monitoring begin. |
reviewGetShopResp
{
"result": [
{
"shopId": 472,
"hotelCodes": [
1,
12345
],
"sourceCodes": [
2,
28345
],
"shopName": "testshop",
"userId": "cl3ck53pj0000gyw5dhlz15k9",
"username": "user@example.org",
"createdDate": "2023-06-12T10:46:27.190Z",
"modifiedDate": null,
"status": 1,
"mailsatus": null
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
result | [any] | false | none | none |
» shopId | string | false | none | It represents the unique identifier of the shop. |
» hotelCodes | [number] | false | none | It represents a list of unique identifiers for hotel codes. |
» sourceCodes | [number] | false | none | It represents a list of unique identifiers for source codes. |
» shopName | string | false | none | It represents the name of the shop. |
» userId | string | false | none | none |
» username | string | false | none | none |
» createdDate | string | false | none | none |
» modifiedDate | string | false | none | none |
» status | number | false | none | none |
» mailsatus | string | false | none | none |
reviewsShopGetListResp
{
"result": [
{
"shopId": 456,
"hotelCodes": [
51490,
66788
],
"sourceCodes": [
1,
283
],
"shopName": "testshop",
"userId": "clg1zrm4x0000lopahau23416",
"username": "user123",
"createdDate": "2023-06-09T07:00:18.417Z",
"modifiedDate": null,
"status": 1,
"mailStatus": 1
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
result | [any] | false | none | none |
» shopId | number | false | none | The ID of the shop. |
» hotelCodes | [number] | false | none | It represents a list of unique identifiers for hotel codes. |
» sourceCodes | [number] | false | none | It represents a list of unique identifiers for source codes. |
» shopName | string | false | none | The name of the shop. |
» userId | string | false | none | It reprents the id of the user associated with the shop reviews. |
» username | string | false | none | Unique identifier for a user |
» createdDate | string | false | none | It indicates the date and time when the user was created |
» modifiedDate | string | false | none | It represents the date and time when the user was last modified. |
» status | number | false | none | It represents the status of the user. |
» mailStatus | number | false | none | It represents the mail status of the user. |
reviewsShopPutReq
{
"hotelCodes": [
1,
123
],
"sourceCodes": [
1,
283
],
"shopName": "Abc"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
hotelCodes | [number] | false | none | It represents a list of unique identifiers for hotel codes. |
sourceCodes | [number] | false | none | It represents a list of unique identifiers for source codes. |
shopName | string | false | none | The name of the shop. |