Prerequisites
- An Appstle Loyalty plan that includes API access (see Authentication)
- Access to the Appstle admin panel
- A Shopify customer ID to test with (find one in your Shopify admin under Customers)
Step 1 — Get your API key
1
Open API Integrations
In your Appstle admin panel, go to More → API Integrations.
2
Create a key
In the API Keys section, click Create API key. Give it a name like
Quickstart test, keep the Read & write permission, then click Create.3
Copy the key
Copy the displayed key immediately. It is only shown once. Store it as an environment variable:
Step 2 — Retrieve customer loyalty data
CallGET /api/external/customer-loyalty with a Shopify customer ID in the customerId parameter. Your API key identifies the store. Replace 12345 with a real customer ID from your store.
curl
Step 3 — Add points to the customer
CallPOST /api/external/add-points to credit points. Include a note so the transaction is clearly labeled in the customer’s history.
curl
GET /api/external/customer-loyalty again and you will see availablePoints increased by 100.
Troubleshooting
403 Forbidden
403 Forbidden
A Read only key gets
403 on every write request, such as add-points in Step 3. Create a key with the Read & write permission. A 403 whose detail is Shop does not match the authenticated session means a shop value in the request isn’t the key’s store: drop the shop parameter, since your key already identifies the store. Authentication errors has the details.400 Bad Request
400 Bad Request
A
400 whose title is Customer not found using this customerID means the customer isn’t enrolled in the loyalty program, or the ID doesn’t belong to any customer in the store. Check the ID in Shopify admin, enroll the customer, then call the endpoint again. A customerId that isn’t a number, such as an email address or a gid:// ID, also returns 400. Use the number at the end of the customer’s page address in Shopify admin, or the last part of its gid:// ID, such as 1234567.404 Not Found or 405 Method Not Allowed
404 Not Found or 405 Method Not Allowed
The path or the method doesn’t match an endpoint. A
GET to a path that has no GET endpoint returns 404, and a POST, PUT or DELETE to a path that doesn’t take that method returns 405. Check the path and the method against the API reference.429 Too Many Requests
429 Too Many Requests
The request went over a rate limit. If the response has a
Retry-After header, the store has used its daily call allowance: wait that many seconds, until 00:00 UTC, before you call again. Otherwise, retry with exponential backoff. Rate limits shows the response for each of the three limits.Next steps
Integration guide
Every endpoint: point management, customer enrollment, rewards, store credits, and program configuration.
Webhooks
Receive real-time notifications for points earned, VIP tier changes, and referral completions.
Shopify Flow
Trigger loyalty actions from any Shopify Flow workflow without writing API code.