References¶
Retrieve Surveys¶
The GET surveys endpoint enables you to retrieve survey data
GET /v1/surveys
Note
Surveys are returned in descending order by completion date time in the response
Request¶
URL Parameters¶
Parameter | Type | Default Value | Description | Required |
---|---|---|---|---|
completionFrom | DateTime | 14 days before the current date time | Survey completion date time in UTC (ISO 8601) for start of the date range (this is inclusive) | Yes - but only when completionTo is provided |
completionTo | DateTime | The current date time | Survey completion date time in UTC (ISO 8601) for end of date range (this is inclusive) | Yes - but only when completionFrom is provided |
pageNumber | Integer | 0 | Page number to retrieve. Page number cannot be less than 0. | No |
pageSize | Integer | 200 | Number of surveys to return in a page. Page size must be between 0 and 500 | No |
Sample Request¶
GET /v1/surveys
GET /v1/surveys?completionFrom=2024-05-01T00:00:00&completionTo=2024-05-31T23:59:59&pageNumber=1&pageSize=500
Response¶
Field | Type | Description |
---|---|---|
surveys | Object Array | An array of surveys |
survey.bookingReference | String | The booking reference |
survey.pickupDateTimeUTC | DateTime | The pickup timestamp in UTC |
survey.surveyCompletionDateTimeUTC | DateTime | The survey completion timestamp in UTC |
survey.score | Integer | The score given by the customer (a value between 1-5) |
survey.rating | String | The rating of the survey based on the score. If the score is 5, the rating is POSITIVE. If the score is 4 or below, the rating is NEGATIVE |
survey.reasons | String Array | The reasons provided by the customer |
survey.comment | String | Additional comments written by the customer |
pageSize | Integer | The page size |
currentPage | Integer | Current page number |
hasNextPage | Boolean | Indicates if there are more surveys to return |
nextHref | String | A link to retrieve the next page of surveys |
HTTP 200 - OK¶
{
"surveys": [
{
"bookingReference": "11523901",
"score": 5,
"rating": "POSITIVE",
"reasons": [
"Ease of communication",
"Instructions for meeting the driver"
],
"comment": "The driver was very friendly and the car was clean",
"surveyCompletionDateTimeUTC": "2024-08-12T13:31:23",
"pickupDateTimeUTC": "2024-08-12T12:31:23"
},
{
"bookingReference": "27191328",
"score": 4,
"rating": "NEGATIVE",
"reasons": [
"The driver was too early",
"Instructions to find the driver were not clear"
],
"comment": "It was difficult to communicate with the driver",
"surveyCompletionDateTimeUTC": "2024-08-12T12:31:23",
"pickupDateTimeUTC": "2024-08-12T11:31:23"
}
],
"pageSize": 200,
"currentPage": 0,
"hasNextPage": true,
"nextHref": "/v1/surveys?completionFrom=2024-07-29T14:31:23&completionTo=2024-08-12T14:31:23&pageNumber=1&pageSize=200"
}
HTTP 400 - Bad Request¶
{
"errorCode": "e152c59d-5327-433c-980b-12f759b6782e",
"errorMessage": "Min.pageNumber: must be greater than or equal to 0"
}