Simulating Webhooks

Overview

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


Performing Simulations

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

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}'