> For the complete documentation index, see [llms.txt](https://help.recart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.recart.com/developers/public-api/discount/retrieve-list-of-discounts.md).

# Retrieve list of discounts

The site's discounts — configuration and pool state, no statistics. status is computed from the activation and expiration dates: active, scheduled (starts later), expired (ended or deactivated). Default page size 100. All filters combine with AND.

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"tags":[{"name":"Discount","description":"Discounts"}],"servers":[{"url":"https://api.recart.com/app-integrations/2023-12","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Recart-API-Key","description":"It can be obtained in Recart account after contacting Support"}},"schemas":{"Discount":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["discounts"]},"attributes":{"$ref":"#/components/schemas/DiscountAttributes"}}},"DiscountAttributes":{"type":"object","required":["id","name","status","customizationType","type","discountClasses","shopifyDiscountId","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"ID of the discount"},"name":{"type":"string","description":"Name of the discount"},"status":{"type":"string","description":"Computed from startsAt / endsAt; expired also after deactivation","enum":["active","scheduled","expired"]},"customizationType":{"type":"string","description":"unique = each customer gets a different code; general = one shared code","enum":["unique","general"]},"expiryType":{"type":"string","description":"unique only. fixed = a code pool whose codes expire at the end\ndate set when the discount was created. relative = an expiring\ncode created on demand; its expiration timer starts the moment\nthe customer receives the code via popup or SMS.\n","enum":["fixed","relative"]},"type":{"type":"string","description":"Shopify discount type; with discountClasses it is the\ndashboard's type (basic + product = Amount off product,\nbasic + order = Amount off order)\n","enum":["basic","bxgy","free-shipping","app"]},"discountClasses":{"type":"array","description":"Shopify discount classes of the discount. Together with the\nprice rule's combination settings they define which other\ndiscounts it can be combined with in one checkout, see\nhttps://help.shopify.com/en/manual/discounts/discount-combinations\n","items":{"type":"string","enum":["product","order","shipping"]}},"amount":{"type":"number","description":"Not on app discounts"},"valueType":{"type":"string","description":"Not on app discounts","enum":["PERCENTAGE","FIXED_AMOUNT","FREE_SHIPPING","UNKNOWN"]},"summary":{"type":"string","description":"Shopify's one-line description of value, target and conditions; not on app discounts"},"appTitle":{"type":"string","description":"App discounts only — the Shopify app that owns the discount"},"code":{"type":"string","description":"general only"},"discountCodePattern":{"type":"string","description":"unique only — the code prefix"},"mode":{"type":"string","description":"code pools only — refilling pools serve flows and popups, non-refilling pools serve campaigns","enum":["refilling","non-refilling"]},"targetCount":{"type":"integer","description":"code pools only"},"availableCount":{"type":"integer","description":"code pools only — codes not yet issued"},"fillStatus":{"type":"string","description":"code pools only — filling = codes still uploading to Shopify","enum":["needFilling","filling","full"]},"durationSeconds":{"type":"integer","description":"expiring only — validity from the moment the code is issued"},"template":{"type":"object","additionalProperties":true,"description":"expiring only — the Shopify discount input each issued code's\nprice rule is created from, as stored\n(type, title, appliesOncePerCustomer, usageLimit,\ncombinesWith, customerSelection, customerGets,\nminimumRequirement, destinationSelection for free shipping)\n"},"startsAt":{"type":"string","format":"date-time","description":"Not on expiring discounts"},"endsAt":{"type":"string","format":"date-time","nullable":true,"description":"null = no end date; not on expiring discounts"},"shopifyDiscountId":{"type":"string","description":"The Shopify discount (price rule) id"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"HttpErrorBody":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["id","code","title","detail"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"}}}}}}},"responses":{"HttpError":{"description":"HTTP Error response","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/HttpErrorBody"}}}}}},"paths":{"/discounts":{"get":{"summary":"Retrieve list of discounts","tags":["Discount"],"operationId":"listDiscounts","description":"The site's discounts — configuration and pool state, no statistics.\nstatus is computed from the activation and expiration dates: active,\nscheduled (starts later), expired (ended or deactivated). Default\npage size 100. All filters combine with AND.\n","parameters":[{"name":"code","in":"query","description":"The static code of a general discount, exact match,\ncase-insensitive. Only general discounts have a code.\n","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"name","in":"query","description":"Discount name contains this text, case-insensitive","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"pattern","in":"query","description":"The code prefix of a unique discount (discountCodePattern),\nexact match, case-insensitive. Only unique discounts have one.\n","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","description":"Maximum number of discounts to return","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}},{"name":"offset","in":"query","description":"Number of discounts to skip, for pagination","schema":{"type":"integer","minimum":0,"default":0}},{"name":"mode","in":"query","description":"Code pools only — refilling pools serve flows and popups, non-refilling pools serve campaigns","schema":{"type":"string","enum":["refilling","non-refilling"]}},{"name":"available","in":"query","description":"true = discounts a flow or campaign could pick — every general\ndiscount plus the unique discounts not yet assigned to a\ncampaign; with flowId, also the ones that flow already uses.\nStatus and dates are not checked.\n","schema":{"type":"boolean"}},{"name":"flowId","in":"query","description":"Discounts configured in this flow","schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}}}}}}},"4XX":{"$ref":"#/components/responses/HttpError"},"5XX":{"$ref":"#/components/responses/HttpError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.recart.com/developers/public-api/discount/retrieve-list-of-discounts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
