> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/account/discounts.md).

# Discounts

Discount items applied to the user's past orders

## List Discount Items

> Lists discount items (promotional discount applications) used in the user's past orders.\
> \
> \*\*Business Logic:\*\*\
> \- Only promotions where \`conditional\_offer.status = USED\`\
> \- Includes discount records from all user orders\
> \- Each item includes: name, amount, order number, creation date, currency\
> \- Supports pagination\
> \- Sorted by newest first (\`-created\_date\`)

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"tags":[{"name":"Discounts","description":"Discount items applied to the user's past orders"}],"servers":[{"description":"Server base URL for basket operations","url":"https://{commerce_url}/account","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce server URL"}}}],"security":[{"cookieAuth":[]}],"paths":{"/discount-items/":{"get":{"tags":["Discounts"],"summary":"List Discount Items","description":"Lists discount items (promotional discount applications) used in the user's past orders.\n\n**Business Logic:**\n- Only promotions where `conditional_offer.status = USED`\n- Includes discount records from all user orders\n- Each item includes: name, amount, order number, creation date, currency\n- Supports pagination\n- Sorted by newest first (`-created_date`)","operationId":"getDiscountItems","parameters":[{"$ref":"#/components/parameters/CookieHeader"},{"$ref":"#/components/parameters/PageParameter"},{"$ref":"#/components/parameters/PageSizeParameter"},{"$ref":"#/components/parameters/AcceptLanguageHeader"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDiscountItemList"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}},"PageParameter":{"name":"page","in":"query","description":"Page number (starts from 1)","required":false,"schema":{"type":"integer","minimum":1,"default":1}},"PageSizeParameter":{"name":"page_size","in":"query","description":"Number of records per page","required":false,"schema":{"type":"integer","minimum":1,"default":10}},"AcceptLanguageHeader":{"name":"Accept-Language","in":"header","description":"Language preference (for multilingual content).\nSupported languages: tr, en, ar, ru, de, fr","required":false,"schema":{"type":"string","enum":["tr","en","ar","ru","de","fr"],"default":"tr"}}},"schemas":{"PaginatedDiscountItemList":{"type":"object","description":"Paginated discount item list","required":["count","results"],"properties":{"count":{"type":"integer","description":"Total record count"},"next":{"type":["string","null"],"format":"uri","description":"Next page URL (if any)"},"previous":{"type":["string","null"],"format":"uri","description":"Previous page URL (if any)"},"results":{"type":"array","description":"Records for the current page","items":{"$ref":"#/components/schemas/DiscountItem"}}}},"DiscountItem":{"type":"object","description":"Discount item","required":["name","amount","created_date","order_number","currency"],"properties":{"name":{"type":"string","description":"Discount / promotion name"},"amount":{"type":"string","format":"decimal","description":"Discount amount (returned as string with 2 fractional digits)"},"created_date":{"type":"string","format":"date-time","description":"Discount record creation date (ISO 8601)"},"order_number":{"type":"string","description":"Related order number"},"currency":{"$ref":"#/components/schemas/EnumValue","description":"Currency (derived from session)"}}},"EnumValue":{"type":"object","description":"Enum value (value + label pair)","required":["value","label"],"properties":{"value":{"type":"string","description":"Enum code value"},"label":{"type":"string","description":"Human readable label"}}},"ErrorResponse":{"type":"object","description":"Standard error response","required":["detail"],"properties":{"detail":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Error code (if any)"},"field_errors":{"type":"object","description":"Field-level errors (for validation failures)","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"UnauthorizedError":{"description":"Authentication credentials were not provided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/account/discounts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
