Skip to content

List discount codes

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/back_in_stock/discount_codes

Costs 1 rate-limit point · Rate limits

Search the store's active Shopify discount codes that a back-in-stock alert or reminder can include. ?query= matches the discount title or code. Codes from discounts with many unique codes are left out, because one code goes to every customer. scope_granted is false when the store has not allowed STOQ to read its discounts; then the list is empty.

Read-only: STOQ never creates or changes discounts. Pick a code here, then set it with PATCH /back_in_stock/templates/:key { discount: { code } }.

Also searched asdiscount codeslist discount codesfind discount codeback in stock discountrestock alert discount codecoupon code in restock email

Query parameters

  • querystring

Errors

422
validation_failed

The action refused the request for a reason that is not a single bad field.

Any request can also fail with auth_invalid (401) or rate_limited (429).

Every error has the same shape: see Errors and the list of error codes.

GET/back_in_stock/discount_codes
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/discount_codes" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
No body