Skip to content

List of all discount coupons

Request

Using this endpoint, you can get list of all discount coupons with detailed info of each discount coupon asynchronously. See how Asynchronous requests work on our developer's portal.

Response will be in jsonlines format with each discount coupon taking one line of output file.

One discount coupon in response has the same format as one discount coupon item form list response. See Discount coupon snapshot schema for more details.

Result file is compressed using GZIP.

Security
shoptetAccessToken or shoptetPrivateApiToken
Query
codeFromstring

Export discount coupons with code after given value

Example:codeFrom=0000000006
codeTostring

Export discount coupons with code befor given value

Example:codeTo=0000000006
creationTimeFromstring

Export discount coupons created after date

Example:creationTimeFrom=2014-09-05T00:00:00%2B0000
creationTimeTostring

Export discount coupons created before date

Example:creationTimeTo=2019-09-05T00:00:00%2B0000
discountTypestring

Export discount coupons with given discount type (percentual, fixed)

Example:discountType=free
validFromstring

Export discount coupons valid after date

Example:validFrom=2014-09-05
validTostring

Export discount coupons valid before date

Example:validTo=2019-09-05
reusableboolean

Is the discount coupon reusable?

Example:reusable=true
templatestringrequired

GUID of discount coupon template

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

Currency of fixed discount

Example:currency=EUR
shippingPricestringrequired

How the transport prices are calculated: according to the cart before discounts (beforeDiscount), according to the displayed value of the cart (cart), or free (free)

Example:shippingPrice=cart
Headers
Content-Typestringrequired
Default:"application/json"
curl -i -X GET \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/discount-coupons/snapshot?codeFrom=0000000006&codeTo=0000000006&creationTimeFrom=2014-09-05T00%3A00%3A00%252B0000&creationTimeTo=2019-09-05T00%3A00%3A00%252B0000&discountType=free&validFrom=2014-09-05&validTo=2019-09-05&reusable=true&template=01b39ad8-8686-11e9-968c-08002774f818&currency=EUR&shippingPrice=cart' \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

Accepted

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