Skip to content

Discount coupons set creation

Request

This endpoint allows you to create set of discount coupons for Shoptet.It is good to compare count of requested coupons with count of cooupons in response as it can be different. It is because of request validation, where it ignores invalid coupons.

Security
shoptetAccessToken or shoptetPrivateApiToken
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discount-coupons/set \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "count": 2,
      "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."
    }
  }'

Responses

Created

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "coupons": [] }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }