canonical: https://jentic.com/apis/loyaltylion.com/loyaltylion

# LoyaltyLion API

LoyaltyLion is a loyalty and rewards platform whose API exposes the activity, customer, points, rewards, orders, reviews, transactions, and webhook surface needed to run a points-based programme. The 29 endpoints cover creating activities that earn points, awarding or removing customer points, redeeming or refunding rewards, syncing orders, and listing transaction history. Authentication uses an API key sent in the Authorization header.

## For AI agents

Run a LoyaltyLion loyalty programme - create activities, award and redeem points, sync customers and orders, manage rewards and reviews - across 29 endpoints with header-based API key auth.

## Scope

Does not handle payment processing, email delivery, or storefront rendering - use for LoyaltyLion points, rewards, activities, customers, orders, reviews, and webhooks only.

## Capabilities

- Create activities that award points for behaviours such as referrals, sign-ups, or product reviews
- Award or remove points from a customer's loyalty balance with an audit trail
- Redeem an available reward for a customer and refund it if the order is later cancelled
- Sync orders so points accrue against the right customer when an ecommerce purchase completes
- List a customer's transaction history including earned, spent, and adjusted points
- Manage product reviews and the points awarded for submitting them
- Subscribe webhooks so external systems react to points and reward events in real time

## Use cases

### Headless ecommerce loyalty programme

Headless storefronts call LoyaltyLion to award points on order completion, redeem rewards at checkout, and display the customer's balance and transaction history in their account page. With activity, customer, and rewards endpoints all available, the front end can run the entire member experience without server-side LoyaltyLion widgets. Most teams ship the integration in a week.

Example prompt: On order webhook, POST /customers/{id}/points to award the earned points, then GET /customers/{id}/rewards before checkout to render available rewards.

### Marketing campaign-driven point bonuses

Marketing teams trigger one-off point bonuses for customers who match campaign criteria - VIP tiers, lapsed buyers, or referral winners. POST /customers/{id}/points awards the bonus and the corresponding webhook lets the email tool send the 'you earned points' message, closing the loop without a CSV upload.

Example prompt: Iterate over the segment's customer IDs and POST /customers/{id}/points with the bonus amount and a campaign-tagged reason string.

### Reviews-for-points programme

Brands incentivise reviews by awarding points when a customer submits one. The Reviews and Activities endpoints let a review platform notify LoyaltyLion of each accepted review and the API awards the configured point total automatically. Refund handling covers the case where a review is later removed for moderation.

Example prompt: On review-approved event, POST /activities with the review activity type and customer ID, and confirm the customer's transaction history shows the new earned entry.

### Agent-driven loyalty assistant via Jentic

An AI customer-service agent answers 'how many points do I have?' and 'what can I redeem?' by calling LoyaltyLion through Jentic. The agent fetches the customer record and available rewards, then if the customer asks to redeem, executes the redemption against the right reward. Jentic isolates the API key so the agent never holds the raw secret.

Example prompt: Use Jentic to search 'list customer rewards', load GET /customers/{id}/rewards, execute it with the customer ID from the chat session, and present the redeemable rewards.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /customers/{id}/points | Award points to a customer |
| POST | /customers/{id}/points/remove | Remove points from a customer |
| GET | /customers/{id}/rewards | List rewards available to a customer |
| POST | /customers/{id}/rewards/{reward_id}/redeem | Redeem a reward |
| POST | /customers/{id}/rewards/{reward_id}/refund | Refund a redeemed reward |
| GET | /customers/{id}/transactions | List a customer's transaction history |
| POST | /activities | Create a points-earning activity |
| GET | /orders | List synced orders |

## Key resources

- **Customers** — Manage customer profiles, points balances, and transaction history
- **Activities** — Define and create activities that award points for behaviours
- **Rewards** — List, redeem, and refund rewards available to a customer
- **Orders** — Sync ecommerce orders so points accrue against the correct purchase
- **Reviews** — Manage product reviews and the points awarded for submitting them
- **Webhooks** — Subscribe to loyalty events so external systems react in real time

## Why Jentic

- **Setup:** Wiring the LoyaltyLion API by hand means setting up its Authorization key header, attaching it to every call against api.loyaltylion.com, and shaping points, reward, and activity request bodies yourself. Through Jentic you install once, import LoyaltyLion from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** LoyaltyLion puts the customer id in the URL path (/customers/{id}/...), so a rule can pin your agent to one customer: it can read that customer's rewards and transactions and add points, and nothing else. You choose the operations it may call, so ones like removing points or refunding a reward are not included unless you add them.
- **Credential handling:** Your LoyaltyLion API key is stored once, encrypted, by your own Jentic One instance and injected into the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'award loyalty points' or 'redeem a loyalty reward', and Jentic returns the matching LoyaltyLion operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Yotpo UGC API** — Reviews and loyalty platform with overlapping points, rewards, and reviews features
- **Shopify Admin API** — Underlying ecommerce platform whose orders and customers feed LoyaltyLion
- **Klaviyo API** — Email and SMS marketing platform that sends 'you earned points' messages
- **Stripe API** — Payment processor whose order events trigger point accruals in LoyaltyLion

## FAQ

### What authentication does the LoyaltyLion API use?

The LoyaltyLion API uses an API key sent in the Authorization header - issued from the LoyaltyLion admin under Developer settings. Through Jentic, the key is stored encrypted in the vault and the agent receives a scoped reference, so the raw key never appears in agent context.

### Can I award points to a customer through the LoyaltyLion API?

Yes. POST /customers/{id}/points awards points with a reason string, and POST /customers/{id}/points/remove deducts them. Use Jentic search 'award loyalty points' to load the operation and supply the customer ID, point total, and reason.

### What are the rate limits for the LoyaltyLion API?

LoyaltyLion applies per-account rate limits and returns HTTP 429 when exceeded; the published guidance is to retry with exponential backoff. Jentic forwards 429 responses unchanged so an agent backs off cleanly rather than retrying in a tight loop.

### How do I redeem a reward for a customer through Jentic?

Search Jentic for 'redeem loyaltylion reward', load POST /customers/{id}/rewards/{reward_id}/redeem, and execute it with the customer and reward IDs. If the order is later cancelled, call /customers/{id}/rewards/{reward_id}/refund to reverse the redemption.

### Does the LoyaltyLion API support webhooks for loyalty events?

Yes. The Webhooks resource lets you subscribe to events such as points awarded and reward redeemed, so downstream systems (email, CRM) can react without polling. Use the dedicated Webhooks endpoints to manage subscriptions.

### Can I sync orders into LoyaltyLion from a custom storefront?

Yes. The Orders resource accepts order data from any storefront, not just Shopify, so points accrue against the right customer and order ID. List endpoints also let you reconcile orders LoyaltyLion has on file.

### Can I limit what my agent is allowed to do with the LoyaltyLion API?

Yes. Because LoyaltyLion puts the customer id in the URL path, a rule in your self-hosted Jentic One can pin the agent to a single customer and let it read that customer's rewards and transactions and award points, and nothing else. You decide which operations the agent may call, so sensitive ones such as removing points (POST /customers/{id}/points/remove) or refunding a reward (POST /customers/{id}/rewards/{reward_id}/refund) stay off unless you add them. Your own rules govern which endpoints and credentials the agent uses at execution time.
