Backend API
Update an existing coupon code using the ID that was returned when created.
Arguments
idobjectIdrequired
Unique identifier for the coupon code.
codestring
PUT/coupons:codes/:id
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.put('/coupons:codes/{id}', {
id: '62cc86897ad4f100132c953e',
code: 'SKOOMA15'
});The coupon code model
{
"gen_id": "62b5cdffd7ad010018c66249",
"parent_id": "62b5cdff2e40ab001ac27240",
"use_count": 0,
"date_created": "2022-06-24T14:45:20.941Z",
"use_total": 0,
"code": "PNB83100017",
"id": "62b5ce0079c5d80012fe5f65"
}