API Reference
Webhook management
Path parameters
idstringRequiredExample:
Webhook ID
webhook_abc123Header parameters
X-Joy-Loyalty-App-KeystringRequired
Your Joy app key from settings
X-Joy-Loyalty-Secret-KeystringRequired
Your Joy secret key from settings
Responses
200
Success
application/json
404
Webhook not found
application/json
get
/webhooks/{id}Header parameters
X-Joy-Loyalty-App-KeystringRequired
Your Joy app key from settings
X-Joy-Loyalty-Secret-KeystringRequired
Your Joy secret key from settings
Body
topicstring · enumRequiredExample:
One of the supported webhook topics
points/earnedPossible values: urlstring · uriRequiredExample:
HTTPS URL endpoint to receive webhook notifications
https://your-server.com/webhook/pointsResponses
200
Webhook created successfully
application/json
400
Bad Request
application/json
post
/webhooksPath parameters
idstringRequiredExample:
Webhook ID
webhook_abc123Header parameters
X-Joy-Loyalty-App-KeystringRequired
Your Joy app key from settings
X-Joy-Loyalty-Secret-KeystringRequired
Your Joy secret key from settings
Body
urlstring · uriOptionalExample:
New webhook URL
https://new-server.com/webhook/pointsisEnabledbooleanOptionalExample:
Enable or disable the webhook
falseResponses
200
Webhook updated successfully
application/json
404
Webhook not found
application/json
put
/webhooks/{id}Path parameters
idstringRequiredExample:
Webhook ID
webhook_abc123Header parameters
X-Joy-Loyalty-App-KeystringRequired
Your Joy app key from settings
X-Joy-Loyalty-Secret-KeystringRequired
Your Joy secret key from settings
Responses
200
Webhook deleted successfully
application/json
404
Webhook not found
application/json
delete
/webhooks/{id}Error handling
HTTP status codes
Code
Description
Common Scenarios
Common error codes
Error Message
Cause
Resolution
Last updated