Overview

Webhooks events can be simulated to validate Webhooks are functioning correctly. To simulate a webhook event simply provide the webhook ID in the request path and identifier in the POST body. This action will lookup the object, modify the relative fields, and POST it to the remote endpoint associated with your webhook.

In order to receive a webhook, You must already be subscribed to said webhook before simulating it.

Performing Simulations

Webhook event simulations can be initiated through the REST API by performing the following request.

See our API Reference for a full description of the below call.

Update the body with related property, order related webhooks require order_id, offer related webhooks require offer_id, collection related webhooks require collection_id and merchant related webhooks require merchant_id.

Curl
curl -X POST https://sandbox-api.violet.io/v1/apps/{app_id}/webhooks/{webhook_id}/simulate \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json" \
-d '{"order_id": 9999}'