Bulk partial update of existing discount coupons. Each coupon in the request must include code as the identifier. All remaining fields are optional and applied as a partial update — only provided fields are changed.
When discountType is percentual, amount must not be provided. When discountType is fixed, ratio must not be provided.
The currency field is required when discountType is fixed or minPrice is not null.
Invalid coupons or coupons not found by code are skipped and reported in errors[].
Security
shoptetAccessToken or shoptetPrivateApiToken
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discount-coupons
- https://api.myshoptet.comhttps://api.myshoptet.com/api/discount-coupons
- shoptetAccessToken
- shoptetPrivateApiToken
curl -i -X PATCH \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discount-coupons \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"coupons": [
{
"code": "DISCOUNT10",
"discountType": "percentual",
"amount": "21.00",
"ratio": "0.1000",
"minPrice": "21.00",
"currency": "CZK",
"template": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
"shippingPrice": "cart",
"validFrom": "2017-04-04",
"validTo": "2017-04-04",
"reusable": true,
"remark": "This is a discount coupon for the first purchase."
}
]
}
}'Response
- typePriceRatio
- null
{ "data": { "coupons": [ … ] }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }