API ReferenceWebhooksGet a signed sample event (no delivery)
Get a signed sample event (no delivery)
GET
/api/v1/webhooks/{webhook_id}/sampleReturns a fully-signed sample webhook event WITHOUT delivering it anywhere. The killer feature for integrators on private staging / localhost / CI that can't receive inbound webhooks: feed the returned raw_body + X-Merdi-Signature straight into your receiver's verification code and confirm — before production — that your HMAC check accepts a real iMile signature. IMPORTANT: verify against raw_body exactly as returned, NOT a re-serialized object (JSON key order / whitespace changes the HMAC input).
Parameters
webhook_id*
event_type
Event type of the sample. Any concrete event type (never
*); defaults to shipment.delivered. shipment.creation_failed returns the post-rollback failure payload, including the customer reference, original request ID, error code and messages, and wallet hold status. Other shipment.* types return a common shipment sample. pickup.* and self_dropoff.* return their corresponding payload shapes, with simulated: true for test-mode endpoints. Unsupported event types return 400.Responses
Success body
{ "status": 200, "message": "OK", "data": { "headers": { "Content-Type": "<Content-Type>", "X-Merdi-Event-Id": "<X-Merdi-Event-Id>", "X-Merdi-Event-Type": "<X-Merdi-Event-Type>", "X-Merdi-Signature": "<X-Merdi-Signature>" }, "payload": {}, "raw_body": "<raw_body>" } }
Returned object
| Field | Type | Sample |
|---|---|---|
| status | number | 200 |
| message | string | OK |
| data | object | {3 keys} |