# Loyal Spark Analytics API

> Loyal Spark Analytics API is a paid API for AI agents from api.loyalspark.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Retrieves analytics data for a loyalty program via the Loyal Spark platform

## Facts

- Endpoint: GET https://api.loyalspark.online/x402-gateway/analytics
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-loyalspark-online-5ffddba0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i-ZpiuUiQ1MSv2xXj_6HS

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-loyalspark-online-5ffddba0
```

Example prompt: Pull the latest analytics from my Loyal Spark loyalty program so I can see how my rewards and offers are performing.

## When to prefer this

Use this endpoint when you need to retrieve performance metrics and analytics for a loyalty program managed on the Loyal Spark platform, particularly when you need program-wide insights rather than individual customer balance or reward data.

## Known failure modes

- 401/402 Unauthorized — missing or invalid payment/auth header
- 404 Not Found — analytics endpoint unavailable or no data for account
- 500 Internal Server Error — server-side analytics processing failure
- Empty response — no analytics data available for the queried period
- Malformed query parameters — invalid filter values rejected

## How this service works

Onchain loyalty platform on Base Network. Businesses launch branded rewards in minutes, customers earn real value with every purchase, and AI agents automate the rest via REST and MCP. Free plan mints up to 1,000 tokens per month; every call is scoped by row-level security to the wallet behind the API key. 16 skill guides at loyalspark.online/.well-known/skills/index.md.

## Output

Returns analytics data for the loyalty program, likely including metrics on customer engagement, reward redemptions, offer performance, and program activity tied to the authenticated account.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {}
   }
  },
  "inputSchema": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
 },
 "description": "JSON from Loyal Spark agent-api or recipient-api. See OpenAPI for response shape."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-loyalspark-online-5ffddba0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.loyalspark.online](https://www.zero.xyz/host/api.loyalspark.online/llms.txt)
