Info |
---|
You will need an API key for authorizing your requests. You can request an API key from our Customer Care team. The default endpoint is https://api.customer-alliance.com, if not stated differently. |
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||
GET /reviews/v2/ca.json
API allows access to the data that was collected via Customer Alliance review questionnaires. This may include information such as:
ParametersAll parameters are optional.
ExamplesShell
Response
|
Expand | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||
GET /reviews/v2/all.jsonReview data collected via Customer Alliance questionnaires and reviews from external portals, such as Google, Facebook, or Tripadvisor. ParametersAll parameters are optional.
ExamplesShell
Response
|
...
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
GET /statistics/v1/categories.jsonShows the rating categories currently used for aggregation on your API key. ParametersAll parameters are optional.
ExamplesShell
Response
|
Expand | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||
GET /statistics/v2/general/recent.jsonShows statistics for rating categories, including the overall category, for all reviews authored in the past 6 months. ParametersAll parameters are optional.
ExamplesShell
Response
|
Expand | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||
GET /statistics/v2/general/total.jsonShows statistics for rating categories, including the overall category, for all known reviews. If the parameter 'review_subject' is not set, the statistics will be shown for the first created review subject of the api-key. ParametersAll parameters are optional.
ExamplesShell
Response
|
Expand | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
GET /statistics/v2/portal-overview.jsonStatistics for all known reviews. Aggregated for overall and broken down by review portal (e.g. Booking.com, Google, Facebook, ...). ParametersAll parameters are optional.
ExamplesShell
Response
|
Expand | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||
GET /statistics/v1/reviews-over-time.jsonStatistics for all known reviews. Aggregated weekly. ParametersAll parameters are optional.
The time intervals used for grouping are determined by these rules:
ExamplesShell
Response
|
...
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
GET /feedback/v2/questionnaires.jsonAllows access feedback questionnaires (receive list of feedback questionnaires). ParametersThis endpoint has no parameters. ExamplesShell
Response
|
Expand | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||
GET /feedback/v2/stream.jsonAllows access to all of the feedbacks that were gathered. Parameters
ExamplesShell
Response
|
...
Expand | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
POST /account/{googlePlaceId}This API is to be used by a partner to create a monitoring account for one of its customers. A monitoring account is a Customer Alliance account created for the purpose of monitoring a customer's online reviews on the public review portals. When a monitoring account is created via this API the partner can retrieve an API Key to get access to the customer data of the created monitoring account. Access to the customer data is granted via one of our APIs (JSON or iFrame APIs). There is a limit on creating monitoring accounts using this API: 50 per day per partner. Reaching the mentioned limit returns a 429 HTTP error in the API request. Parameters
ExamplesShell
Below is the JSON structure you can expect from the POST endpoint:
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
POST /api/{AccessKey}/{ReviewSubject}With this API you can seamlessly add guest/customer data to the Customer Alliance product back-end.
Our service requires SSL transport encryption. We only support TLS 1.2+. TLS 1.0, 1.1 and SSL v2, v3 are no longer supported due to massive security vulnerabilities. TestingFor testing purposes, you can request test access credentials that are connected to a test hotel. The added guests are NOT treated as real guests, and therefore will NOT be sent emails requesting a review. Other than that the API behaves and responds normally. Specification for POSTThe guest data can be sent to our server using a POST request with JSON data within the request body. The following content type should be set on the request:
Expected structureThe request body has to match the following structure:
The request body consists of a JSON array that can contain multiple guests and so it is possible to send multiple guests within one request.
Attributes
Server ResponsesThe result of the request is shown in the response of our server. Status codes for responses
In the case of
In case of error, there is a list of errors for the individual guests.
|
Code Block | ||
---|---|---|
| ||
{ "success": false, "errors": [ { "guest_id": "0", "error_details": [ { "error_code": "0", "error_message": "..." } ] } ] } |
Potential Errors
Attribute | error_code | error_message | Further information |
---|---|---|---|
name |
|
| |
departure date |
|
| |
|
| ||
gender |
|
| |
language |
|
| |
phone_number |
|
| |
reservation_id |
|
| The "reservation_id" field is mandatory if the "arrival_date" of a guest is in the future. |
other error |
|
|
Examples
Shell
Code Block | ||
---|---|---|
| ||
$ curl --location --request POST 'https://interfaces.customer-alliance.com/api/{ApiKey}/{ReviewSubject}' \ --header 'charset: utf-8' \ --header 'Content-Type: application/json' \ --data-raw '[ { "id": "1", "reservation_id": "0123A3B4C5679", "name": "M\u00fcller", "gender": "f", "email": "lieschen@mueller.de", "language": "de", "arrival_date": "2021-07-01", "departure_date": "2021-07-02", "phone_number": "+491578777769978", "billing_address": "adress billing", "revenue_logis": "2000", "age": "33", "room_number":"24", "room_category": "premium" } ]' |
Response
Code Block |
---|
{ "success": true, "added_guest_count": 1, "cancelled_guest_count": 0, "blacklisted_guest_count": 0, "already_invited_guest_count": 0 } |
...