CancelOrder
POST/v1/rides/cancel-order¶ Description
Cancels the order corresponding to the order id in request. If no cancellation reason is provided, it defaults to a skipped reason.
¶ 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 to cancel this order | Y |
| cancellation_reason_id | string | The reason for cancellation | N |
| fare_spec | FareSpecification | Fare spec for cancellation estimates | Y |
¶ Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| order | Order | The order | Y |
¶ Errors
| HTTP status | Code | Message |
|---|---|---|
| 404 | ERROR_CODE_ORDER_NOT_FOUND | Given order id does not exist |
| 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: |
| 422 | ERROR_CODE_INVALID_ORDER_ACCESS | Participant is not authorized for <read/write> access on this order |
| 422 | ERROR_CODE_INVALID_ORDER_STATE | Operation cannot be performed in current order state |
| 422 | ERROR_CODE_ORDER_NON_CANCELLABLE | Order is non-cancellable |
| 422 | ERROR_CODE_FARE_EXPIRED | Fare has expired and the order cannot be canceled due to an expired cancellation fee |