Reservations

Cancel reservation

POST /v2/bob-box/reservations/cancel Bearer token

Cancel a reservation that has not been dropped off yet, freeing up the compartment.

Only a reservation still in waiting-for-dropoff can be cancelled. Once the parcel is in the locker there is nothing to cancel — every other status, waiting-for-pickup included, is rejected.

Request

Method: POST URL: https://api.bobbox.co.za/v2/bob-box/reservations/cancel

Request body parameters

Key Description Type Required
reservation_id The ID of the reservation to cancel. integer Conditional*
id Alias for reservation_id. integer Conditional*

* Send either reservation_id or id. If you send both, id wins.

Response

Status code: 200 OK Content-Type: application/json

Response body:

See the example response.

The body is a plain JSON string, not an object.

Errors

Status Message Cause
400 id is required Neither reservation_id nor id was sent.
400 could not find reservation No reservation with that ID.
400 cannot cancel a reservation that is not waiting for dropoff The reservation is already dropped off, complete, expired, cancelled, returned, or cleared.
403 cannot cancel reservations for a different account The reservation belongs to another account.