GetSurvey
POST/v1/rides/get-survey¶ Description
Returns survey details for a survey type. Supports cancellation and transport-provider-rating surveys; an unrecognized survey type returns an empty response rather than an error.
¶ Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| context | ThirdPartyRequestContext | Context of this request | Y |
| order_id | string | The id of the Order | Y |
| job_id | string | The id of the Job | Y |
| requested_by | ParticipantEntity | The participant who is requesting the survey data | Y |
| survey_type | string | The type of survey Possible values: ‘TRANSPORT_PROVIDER_RATING’, ‘CANCELLATION’ Refer to this table for allowed values of SurveyType. |
Y |
¶ SurveyType
| Name | Number | Description |
|---|---|---|
| SURVEY_TYPE_INVALID | 0 | |
| SURVEY_TYPE_TRANSPORT_PROVIDER_RATING | 1 | Survey type for rider rating the driver |
| SURVEY_TYPE_CANCELLATION | 2 | Survey type for ride cancellation reasons |
¶ Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| survey_id | string | The id of the survey | Y |
| title | string | Localized title of the survey describing its purpose | Y |
| questions | array<Question> | The list of questions included in survey | Y |
¶ Errors
| HTTP status | Code | Message |
|---|---|---|
| 404 | ERROR_CODE_PARTICIPANT_NOT_FOUND | One or more participants not found [value: “ |
| 403 | ERROR_CODE_INVALID_ENTITY_ACCESS | One or more of the participants are not accessible in the current environment, or the user is not authorized to access this job’s rating survey |
| 404 | ERROR_CODE_ORDER_NOT_FOUND | Given order id does not exist (cancellation survey) |
| 412 | ERROR_CODE_INVALID_ORDER_STATE | Operation cannot be performed in current order state (cancellation survey) |
| 404 | ERROR_CODE_JOB_NOT_FOUND | Given job id does not exist |
| 412 | ERROR_CODE_INVALID_JOB_STATE | Rating survey is unavailable for this job’s current state |
| 409 | ERROR_CODE_JOB_ALREADY_RATED | Job has already been rated |