Discounts
Update discount
Replaces the discount for the given discount ID. Requires OAuth website scope website.discounts, or API key scope DISCOUNTS.
put/v1/commerce/discounts/{discountId}
Request
- Base URLhttps://api.squarespace.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
discountIdstring required
The discount's unique identifier.
Headers
Authorizationstring required
API key or OAuth access token
User-Agentstring required
User Agent
Request body
Example request
{
"criteria": {
"minimumCartTotal": {
"value": 49.99
}
},
"template": {
"discountAmount": {
"value": 49.99
}
}
}Response
The updated discount.
Example response
{
"discount": {
"criteria": {
"minimumCartTotal": {
"value": 49.99
}
},
"template": {
"discountAmount": {
"value": 49.99
}
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.