REST API · Webhooks · SDKs

Powerful APIs for developers.

Connect loyalty features into websites, applications, and business systems with simple API integration.

POST /api/v1/points/add
POST /api/v1/points/add
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "customer_id": "CUS00001",
  "points": 100,
  "reason": "Purchase"
}
Authentication

Secure API key authentication.

All API requests require an API key passed in the Authorization header as a Bearer token. Generate, rotate, and revoke keys from your dashboard at any time. Keys are scoped per-environment so you can keep production and sandbox traffic separate.

  • Bearer token authentication
  • Per-environment key scoping
  • Instant key rotation and revocation
Authorization header
# Header format
Authorization: Bearer YOUR_API_KEY

# Example request
curl https://api.aftersolves.com/v1/customers \
  -H "Authorization: Bearer sk_live_abc123..."
Endpoints

Core API endpoints.

A simple, consistent REST API for every loyalty operation.

Method
Endpoint
Description
POST
/api/v1/points/add
Add points to a customer's balance
POST
/api/v1/points/deduct
Deduct points from a customer's balance
GET
/api/v1/customers/{id}/balance
Retrieve a customer's current point balance
POST
/api/v1/vouchers/create
Generate a new unique digital voucher
POST
/api/v1/vouchers/redeem
Redeem a voucher code (one-time use)
GET
/api/v1/memberships/{id}
Get customer membership tier and benefits
POST
/api/v1/memberships/upgrade
Upgrade a customer's membership tier
GET
/api/v1/customers/{id}
Retrieve full customer profile and history

Full reference at docs.aftersolves.com

Examples

Code examples in every language.

Add points to a customer with a single request — in cURL, JavaScript, and Python.

cURL
curl -X POST https://api.aftersolves.com/v1/points/add \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "CUS00001",
    "points": 100,
    "reason": "Purchase"
  }'
JavaScript
const response = await fetch('https://api.aftersolves.com/v1/points/add', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    customer_id: 'CUS00001',
    points: 100,
    reason: 'Purchase'
  })
});

const data = await response.json();
console.log(data);
Python
import requests

response = requests.post(
    'https://api.aftersolves.com/v1/points/add',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'customer_id': 'CUS00001',
        'points': 100,
        'reason': 'Purchase'
    }
)

print(response.json())

Ready to start building?

Read the full API reference and integration guides at our documentation portal.