Skip to content

List of discount coupons

Request

List of discount coupons within the e-shop. The list is paged at 1000 coupons. The discount coupons can be filtered according to the date of creation, validity, repeatability of usage or their template.

If absolute price is used, the amount is interpreted with the default VAT rate of the eshop (in administration:

Settings » Basic Settings » Tax Classes). It can be retrieved using endpoint Eshop Info, array taxClasses.

The same is valid for minimum price.

Security
shoptetAccessToken or shoptetPrivateApiToken
Query
templatestring

template GUID

Example:template=01b39ad8-8686-11e9-968c-08002774f818
creationTimeFromstring

date and time of coupon creation - lower limit

Example:creationTimeFrom=2018-05-28T14:17:00+02:00
creationTimeTostring

date and time of coupon creation - upper limit

Example:creationTimeTo=2028-05-28T14:17:00+02:00
reusableboolean

is the discount coupon reusable?

Example:reusable=true
validFromstring

date of discount coupon validity - lower limit

Example:validFrom=2018-05-28
validTostring

date of discount coupon validity - upper limit

Example:validTo=2028-05-28
itemsPerPageinteger

Returned items per page. Default and max value is 1000.

Example:itemsPerPage=888
pageinteger

Page number to return. Default value is 1.

Example:page=3
Headers
Content-Typestringrequired
Default:"application/json"
curl -i -X GET \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discount-coupons?template=01b39ad8-8686-11e9-968c-08002774f818&creationTimeFrom=2018-05-28T14%3A17%3A00%2B02%3A00&creationTimeTo=2028-05-28T14%3A17%3A00%2B02%3A00&reusable=true&validFrom=2018-05-28&validTo=2028-05-28&itemsPerPage=888&page=3' \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

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