Events method
POST /v1/Webhooks
Create a new webhook
Uri parameters
None
Body parameters
| Name | Description | Type | Additional description |
|---|---|---|---|
| eventValue | The value that the webhook triggers on | String | Required |
| eventValueType | A number indicating the type of value the webhook triggers on. See Event Value Types | Integer | Required |
| url | The full URL our service calls when all conditions are satisfied. Must be a POST endpoint. | String | Required |
| customHeaders | A Dictionary containing any custom headers that should be appended to the webhook post request. | String | |
| secret | A custom secret we will append to the post request that you can use to verify the correctness of the call. | String | Required |
| expires | The date and time the webhook will expire. Default is two months. | String |
Request sample:
{
"eventValue": "370726545000000170",
"eventValueType": 1,
"url": "https://example.com/MyWebhookEndpoint",
"customHeaders": "{\"CustomHeader1\":\"CustomHeaderValue1\",\"CustomHeader2\":\"CustomHeaderValue2\"}",
"secret": "Custom secret used for personal validation",
"expires": "2026-01-28T00:04:56.6346244+01:00"
}
Response sample:
200
{
"uuid": "76c8b8d4-f1dc-49a7-b21c-f40c6ee035de",
"eventValue": "370726545000000170",
"eventValueType": 1,
"url": "https://example.com/MyWebhookEndpoint",
"customHeaders": "{\"CustomHeader1\":\"CustomHeaderValue1\",\"CustomHeader2\":\"CustomHeaderValue2\"}",
"secret": "Custom secret used for personal validation",
"expires": "2026-01-28T00:04:56.6346941+01:00"
}
400
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occured",
"state": 400,
"traceId": null,
"errors": {
"request": [
"The parcel number cannot be empty"
]
}
}
401
Access denied
403
Forbidden