cURL
curl --request PUT \ --url https://staging-api.puppetvendors.com/discounts/{discountId} \ --header 'Content-Type: application/json' \ --header 'x-access-token: <api-key>' \ --data ' { "title": "<string>", "endsAt": "<string>", "status": "<string>" } '
Update an existing vendor discount code
Documentation IndexFetch the complete documentation index at: https://dev.puppetvendors.com/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://dev.puppetvendors.com/llms.txt
Use this file to discover all available pages before exploring further.
active
expired
disabled
{ "success": true, "data": { "discount": { "_id": "507f1f77bcf86cd799439011", "code": "VENDOR20", "title": "Extended Vendor Sale", "status": "active", "updatedAt": "2024-08-01T09:00:00.000Z" } } }
curl -X PUT https://staging-api.puppetvendors.com/discounts/507f1f77bcf86cd799439011 \ -H "Content-Type: application/json" \ -H "x-access-token: YOUR_VENDOR_JWT_TOKEN" \ -d '{ "title": "Extended Vendor Sale", "endsAt": "2024-09-30T23:59:59.000Z" }'
Was this page helpful?