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

# Models

## The EnumValue object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"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"}}}}}}
```

## The BasketOffer object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"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"}}}}}}
```

## The BasketOffersResponse object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"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"}}}}}}
```

## The PaginatedBasketOfferList object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"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"}}}}}}
```

## The DiscountItem object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"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"}}}}}}
```

## The PaginatedDiscountItemList object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"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"}}}}}}
```

## The LoyaltyBalanceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"LoyaltyBalanceResponse":{"type":"object","description":"Loyalty balance response","required":["balance"],"properties":{"balance":{"type":"number","format":"decimal","description":"Total loyalty balance (in active currency).\nIf balance is 0: either no account in this currency or fully consumed."}}}}}}
```

## The LoyaltyTransaction object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"LoyaltyTransaction":{"type":"object","description":"Loyalty transaction record","required":["order","created_date"],"properties":{"order":{"type":"string","description":"Related order number"},"created_date":{"type":"string","format":"date-time","description":"Transaction creation date (ISO 8601)"}}}}}}
```

## The LoyaltyTransfer object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"LoyaltyTransfer":{"type":"object","description":"Loyalty transfer entry (point movement)","required":["amount","currency","created_date","transaction"],"properties":{"amount":{"type":"string","format":"decimal","description":"Transfer amount (returned as string).\n- Positive: Point earning (credit)\n- Negative: Point spending (debit)"},"currency":{"$ref":"#/components/schemas/EnumValue","description":"Currency"},"created_date":{"type":"string","format":"date-time","description":"Transfer creation date (ISO 8601)"},"transaction":{"$ref":"#/components/schemas/LoyaltyTransaction","description":"Related loyalty transaction"}}},"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"}}},"LoyaltyTransaction":{"type":"object","description":"Loyalty transaction record","required":["order","created_date"],"properties":{"order":{"type":"string","description":"Related order number"},"created_date":{"type":"string","format":"date-time","description":"Transaction creation date (ISO 8601)"}}}}}}
```

## The PaginatedLoyaltyTransferList object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"PaginatedLoyaltyTransferList":{"type":"object","description":"Paginated loyalty transfer 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/LoyaltyTransfer"}}}},"LoyaltyTransfer":{"type":"object","description":"Loyalty transfer entry (point movement)","required":["amount","currency","created_date","transaction"],"properties":{"amount":{"type":"string","format":"decimal","description":"Transfer amount (returned as string).\n- Positive: Point earning (credit)\n- Negative: Point spending (debit)"},"currency":{"$ref":"#/components/schemas/EnumValue","description":"Currency"},"created_date":{"type":"string","format":"date-time","description":"Transfer creation date (ISO 8601)"},"transaction":{"$ref":"#/components/schemas/LoyaltyTransaction","description":"Related loyalty transaction"}}},"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"}}},"LoyaltyTransaction":{"type":"object","description":"Loyalty transaction record","required":["order","created_date"],"properties":{"order":{"type":"string","description":"Related order number"},"created_date":{"type":"string","format":"date-time","description":"Transaction creation date (ISO 8601)"}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"Account API - Loyalty & Offers Module","version":"1.0.0"},"components":{"schemas":{"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"}}}}}}}}
```


---

# 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/models.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.
