Delete Promotion Code
2/9/25Less than 1 minute
Delete Promotion Code
Description
This API allows merchant to delete a promotional code by its unique ID.
Endpoint
- URL:
/v1/promotions/{promotionId} - Method:
DELETE
Required Headers
{
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}Example API Call (Using Fetch)
fetch("https://api.shopsynch.com/v1/promo-ads/12345", {
method: "DELETE",
headers: {
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));✅ Sample 200 Response (Success)
{
"status": true,
"message": "Promo ad deleted successfully"
}❌ Sample 422 Response (Validation Error)
{
"status": false,
"message": "Invalid request or missing promo ad ID"
}Next Steps
- Learn more about Adding a Promo Code
- Learn more about Updating a Promo Code
