> 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/loyalty-card/introduction.md).

# Introduction

This guide outlines the loyalty card management API endpoints in the system. These endpoints allow users to create, retrieve, update, and delete loyalty cards, as well as query loyalty points and integrate with external loyalty programs.

The Loyalty Card API provides functionality for:

**1. Loyalty Card Management**

* Create loyalty cards for authenticated users
* Retrieve loyalty card details and available points
* Update loyalty card information
* Delete/deactivate loyalty cards
* Search for existing loyalty accounts in external systems

**2. Registration Methods**

* Standard registration with SMS verification (OTP)
* Registration without SMS verification (for pre-verified users)
* Search and link existing external loyalty accounts
* Automatic account creation if not found in external system

**3. Points Integration**

* Query available loyalty points from external systems
* Cache loyalty points for performance (2-minute cache)
* Use loyalty points during checkout process
* Track point transactions and redemptions

**4. External System Integration**

* Synchronize user data with external loyalty providers
* Configurable SMS gateway for verification codes
* Automatic account linking and creation

Each endpoint is designed to support loyalty program operations where authenticated users can manage their loyalty cards and redeem points for discounts during checkout.

**NOTE:** All methods require authentication via session cookies. The loyalty card system integrates with external loyalty providers and requires proper configuration of the `CUSTOMER_LOYALTY_CARD_SERVICE` setting.


---

# 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/loyalty-card/introduction.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.
