Skip to main content

Webhook Testing

2 API calls in this section.

Test Webhook URL​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions / Webhook Testing
POST/webhooks/test

Tests 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

ParameterTypeDescription
languagestring

Response language

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
webhook_urlstring—
secret_header_keystring—
secret_header_valuestring—
Staging
Request
curl
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​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions / Webhook Testing
POST/webhooks/receive-test

Test 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

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

X-Webhook-IDstring

Example: webhook-delivery-log-uuid

X-Webhook-Timestampstring

Example: {{$isoTimestamp}}

Body parameters

ParameterTypeDescription
event_typestring—
modulestring—
tenant_idstring—
dataobject—
data.statusstring—
data.delivery_idstring—
data.delivery_codestring—
data.customer_idstring—
data.triggerstring—
data.update_typesarray<string>—
data.idstring—
data.codAmountnumber—
Show 9 more body fields

Additional body parameters

ParameterTypeDescription
data.pricenumber—
data.paymentSidestring—
data.paymentMethodstring—
data.previousobject—
data.previous.statusstring—
data.previous.codAmountnumber—
data.previous.pricenumber—
data.previous.paymentSidestring—
data.previous.paymentMethodstring—
Staging
Request
curl
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

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook received successfully",4  "timestamp": "2026-07-18T12:50:31.100Z"5}