GetEstimateForOrderCancellation
POST/v1/rides/order-cancellation-estimate¶ Description
Fetches the fare estimate and available actions for cancelling an order. If no cancellation reason is provided, it defaults to a skipped reason so that recommended cancellation actions are still returned when applicable; the order must not be in a terminal state.
¶ Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| context | ThirdPartyRequestContext | Context of this request | Y |
| order_id | string | The id of the Order | Y |
| requested_by | ParticipantEntity | The participant who is requesting for estimates to cancel this order | Y |
| cancellation_reason_id | string | The reason for cancellation | N |
¶ Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| fare | Fare | The estimated fare for order cancellation | N |
| actions | array<Action> | The list of possible actions that can be taken by the participant | Y |
¶ Errors
| HTTP status | Code | Message |
|---|---|---|
| 400 | ERROR_CODE_VALIDATION_FAILED | Invalid user id in request |
| 403 | ERROR_CODE_INVALID_ENTITY_ACCESS | One or more of the participants are not accessible in the current environment: |
| 404 | ERROR_CODE_PARTICIPANT_NOT_FOUND | One or more participants not found [value: “ |
| 404 | ERROR_CODE_ORDER_NOT_FOUND | Given order id does not exist |
| 412 | ERROR_CODE_INVALID_ORDER_ACCESS | Participant is not authorized for read access on this order |
| 412 | ERROR_CODE_INVALID_ORDER_STATE | Operation cannot be performed in current order state |