div
h1
🎁 Appstle Loyalty API Documentation
p
Build powerful loyalty and rewards experiences for your Shopify store with our comprehensive, enterprise-grade REST APIs.
## Available APIs

div
div
### 🔧 [Admin APIs](/admin-api-swagger)

Server-Side Production Ready

Server-side API for managing loyalty programs, points, rewards, and customer data. Perfect for backend integrations, mobile apps, and automated workflows.

**Authentication:** API Key (X-API-Key header)

**Use Cases:**

- Backend integrations & workflows
- Mobile applications (iOS, Android)
- Admin dashboards & reporting
- Bulk operations & automation
- Third-party system integration


div
### 👥 [Storefront APIs](/storefront-api-swagger)

Storefront Production Ready

Customer-facing APIs for loyalty program self-service via Shopify App Proxy. Enable customers to earn points, redeem rewards, and manage their loyalty account directly from your storefront.

**Authentication:** Customer session (logged-in required)

**Use Cases:**

- Custom loyalty portals
- Storefront theme integration
- Customer self-service features
- Point earning & redemption
- Referral program management


## 📖 Overview

div
The Appstle Loyalty APIs provide **programmatic access** to manage every aspect of your loyalty and rewards program. Whether you're building custom integrations, internal dashboards, automated workflows, or enhancing your customer experience, our APIs deliver the power and flexibility you need.

div
div
#### 🎁 Point Management

Earn and redeem points for purchases, reviews, social actions, and custom activities

div
#### 👤 Customer Loyalty

Retrieve and sync customer loyalty data, points balance, and VIP tier status

div
#### 💎 Rewards & Discounts

Create discount codes, manage rewards, and track redemption status

div
#### ⭐ VIP Tiers

Manage VIP tier assignments, upgrades, and tier-based benefits

div
#### 👥 Referral Program

Generate referral links, track referrals, and reward customer advocacy

div
#### ⭐ Product Reviews

Submit and retrieve product reviews with points rewards

div
#### 📊 Transaction History

Access detailed point transaction logs and earning history

div
#### 🎨 Customization

Flexible API for custom loyalty program workflows and integrations

## 🎯 Which API Should I Use?

div
div
### 🔧 Use **Admin APIs** when:

✅ Building server-side integrations or workflows
✅ Managing loyalty programs from your backend
✅ Creating admin dashboards or reporting tools
✅ Automating bulk operations
✅ Integrating with other business systems
✅ **Building mobile applications (iOS, Android)**
✅ **Any integration outside your storefront**

div
strong
🔑 Authentication:
 API Key (X-API-Key header)
br
strong
🌍 Access:
 Server-side only

div
### 👥 Use **Storefront APIs** when:

✅ Building custom customer-facing interfaces **on your storefront**
✅ Adding loyalty features to your theme
✅ **Leveraging Shopify App Proxy** for seamless integration
✅ Creating self-service loyalty management
✅ Customizing the customer portal experience

div
strong
🔑 Authentication:
 Customer session (must be logged in)
br
strong
🌍 Access:
 Storefront only (via App Proxy)

div
strong
⚠️ Important:
 Storefront APIs are designed specifically for storefront use via Shopify's App Proxy. If you need to call our APIs from anywhere outside your storefront (such as mobile apps, backend services, or external integrations), you 
strong
must use Admin APIs
 with proper API key authentication.

## ⚡ Quick Start

div
### 1️⃣ Get Your API Key

Create and manage API keys from your Appstle dashboard:

div
1. 🔐 Log in to your **Appstle admin panel**
2. ⚙️ Navigate to **Settings** → **API Key Management**
3. ✨ Click **Create New Key**, give it a descriptive name (e.g., "Zapier Integration", "Mobile App")
4. 📋 **Copy the key immediately** — it is only shown once and cannot be retrieved later
5. 🔒 **Store it securely** — treat it like a password


You can create up to **10 active API keys** per store. Each key can be individually named, tracked, and revoked without affecting your other integrations.

div
strong
💡 Pro Tip:
 Create separate keys for each integration so you can revoke access independently. Never expose API keys in client-side code, public repositories, or browser applications. Always use them server-side only.

div
### 2️⃣ Make Your First Request

Test your API key by retrieving a customer's loyalty information:


```bash
curl -X GET \
  "https://loyalty-admin.appstle.com/api/external/customer-loyalty?shop=your-store.myshopify.com&customer_id=12345" \
  -H "X-API-Key: your-api-key-here"
```

div
strong
✅ Success Response (200 OK):

```json
{
  "availablePoints": 1250,
  "pendingPoints": 150,
  "creditedPoints": 1400,
  "storeCreditBalance": 25.0,
  "currentVipTier": "Gold",
  "customerStatus": "ACTIVE"
}
```

div

  📝 
em
This returns the customer's loyalty dashboard data with points and VIP tier information.
## 🔐 Authentication

div
strong
🔑 All Admin API requests require authentication using your API key.
 Include it in the request header for secure, server-side access.

All Admin API requests require authentication using your API key. Include it in the request header:

**Header-based authentication (Recommended):**


```bash
X-API-Key: apst_your-api-key-here
```

**Example Request:**


```bash
curl -H "X-API-Key: apst_your-api-key-here" \
  https://loyalty-admin.appstle.com/api/external/customer-loyalty?shop=your-store.myshopify.com&customer_id=12345
```

**Query parameter (Supported):**


```bash
?api_key=apst_your-api-key-here
```

### Key Management

You can manage your API keys from **Settings → API Key Management** in the Appstle admin panel:

- **Create** up to 10 active keys per store, each with a descriptive name
- **Track** last-used timestamps to identify stale keys
- **Revoke** individual keys instantly without affecting other integrations
- **Rotate** keys safely by creating a new key before revoking the old one


New keys use the `apst_` prefix. Existing legacy keys continue to work — no migration required.

**Important:** Keep your API keys secure. Never expose them in client-side code or public repositories. API keys are only shown in full once at creation — store them immediately.

## API Reference

Explore our comprehensive API endpoints. Use the sidebar to navigate between:

- **Admin APIs** - Server-side operations for third-party integrations
- **Storefront APIs** - Customer-facing operations via App Proxy


Both API sections are collapsed by default - expand the one you need.

### Admin APIs

#### Point Management

Manage customer points and transactions:

- **Add Points** - Manually credit points to customer accounts
- **Redeem Points** - Convert points to rewards and discounts
- **Transaction History** - Retrieve detailed point transaction logs
- **Approve Pending Transactions** - Approve queued point transactions


#### Loyalty Program Configuration

Retrieve program rules and settings:

- **Point Earn Rules** - Get point earning rule configurations
- **Point Redeem Rules** - Retrieve redemption rule options
- **Top Customers** - Access customer leaderboard by points


#### Customer Management

Customer loyalty data and enrollment:

- **Customer Loyalty** - Retrieve comprehensive loyalty dashboard data
- **Enroll Customer** - Enroll customers in loyalty program
- **Update Birth Date** - Update customer birth dates for birthday rewards


#### Rewards & Discounts

Manage discount codes and rewards:

- **Check Discount** - Validate discount codes before checkout
- **Update Discount** - Update discount code status
- **Update Discount Status** - Mark discount codes as used


#### Store Credits

Manage store credit balances:

- **Add Credits** - Add store credit to customer accounts


### Storefront APIs

Customer-facing loyalty program management endpoints:

- **Customer Data** - Retrieve logged-in customer ID and loyalty information
- **Point Earning** - Earn points for store visits and social media engagement
- **Point Redemption** - Redeem points for rewards and discounts
- **Transaction History** - View point transaction history
- **VIP Program** - View VIP tier status and benefits
- **Referral Program** - Generate referral links, send invitations, track referrals
- **Product Reviews** - Submit reviews, retrieve product review details
- **Customer Management** - Update customer status, birth date, enrollment
- **Account Integration** - Customer authentication and metafield sync


**Important:** Storefront APIs must be called from your shop's domain with a logged-in customer session. These APIs will not work with API key authentication.

Browse the complete API reference in the sidebar →

## 📋 Response Format

div
All API responses follow **standard HTTP status codes** for easy integration and error handling:

| Status Code | Meaning |
|  --- | --- |
| `200` | Success - Request completed successfully |
| `201` | Created - Resource created successfully |
| `400` | Bad Request - Invalid request parameters |
| `401` | Unauthorized - Invalid or missing API key |
| `403` | Forbidden - API key doesn't have required permissions |
| `404` | Not Found - Resource doesn't exist |
| `429` | Too Many Requests - Rate limit exceeded |
| `500` | Server Error - Something went wrong on our end |


**Error Response Example:**


```json
{
  "error": "Unauthorized",
  "message": "Invalid API key provided",
  "status": 401
}
```

## 🔔 Webhooks

div
### Real-Time Event Notifications

Receive real-time notifications when loyalty events occur in your Appstle account. Build reactive, event-driven integrations with automatic retries and detailed delivery logs.

**Available Events:**

- Point transactions (earned, redeemed, expired)
- VIP tier changes (upgraded, downgraded)
- Reward redemptions
- Customer enrollment
- Referral completions


div
strong
📚 
a
View Complete Webhooks Documentation →
## Support

**Need help?** Contact our support team at support@appstle.com

**Ready to start building?** Explore the complete API reference using the navigation menu →

*Last updated: January 2026 | API Version: v1*