> ## Documentation Index
> Fetch the complete documentation index at: https://developers.mageloyalty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> The Mage Loyalty REST API lets you programmatically manage your loyalty program.

## REST API

The Mage Loyalty API is organized around REST. It has predictable, resource-oriented URLs, uses standard HTTP methods, and returns [JSON:API](https://jsonapi.org/)-formatted responses.

```
https://api.mageloyalty.com/v1
```

## Response format

All responses follow the JSON:API specification.

**Single resource:**

```json theme={null}
{
  "data": {
    "type": "customer",
    "id": "6789012345",
    "attributes": {
      "email": "jane@example.com",
      "current_points": 450
    }
  }
}
```

**Collection:**

```json theme={null}
{
  "data": [
    {
      "type": "customer",
      "id": "6789012345",
      "attributes": { ... }
    }
  ],
  "meta": {
    "total": 100,
    "page": 1,
    "per_page": 20,
    "total_pages": 5
  }
}
```

**Error:**

```json theme={null}
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Customer 'xyz' not found"
    }
  ]
}
```

## Available resources

<CardGroup cols={2}>
  <Card title="Customers" icon="users" href="/api-reference/customers/object">
    Manage loyalty program members, points, and history
  </Card>

  <Card title="Earning Rules" icon="coins" href="/api-reference/earning-rules/object">
    Configure how customers earn points
  </Card>

  <Card title="Rewards" icon="gift" href="/api-reference/rewards/object">
    Manage available rewards and redemptions
  </Card>

  <Card title="VIP Tiers" icon="crown" href="/api-reference/vip-tiers/object">
    View tier configurations and requirements
  </Card>
</CardGroup>
