UnassignJob
POST/v1/rides/unassign-job¶ Description
Unassigns the current job corresponding to the order id in the request. Only supported once a driver has been assigned and the job is en route; the order and job must be in the correct state, otherwise the request is rejected.
¶ 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 to unassign this job | Y |
¶ Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| order | Order | The updated 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 |
| 412 | ERROR_CODE_INVALID_ORDER_ACCESS | Participant is not authorized for write access on this order |
| 412 | ERROR_CODE_INVALID_ORDER_STATE | Order must be active to unassign the current job |
| 412 | ERROR_CODE_INVALID_JOB_STATE | Unassign is only supported after a driver has been assigned and the job is en route |
| 400 | ERROR_CODE_VALIDATION_FAILED | Invalid argument provided while registering the unassign action |