Authentication
The API uses header-based authentication. Every request needs both headers:
X-Joy-Loyalty-App-Key: YOUR_APP_KEY
X-Joy-Loyalty-Secret-Key: YOUR_SECRET_KEYYou can retrieve these credentials from your Joy Loyalty app settings page in the Shopify admin.
Example
curl -X GET "https://api.joy.so/rest_api/v2/customers" \
-H "X-Joy-Loyalty-App-Key: YOUR_APP_KEY" \
-H "X-Joy-Loyalty-Secret-Key: YOUR_SECRET_KEY" \
-H "Content-Type: application/json"Authentication errors
| Status | Cause |
|---|---|
401 | Missing or invalid authentication |
403 | Read-only key (or private bot key) used for a non-GET request |
See Errors for every status and error code, and Best practices & security for how to store your keys.