$orderId = "ID_OF_YOUR_ORDER";
$apiKey = "YOUR_API_KEY";
function deleteOrder($orderId, $apiKey) {
$url = "https://api.autoenhance.ai/v3/orders/$orderId";
$options = array(
'http' => array(
'header' => "Content-Type: application/json\r\n" .
"x-api-key: $apiKey\r\n",
'method' => 'DELETE'
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
echo "Error deleting order";
} else {
echo "Order deleted successfully";
}
}