This API enables customer to cancel their pickup requests.
{warning} This API can only cancel a pickup request which has a status of Pending or Processing.
This API only accepts POST
requests.
https://dev-api.aymakan.com.sa/v2/pickup_request/cancel
https://api.aymakan.net/v2/pickup_request/cancel
The following headers should be sent along with the request
Your account security code / Api Token
Below table list the request parameters which can be sent to Create Reverse Pickup API.
{info} The request parameters should be sent in request body using JSON format.
Parameter | Type | Required | Description |
---|---|---|---|
pickup_request | Integer | Yes | Pickup request id |
A sample POST
request body is below with only the required data:
{
"pickup_request": 4021
}
Upon successful request, the following response will be sent back with an HTTP status 200 OK
.
{
"success": true,
"message": "Pickup Request is cancelled successfully"
}
In case of an already cancelled pickup request, the following response will be returned along with an HTTP status of 422 Unprocessable Entity
.
{
"error": true,
"message": "This pickup request is already cancelled"
}
If a pickup request is not found, then the following error will be returned.
{
"error": true,
"message": "Pickup Request was not found"
}
In case of invalid credentials 401 Unauthorized
, the following response will be returned.
{
"error": true,
"response": "Invalid Credentials"
}