Cancel Order Request
Cancel an existing order
Cancel Order Request
This endpoint allows users to cancel an existing order using its unique tracking number. The request is made via the HTTP DELETE method.
API Tester - Cancel Order Request
Cancel an order using its tracking number
Environment:
DELETE
https://dev-api.woowbd.com/api/v1/developer/orders/cancel/{tracking_number}
Get your token from: http://dev-app.woowbd.com/dashboard/developer
Request Parameters
- tracking_number (path parameter): The unique identifier for the order that you wish to cancel. This parameter is essential for the request to be processed correctly.
Response Structure
The response will return a JSON object with the following structure:
- status (boolean): Indicates whether the cancellation request was processed successfully.
- message (string): A message providing additional information about the cancellation request. This may be empty or contain relevant details.
Expected Behavior
A successful cancellation will typically return a 200 OK status code along with a response indicating the success of the operation.
If the user is unauthorized to perform this action, a 401 Unauthorized status code will be returned, along with a response indicating the failure of the request.
Make sure to provide the correct tracking number in the request to ensure proper cancellation of the order.
Code Examples
cURL
curl -X DELETE "https://api.woowbd.com/orders/cancel/WOOW123456789" \
-H "Authorization: Bearer YOUR_API_KEY"JavaScript
const response = await fetch('https://api.woowbd.com/orders/cancel/WOOW123456789', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const result = await response.json();
console.log(result);Python
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.delete(
'https://api.woowbd.com/orders/cancel/WOOW123456789',
headers=headers
)
result = response.json()
print(result)PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.woowbd.com/orders/cancel/WOOW123456789');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY'
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);