Backend API
Delete a promotion permanently.
Arguments
idobjectIdrequired
The id of the promotion to delete.
DELETE/promotions/:id
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.delete('/promotions/{id}', {
id: '60f199509111e70000000077'
});
Response
{
"id": "60f199509111e70000000077",
"name": "15% Off Store Wide Sale",
"active": true,
"currency": "USD",
"date_created": "2021-07-16T14:36:00.386Z",
"date_end": "2018-03-01T00:00:00.000Z",
"date_start": "2018-11-01T00:00:00.000Z",
"date_updated": "2021-07-16T14:36:00.386Z",
"description": "Save 15% store wide for a limited time only.",
"discounts": [
{
"type": "total",
"value_type": "percent",
"value_fixed": 15
}
],
"limit_account_uses": 3,
"limit_uses": 300,
"use_count": 142
}