Developers overview
CXS Loyalty has a public REST API and outbound webhooks. Your own systems can use them to read and change loyalty data and react to loyalty events as they happen. These pages are written for developers.
In short
- Manage API access and webhooks in the app under Settings → Developers.
- Create a private client, swap its ID and secret for a one-hour access token, then call
/public/v1. - Add a webhook endpoint to hear about changes without polling.
Before you start#
- Access to the CXS Loyalty app in your Shopify admin, to open Settings → Developers.
- A server or script that can make HTTPS requests to the API.
- For webhooks: an HTTPS endpoint on the public internet.
What you can build#
- REST API: look up and enrol customers, read point balances and history, add or remove points, list rewards and redeem them for a customer, read VIP tier progress and referrals.
- Outbound webhooks: get a signed HTTPS request on your server when a customer joins, earns, spends or loses points, changes VIP tier or completes a referral.
- Connected apps: automation tools such as Zapier and Make use the same API and webhooks. See Zapier and Make.
Where to manage it#
In the app, go to Settings → Developers. The page has three cards:
- Private clients: give your own systems a key to the loyalty API. Click Create private client (or Manage private clients once you have one).
- Webhooks: get a request on your server when points, rewards or tiers change. Click Set up webhooks (or Manage webhooks).
- Connected apps: apps such as Zapier and Make that a staff member allowed to use your loyalty program. You can Disconnect any of them here.
How it fits together#
- Create a private client and pick the permissions your system needs.
- Exchange the client ID and secret for an access token (valid for one hour).
- Call the API at
/public/v1withAuthorization: Bearer <token>. - Optionally add a webhook endpoint so your server hears about changes without polling.
The token decides which store you are working with, so no endpoint takes a shop parameter.
Developer pages#
- API clients & authentication: create a private client, choose permissions, get and revoke access tokens, and how third-party apps connect.
- API reference: base URL, rate limits, errors, pagination and every endpoint with examples.
- Webhooks: add an endpoint, the event topics, verifying signatures, retries, tests and replays.