API Reference

circle-check

Webhook management

List Webhooks

get

Get a list of all registered webhooks for your shop.

Header parameters
X-Joy-Loyalty-App-KeystringRequired

Your Joy app key from settings

X-Joy-Loyalty-Secret-KeystringRequired

Your Joy secret key from settings

Responses
chevron-right
200

Success

application/json
get
/webhooks

Get Webhook by ID

get

Retrieve details of a specific webhook.

Path parameters
idstringRequired

Webhook ID

Example: webhook_abc123
Header parameters
X-Joy-Loyalty-App-KeystringRequired

Your Joy app key from settings

X-Joy-Loyalty-Secret-KeystringRequired

Your Joy secret key from settings

Responses
chevron-right
200

Success

application/json
get
/webhooks/{id}

Create Webhook

post

Register a new webhook endpoint for a specific topic.

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 · enumRequired

One of the supported webhook topics

Example: points/earnedPossible values:
urlstring · uriRequired

HTTPS URL endpoint to receive webhook notifications

Example: https://your-server.com/webhook/points
Responses
chevron-right
200

Webhook created successfully

application/json
post
/webhooks

Update Webhook

put

Update an existing webhook (enable/disable or change URL).

Path parameters
idstringRequired

Webhook ID

Example: webhook_abc123
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
urlstring · uriOptional

New webhook URL

Example: https://new-server.com/webhook/points
isEnabledbooleanOptional

Enable or disable the webhook

Example: false
Responses
chevron-right
200

Webhook updated successfully

application/json
put
/webhooks/{id}

Delete Webhook

delete

Remove a webhook registration.

Path parameters
idstringRequired

Webhook ID

Example: webhook_abc123
Header parameters
X-Joy-Loyalty-App-KeystringRequired

Your Joy app key from settings

X-Joy-Loyalty-Secret-KeystringRequired

Your Joy secret key from settings

Responses
chevron-right
200

Webhook deleted successfully

application/json
delete
/webhooks/{id}

Error handling

HTTP status codes

Code
Description
Common Scenarios

200

Success

Request completed successfully

400

Bad Request

Invalid parameters or request data

401

Unauthorized

Missing or invalid authentication

404

Not Found

Webhook does not exist

500

Internal Server Error

Unexpected server error

Common error codes

Error Message
Cause
Resolution

Invalid post data

Malformed request body or missing required fields

Check request format and required parameters

Webhook is already existing with the same topic and url

Duplicate webhook registration

Use a different URL or topic combination

Unauthorized

Invalid or missing authentication headers

Verify your app key and secret key

Last updated