Requests
Webhook data is sent as JSON in the POST request body to your configured endpoints.
The JSON payload has three root keys:
object
represents the object that triggered the event (an affiliate, campaign, conversion, commission, etc.). The object's JSON structure will be identical to the structure returned by the REST API endpoints for that object type.event
contains metadata about the webhook event.request
contains metadata about this specific request to your endpoint.
Example payload
Webhook payloads sent to your endpoint contain these top-level items:
Key | Description |
| A JSON representation of the record (Affiliate, Commission, etc) that triggered the event. |
| Metadata about the event itself. |
| Metadata about this specific request. |
Below is an example of the JSON that would be posted to your endpoint for the affiliate.confirmed
event, i.e. when an affiliate has successfully confirmed their email address.
Responses, Errors, and Retries
When your endpoint receives and successfully processes a webhook event, your web server should return a 200
response code.
Any response code from your endpoint other than a 200
will be interpreted as a failure.
If a webhook fails, Rewardful will continue to attempt delivery over the next 3 days using exponential backoff. This means if the failures continue, we'll wait longer and longer between retries, before finally giving up after 3 days.
Last updated