Available APIs
Appstle Loyalty exposes two REST API surfaces. Pick the one that matches where your code runs:- Admin API — server-side, authenticated with
X-API-Key. For backend integrations, mobile apps, automation, and admin dashboards. Browse the full reference under Admin API in the sidebar. - Storefront API — customer-facing, accessed through Shopify App Proxy. For loyalty widgets and self-service portals on your storefront. Browse the full reference under Storefront API in the sidebar.
Which API should you use?
- Use the Admin API when…
- Use the Storefront API when…
- You are building a server-side integration (backend service, CRM connector, helpdesk plugin)
- You are building a mobile app (iOS or Android)
- You need to credit or debit points programmatically on behalf of merchants
- You want to run bulk operations or scheduled automation
- You are building an admin dashboard or reporting tool
- Your code runs anywhere outside a customer’s browser on the storefront
Admin API requests require an
X-API-Key header. Keys are created in the Appstle dashboard under More → API Integrations. Never expose keys in client-side code.Key features
Point management
Credit and debit points for purchases, reviews, social actions, birthdays, and custom activities. Access full transaction history. Points earned automatically need the Appstle Loyalty app embed: see Orders earn points automatically.
VIP tiers
Define spend or points thresholds for Bronze, Silver, Gold, Platinum, or any tier structure. Automatically promote and demote customers.
Referral program
Generate unique referral links, track accepted referrals, and reward both the referrer and the referred customer.
Store credits
Issue monetary store credit as an alternative to discount codes. Balances are tracked separately from loyalty points.
Rewards & discounts
Convert points into Shopify discount codes. Validate codes and set a reward’s status from your own checkout flow.
Automation
Receive signed webhooks when customers join, earn or redeem points, reach a VIP tier, or earn a referral reward. Use Shopify Flow triggers and actions to award points, store credit, and VIP tiers. Build Klaviyo flows on the events Appstle sends in place of its loyalty emails.
Key concepts
Points lifecycle
Points lifecycle
Points move through three states: pending (earned but awaiting approval), available (redeemable), and credited (total lifetime points earned). Your program configuration determines whether points are credited immediately or held in a pending state for review.
VIP tiers
VIP tiers
Tiers are assigned automatically when a customer crosses a configured spend or points threshold. Each tier can carry a name tag and any number of additional Shopify customer tags. Tags are swapped automatically on tier changes — there is always at most one active tier per customer.
Referrals
Referrals
Every enrolled customer receives a unique referral link. The merchant’s referral settings decide when each customer is rewarded. With When referred friend accepts the invitation, both are rewarded as soon as the friend accepts. With the purchase-based options, both are rewarded after the friend’s qualifying purchase, unless the merchant chooses to reward one of them on acceptance instead. A reward can be points, a discount code or store credit. Referral relationships are recorded permanently as Shopify customer tags. See Referral links and tokens.
Store credits
Store credits
Store credits are a monetary balance separate from points. They are applied at checkout and tracked in
storeCreditBalance on the customer loyalty profile. Credits can be issued via the Admin API or through Shopify Flow.Partner integrations
Partner integrations
Third-party apps (helpdesks, CRMs, review platforms, email tools) can connect to Appstle Loyalty through the Partner Integration Framework. A partner that calls the Admin API gets a scoped
apst_ token for each merchant who approves the connection, with no manual key exchange. Merchants approve, review and disconnect partners under More → Partner Connections.Base URL
All Admin API endpoints use:HTTP status codes
All API responses use standard HTTP status codes.
On the Admin API, an unexpected server error returns
500 with Content-Type: application/problem+json. The body doesn’t say what failed:
PUT or POST, read the record back, because the change may have been saved before the error. For example, look for the transaction in point-transaction-history before you send add-points again. Don’t retry in a loop: an endpoint that keeps failing is rate limited. If the second try fails too, contact support@appstle.com with the store’s myshopify.com domain, the path and the time of the call.
On the Storefront API, a 500 comes back as Shopify’s HTML error page instead, and a path or method that no endpoint has returns 403, not 404 or 405. See Errors.
A missing or invalid API key returns 401 with this body in both cases:
Next steps
Authentication
Create API keys and learn how to authenticate every request.
Quickstart
Get your API key, make your first request, and add points in under five minutes.
Integration guide
Full walkthrough of every endpoint category with working curl examples.
Webhooks
Receive real-time notifications for points, tier changes, and referrals.
API changelog
Dated changes to the Admin API, Storefront API and Shopify Flow, with what to do about each.