Interested in collecting customer reviews? Call us for a FREE DEMO on 01773 432041

API Documentation

Integrating with your third party systems and websites is simple and intuitive.

Introduction

This is a RESTful API.

Simply JSON encode the parameters shown below and add the resulting string to the following key-value pair when POSTing to the endpoints below:

data: [{JSON}]

You must send an array of JSON objects.

Once the request has been successfully created an e-mail will be sent to the customer asking them to review an operator they recently travelled with.



Endpoint

Please use the Dev endpoint for testing:

Dev: https://servicesdev.trustedtravelreviews.co.uk/api/review-request
Live: https://api.trustedtravelreviews.co.uk/api/review-request



Parameters

All parameters in the following table are required and should be posted to the endpoint above to the data parameter.

Name Example Notes Required
email "[email protected]" Y
customer_name “Forename Surname” Y
location “Sheffield” Y
pickup “Sheffield” N **
destination “York” N **
travel_date “26/10/2018” Dates must be in the dd/mm/yyyy format Y
ttr_id* 570 The operator ID stored with Trusted Travel Reviews. Y
api_key* “B7I25ZKIemiFv…” A 50 character key unique to the operator. This will authorize the request. Y

* The ttr_id and api_key are unique to each operator and required to make use of the API.

** pickup and destination are optional but at least one or the other must be included.



Server Responses

The API Will respond compile a report displaying details of each record sent. The details will show the status of that record (usually Successful or Failed), as well as any errors or messages relating to the processing of that record.

Successful response

{ "results": [ { "operator_id": 570, "user": "[email protected]", "messages": [ "Review Request Created." ], "errors": [ ], "status": "Successful" }, { "operator_id": 567, "user": "[email protected]", "messages": [ "Review Request Created." ], "errors": [], "status": "Successful" } ], "Stats": { "Unsuccessful": 0, "successful": 2 } }

Failed response

{ "results": [ { "operator_id": 568, "user": "user1email.com", "messages": [ ], "errors": [ { "code": 6, "message": "email address invalid." }, { "code": 4, "message": "Unrecognised operator ID" }, { "code": 1, "message": "The API key supplied is invalid." } ], "status": "Failed" }, { "operator_id": 567, "user": "[email protected]", "messages": [ ], "errors": [ { "code": 2, "message": "A review has already been sent to this user for that operator in the last 7 days." } ], "status": "Failed" } ], "Stats": { "Unsuccessful": 2, "successful": 0 } }

Error Response Codes

Code Explanation
1

The API Key supplied is invalid.
Each operator has their own unique API key which is supplied by the operator.

2

A review request has already been sent to this user for that operator in the last 7 days.
A review request to the same user with the same operator can only be sent every 7 days. If a request has been sent previously to a user for using a specific operator within the last 7 days then you will receive this response.

3

This user has already submitted a review for this operator.
The review request was not created because a previously submitted review for the operator/user was found.

4

Unrecognised Operator ID
The operator ID cannot be found in the database.

5

You are missing fields from your request. <*>
Missing parameters will be listed. All parameters are required.

6

Email address invalid.
The format of the email address is incorrect.

7

Unable to create the review request.
The review request could not be created but the cause is unknown.

8

You must include a pickup location and/or a destination
You must pass non-empty pickup and destination values.

For Operators

Login
Register
Operator Terms

For Developers

API Reference

Partners

Proud sponsors of Derby County Ladies

Company Information

3 Church View Close
Shirland
Derbyshire, DE55 6BZ
United Kingdom

Company Registered in England No: 12066038
VAT Registration No: 184097777

[email protected]