Update a Discount
PATCH
https://app.sparklayer.io/api/v1/discounts/{id}
idstringEither the Internal or External ID
acceptstringGenerated from available response content types
Site-IdstringSpark Layer Site ID
bodyobject
200Successful response
defaultError Response
curl --request PATCH \
--url https://app.sparklayer.io/api/v1/discounts/{id} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'site-id: jones-climbing' \
--data '{
"internal_name": "",
"internal_slug": "",
"calculation_group": "",
"priority": "",
"times_applicable_per_order": "",
"max_rewards": 1,
"groups": [],
"requirement_selection_type": "",
"reward_selection_type": "",
"currency_code": "gbp",
"start_date": "",
"end_date": "",
"active": "",
"requirements": [
{
"items": [
{
"restrictions": [
{
"type": "",
"ref": ""
}
],
"points_type": "",
"points": 1,
"quantity": "",
"selection_type": ""
}
],
"max_rewards": "",
"min_spend": "",
"max_spend": "",
"spend_tax_type": "",
"selection_type": "",
"min_points": ""
}
],
"rewards": [
{
"type": "",
"amount_type": "",
"item_id": "",
"amount": ""
}
],
"other_requirements": [
{}
]
}'