Backend API
Delete a subscription product permanently. The method outlined removes the entire product. Alternatively, you can also remove the subscription purchase_option, should you wish to retain the product and any other associated purchase options.
⚠️
This is not recommended if there are currently active subscriptions that reference this product. Update those subscriptions prior to deleting the subscription product.
Arguments
idobjectIdrequired
The id of the product you wish to delete.
DELETE/products/:id
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.delete('/products/{id}');
The product model
{
"name": "Skooma",
"purchase_options": {
"subscription": {
"active": true,
"plans": [
{
"name": "Monthly",
"description": null,
"price": 75,
"billing_schedule": {
"interval": "monthly",
"interval_count": 1,
"limit": null,
"trial_days": 1
},
"id": "64e799c1307e48001237eef5",
"active": true
}
]
}
},
"currency": "USD",
"slug": "skooooma",
"price": 75,
"type": "standard",
"delivery": "shipment",
"tax_class": "standard",
"date_created": "2023-08-24T17:56:17.162Z",
"active": false,
"stock_status": null,
"id": "64e799c1307e48001237eef4"
}