It cancels a given job under a restriction that allows it to be cancelled:
Until its state is on
pickup_arrived. This includes the following states:
pickup_arrived. When the job is on any other state, this request will be rejected.
If the job is on
pickup_arrived, the partner can only cancel it in the first 5 minutes the job got onto this last state. Meaning that if the courier has arrived at the pickup 6 minutes ago, the partner will not be able to cancel this job anymore.