Webhook Testing
2 API calls in this section.
Test Webhook URL
/webhooks/testTests if a webhook URL is valid and reachable. The endpoint must return a 2xx status code to be considered valid. You can provide optional secret_header_key and secret_header_value to test authentication.
Query parameters
| Parameter | Type | Description |
|---|---|---|
language | string | Response language Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
webhook_url | string | — |
secret_header_key | string | — |
secret_header_value | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/webhooks/test?language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "webhook_url": "https://example.com/webhook",6 "secret_header_key": "X-Webhook-Secret",7 "secret_header_value": "your-secret-value-here"8}'Response examples
No saved response example. Use Try it to inspect a staging response.
Receive Test Delivery Update Webhook
/webhooks/receive-testTest receiver and outbound contract example for delivery updates. OnDi keeps the existing order_update envelope and existing status, delivery_id, delivery_code, customer_id, and optional driver fields. trigger, update_types, current commercial values, id, and previous are additive. update_types is always an array and may contain StatusUpdate, CODUpdate, PriceUpdate, PaymentSideUpdate, and PaymentMethodUpdate. One delivery-row UPDATE produces at most one webhook and lists every tracked field changed by that statement. previous always contains the complete prior tracked snapshot. Receivers must inspect update_types instead of assuming every order_update is a status change. The real sender includes Content-Type, X-Webhook-ID, X-Webhook-Timestamp, and the subscription's configured secret header. The sender continues replacing outbound data.delivery_id with data.delivery_code. Any 2xx response is success; non-2xx responses are recorded as failed delivery attempts.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
X-Webhook-ID | string | Example: |
X-Webhook-Timestamp | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
event_type | string | — |
module | string | — |
tenant_id | string | — |
data | object | — |
data.status | string | — |
data.delivery_id | string | — |
data.delivery_code | string | — |
data.customer_id | string | — |
data.trigger | string | — |
data.update_types | array<string> | — |
data.id | string | — |
data.codAmount | number | — |
Show 9 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
data.price | number | — |
data.paymentSide | string | — |
data.paymentMethod | string | — |
data.previous | object | — |
data.previous.status | string | — |
data.previous.codAmount | number | — |
data.previous.price | number | — |
data.previous.paymentSide | string | — |
data.previous.paymentMethod | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/webhooks/receive-test" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --header "X-Webhook-ID: webhook-delivery-log-uuid" \5 --header "X-Webhook-Timestamp: ${_ISOTIMESTAMP}" \6 --data-raw '{7 "event_type": "order_update",8 "module": "delivery",9 "tenant_id": "tenant-uuid",10 "data": {11 "status": "delivered",12 "delivery_id": "1830",13 "delivery_code": "1830",14 "customer_id": "customer-uuid",15 "trigger": "Updated",16 "update_types": [17 "StatusUpdate",18 "CODUpdate",19 "PriceUpdate"20 ],21 "id": "1830",22 "codAmount": 5000,23 "price": 2500,24 "paymentSide": "sender",25 "paymentMethod": "wallet",26 "previous": {27 "status": "picked_up",28 "codAmount": 3000,29 "price": 2000,30 "paymentSide": "sender",31 "paymentMethod": "wallet"32 }33 }34}'Response examples
1{2 "success": true,3 "message": "Webhook received successfully",4 "timestamp": "2026-07-18T12:50:31.100Z"5}