Before you begin
- Appstle Memberships is installed on your Shopify store.
- The store’s Appstle plan includes API access. Without it, every request in this guide returns
401. - You can open API Access in the app: you’re the store owner, staff with Full access, or staff the owner has authorized.
Step 1 — Create an API key
1
Open API Access
In your Appstle admin panel, go to More → General Settings → API Access.
2
Create a key
Click Create API key. Name it
Quickstart Test, choose Read only under Permission (this guide only reads data), and click Create.3
Copy the key
Your key is shown only once. Copy it now — you cannot retrieve the full value again after leaving this screen.Your key will look like this:
Step 2 — List membership contracts
Use your new key to list the store’s membership contracts. The key identifies the store, so you don’t pass a shop domain.x-total-count response header:
cancelledOn, pausedOn and contractAmount. See the API reference for all of them. Page through the list with page (starting at 0) and size (default 20).
A store with no matching contracts returns an empty array (
[]) and x-total-count: 0. Create a test membership in your store first if you see this on a new store.Step 3 — Check whether a customer is an active member
To check a customer before you grant access to gated content, filter the same endpoint by the customer’s email address andstatus=ACTIVE:
customerName matches any part of a name or email, so a search for taylor@example.com also returns mtaylor@example.com. Treat the customer as an active member only if a returned contract’s customerEmail equals the address you searched for, ignoring case. If one does, grant access to the gated content. If none does, send the customer to your membership plans.
Troubleshooting
403 Forbidden
403 Forbidden
A Read only key gets
403 on every write request and on the few GET endpoints listed under Key permissions. Create a key with the Read & Write permission. Both calls in this guide work with either 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.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.Empty array
Empty array
No contract matches your filters. Remove
status and customerName to list every contract, or create a test membership in your store.429 Too Many Requests
429 Too Many Requests
The store went over the per-minute rate limit, or more than five
PUT calls were in progress at once. The response has no Retry-After header, so retry with exponential backoff, never immediately. Rate limits shows the response for each case.Next steps
Integration guide
Check active members, list plans, and pause, resume or cancel a membership.
Authentication
Key permissions, partner tokens and every authentication error.
Membership contract list
Every filter and response field of the endpoint you just called.
Webhooks
Receive real-time events when memberships are created, cancelled, or renewed.