> 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/basket-offers.md).

# Basket Offers

User-specific basket offers (active, past, upcoming)

## List Active Basket Offers

> Lists the user's active basket offers.\
> \
> \*\*Business Logic:\*\*\
> \- Returns offers whose date range is currently active (\`start\_datetime <= now <= end\_datetime\`)\
> \- User-specific assigned offers only\
> \- Offers valid for the active session currency\
> \- Includes FIXED, PERCENTAGE, SHIPPING\_FREE benefit types\
> \
> \*\*Returned Data:\*\*\
> \- \`total\_discount\`: Sum of amounts for FIXED benefit type offers\
> \- \`discounts\`: Only FIXED benefit type offers\
> \- \`all\_discounts\`: All offer types (FIXED, PERCENTAGE, SHIPPING\_FREE)

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"tags":[{"name":"Basket Offers","description":"User-specific basket offers (active, past, upcoming)"}],"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":{"/basket-offers/":{"get":{"tags":["Basket Offers"],"summary":"List Active Basket Offers","description":"Lists the user's active basket offers.\n\n**Business Logic:**\n- Returns offers whose date range is currently active (`start_datetime <= now <= end_datetime`)\n- User-specific assigned offers only\n- Offers valid for the active session currency\n- Includes FIXED, PERCENTAGE, SHIPPING_FREE benefit types\n\n**Returned Data:**\n- `total_discount`: Sum of amounts for FIXED benefit type offers\n- `discounts`: Only FIXED benefit type offers\n- `all_discounts`: All offer types (FIXED, PERCENTAGE, SHIPPING_FREE)","operationId":"getActiveBasketOffers","parameters":[{"$ref":"#/components/parameters/CookieHeader"},{"$ref":"#/components/parameters/AcceptLanguageHeader"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasketOffersResponse"}}}},"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"}},"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":{"BasketOffersResponse":{"type":"object","description":"Active basket offers response","required":["total_discount","discounts","all_discounts"],"properties":{"total_discount":{"type":"number","format":"decimal","description":"Total fixed discount amount.\nSum of amount values for FIXED benefit type offers only."},"discounts":{"type":"array","description":"Only FIXED benefit type offers","items":{"$ref":"#/components/schemas/BasketOffer"}},"all_discounts":{"type":"array","description":"All offer types (FIXED, PERCENTAGE, SHIPPING_FREE)","items":{"$ref":"#/components/schemas/BasketOffer"}}}},"BasketOffer":{"type":"object","description":"Basket offer details","required":["end_datetime","start_datetime","voucher_code","offer_type","benefit_type"],"properties":{"label":{"type":["string","null"],"maxLength":512,"description":"Offer label (display name to the user)"},"amount":{"type":"number","format":"decimal","description":"Fixed discount amount (for FIXED benefit_type).\nReturns 0 for PERCENTAGE or SHIPPING_FREE types."},"percentage":{"type":["number","null"],"format":"decimal","description":"Percentage discount rate (for PERCENTAGE benefit_type).\nReturns null for FIXED or SHIPPING_FREE."},"end_datetime":{"type":"string","format":"date-time","description":"Offer end date (ISO 8601)"},"start_datetime":{"type":"string","format":"date-time","description":"Offer start date (ISO 8601)"},"currency":{"$ref":"#/components/schemas/EnumValue","description":"Currency (derived from session)"},"voucher_code":{"type":"string","description":"Voucher/coupon code applied in basket"},"offer_type":{"$ref":"#/components/schemas/EnumValue","description":"Offer type:\n- voucher_code: Single-use, any user\n- coupon_code: Single-use, specific user\n- coupon: Multi-use, specific user\n- sitewide: Automatic, all users\n- external_offer: External system source"},"condition":{"type":["object","null"],"description":"Offer condition (minimum amount, quantity, etc.)","properties":{"type":{"type":"string","description":"Condition type (Minimum Amount, Minimum Quantity, Query)"},"value":{"type":["number","null"],"format":"decimal","description":"Condition value"}}},"benefit_type":{"$ref":"#/components/schemas/EnumValue","description":"Benefit type:\n- FIXED: Fixed amount discount\n- PERCENTAGE: Percentage discount\n- SHIPPING_FREE: Free shipping\n- SAMPLE_PRODUCT: Gift / sample product"},"status":{"$ref":"#/components/schemas/EnumValue","description":"Offer status (ACTIVE, PASSIVE, USED, REVOKED)"}}},"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"}}}}}}}
```

## List Expired Basket Offers

> Lists the user's expired basket offers (past promotions).\
> \
> \*\*Business Logic:\*\*\
> \- Offers satisfying \`end\_datetime < now\`\
> \- User-specific assignments\
> \- Valid for the active session currency

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"tags":[{"name":"Basket Offers","description":"User-specific basket offers (active, past, upcoming)"}],"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":{"/expired-basket-offers/":{"get":{"tags":["Basket Offers"],"summary":"List Expired Basket Offers","description":"Lists the user's expired basket offers (past promotions).\n\n**Business Logic:**\n- Offers satisfying `end_datetime < now`\n- User-specific assignments\n- Valid for the active session currency","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/PaginatedBasketOfferList"}}}},"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":{"PaginatedBasketOfferList":{"type":"object","description":"Paginated basket offer 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/BasketOffer"}}}},"BasketOffer":{"type":"object","description":"Basket offer details","required":["end_datetime","start_datetime","voucher_code","offer_type","benefit_type"],"properties":{"label":{"type":["string","null"],"maxLength":512,"description":"Offer label (display name to the user)"},"amount":{"type":"number","format":"decimal","description":"Fixed discount amount (for FIXED benefit_type).\nReturns 0 for PERCENTAGE or SHIPPING_FREE types."},"percentage":{"type":["number","null"],"format":"decimal","description":"Percentage discount rate (for PERCENTAGE benefit_type).\nReturns null for FIXED or SHIPPING_FREE."},"end_datetime":{"type":"string","format":"date-time","description":"Offer end date (ISO 8601)"},"start_datetime":{"type":"string","format":"date-time","description":"Offer start date (ISO 8601)"},"currency":{"$ref":"#/components/schemas/EnumValue","description":"Currency (derived from session)"},"voucher_code":{"type":"string","description":"Voucher/coupon code applied in basket"},"offer_type":{"$ref":"#/components/schemas/EnumValue","description":"Offer type:\n- voucher_code: Single-use, any user\n- coupon_code: Single-use, specific user\n- coupon: Multi-use, specific user\n- sitewide: Automatic, all users\n- external_offer: External system source"},"condition":{"type":["object","null"],"description":"Offer condition (minimum amount, quantity, etc.)","properties":{"type":{"type":"string","description":"Condition type (Minimum Amount, Minimum Quantity, Query)"},"value":{"type":["number","null"],"format":"decimal","description":"Condition value"}}},"benefit_type":{"$ref":"#/components/schemas/EnumValue","description":"Benefit type:\n- FIXED: Fixed amount discount\n- PERCENTAGE: Percentage discount\n- SHIPPING_FREE: Free shipping\n- SAMPLE_PRODUCT: Gift / sample product"},"status":{"$ref":"#/components/schemas/EnumValue","description":"Offer status (ACTIVE, PASSIVE, USED, REVOKED)"}}},"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"}}}}}}}
```

## List Future Basket Offers

> Lists the user's future basket offers (scheduled promotions not yet started).\
> \
> \*\*Business Logic:\*\*\
> \- Offers satisfying \`start\_datetime > now\`\
> \- User-specific assignments\
> \- Valid for the active session currency\
> \- Supports pagination\
> \
> \*\*Notes:\*\*\
> \- These offers cannot yet be applied to the basket\
> \- Informational only\
> \- Sorting by ascending start date (\`start\_datetime ASC\`) is recommended

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"tags":[{"name":"Basket Offers","description":"User-specific basket offers (active, past, upcoming)"}],"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":{"/future-basket-offers/":{"get":{"tags":["Basket Offers"],"summary":"List Future Basket Offers","description":"Lists the user's future basket offers (scheduled promotions not yet started).\n\n**Business Logic:**\n- Offers satisfying `start_datetime > now`\n- User-specific assignments\n- Valid for the active session currency\n- Supports pagination\n\n**Notes:**\n- These offers cannot yet be applied to the basket\n- Informational only\n- Sorting by ascending start date (`start_datetime ASC`) is recommended","operationId":"getFutureBasketOffers","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/PaginatedBasketOfferList"}}}},"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":{"PaginatedBasketOfferList":{"type":"object","description":"Paginated basket offer 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/BasketOffer"}}}},"BasketOffer":{"type":"object","description":"Basket offer details","required":["end_datetime","start_datetime","voucher_code","offer_type","benefit_type"],"properties":{"label":{"type":["string","null"],"maxLength":512,"description":"Offer label (display name to the user)"},"amount":{"type":"number","format":"decimal","description":"Fixed discount amount (for FIXED benefit_type).\nReturns 0 for PERCENTAGE or SHIPPING_FREE types."},"percentage":{"type":["number","null"],"format":"decimal","description":"Percentage discount rate (for PERCENTAGE benefit_type).\nReturns null for FIXED or SHIPPING_FREE."},"end_datetime":{"type":"string","format":"date-time","description":"Offer end date (ISO 8601)"},"start_datetime":{"type":"string","format":"date-time","description":"Offer start date (ISO 8601)"},"currency":{"$ref":"#/components/schemas/EnumValue","description":"Currency (derived from session)"},"voucher_code":{"type":"string","description":"Voucher/coupon code applied in basket"},"offer_type":{"$ref":"#/components/schemas/EnumValue","description":"Offer type:\n- voucher_code: Single-use, any user\n- coupon_code: Single-use, specific user\n- coupon: Multi-use, specific user\n- sitewide: Automatic, all users\n- external_offer: External system source"},"condition":{"type":["object","null"],"description":"Offer condition (minimum amount, quantity, etc.)","properties":{"type":{"type":"string","description":"Condition type (Minimum Amount, Minimum Quantity, Query)"},"value":{"type":["number","null"],"format":"decimal","description":"Condition value"}}},"benefit_type":{"$ref":"#/components/schemas/EnumValue","description":"Benefit type:\n- FIXED: Fixed amount discount\n- PERCENTAGE: Percentage discount\n- SHIPPING_FREE: Free shipping\n- SAMPLE_PRODUCT: Gift / sample product"},"status":{"$ref":"#/components/schemas/EnumValue","description":"Offer status (ACTIVE, PASSIVE, USED, REVOKED)"}}},"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/basket-offers.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.
