Skip to main content
Webhooks let your system receive real-time updates from Alvys when business events occur. Instead of polling the API, Alvys sends an HTTPS POST request to your configured endpoint whenever a subscribed event is triggered. A webhook subscription covers one Subsidiary, several Subsidiaries, or every Subsidiary in the tenant. Events are delivered only within the Subsidiary scope the subscription covers.
Webhooks are currently available by request. To enable this functionality for your account, contact your Customer Success Manager or Implementation Manager.

How it works

  1. Subscribe — create a webhook with an HTTPS endpoint URL and at least one subscribed event, either in the dashboard (Settings → Connections → Webhooks) or via the Create webhook endpoint.
  2. Verify ownership — when you verify the webhook, Alvys sends a webhook.verification challenge to your endpoint. Your endpoint echoes the challenge back to prove ownership. See Webhook Lifecycle & Configuration.
  3. Receive events — Alvys delivers each subscribed event as a signed HTTPS POST request to your endpoint.
  4. Validate and acknowledge — your endpoint verifies the HMAC-SHA256 signature, deduplicates on the event ID, and returns a 2xx response promptly.
  5. Retries — failed deliveries are retried automatically. After 10 consecutive failed events, the webhook is disabled automatically.
All deliveries:
  • Use HTTPS (TLS 1.2+)
  • Are signed using HMAC-SHA256
  • Follow an at-least-once delivery model
  • Are retried automatically on transient failure
  • Are disabled automatically after repeated delivery failures
To integrate successfully, your endpoint must verify signatures, handle retries safely, and implement idempotency.

Which events reach your subscription

A subscription records a set of Subsidiaries, and it receives an event only when the record the event is about belongs to one of them. When you create a webhook, send exactly one of SubsidiaryIds (the Subsidiaries the subscription covers), AllSubsidiaries set to true (every Subsidiary in the tenant), or the deprecated single-value SubsidiaryId. Sending none or more than one is rejected with Exactly one of SubsidiaryIds, AllSubsidiaries or SubsidiaryId must be provided. The schema lists AllSubsidiaries as required; send false with SubsidiaryIds or SubsidiaryId (false does not count as a second choice). The schema also marks request bodies as closed, but on update the subsidiary fields are ignored rather than rejected. An empty SubsidiaryIds list is rejected with SubsidiaryIds must contain at least one subsidiary, and a blank entry in the list with SubsidiaryIds cannot contain empty values. AllSubsidiaries is rejected for a credential scoped to specific subsidiaries. A webhook’s Subsidiaries are set at creation and cannot be changed on update: PUT /api/p/v1.0/webhooks/{id} ignores any SubsidiaryIds, AllSubsidiaries or SubsidiaryId in the body. To change coverage, create a new webhook and delete the old one. On the response, SubsidiaryId is null (omitted from the JSON) when the subscription covers several Subsidiaries or all of them, so read SubsidiaryIds and AllSubsidiaries instead.
A credential scoped to specific Subsidiaries sees only subscriptions that name Subsidiaries within its scope. Subscriptions that cover every Subsidiary, or that name any Subsidiary outside the scope, are hidden from the list and return 404 on get, update, and delete. Creating a subscription with a Subsidiary outside the scope, or one that does not exist, returns 400 with detail set to Subsidiary '{id}' not found (apostrophes are HTML-encoded).
Carrier documents are the one exception: a carrier carries no Subsidiary on the broker side, so carrier.document.* events are delivered to every subscription in the tenant.
Document and tender events were previously delivered to every subscription in the tenant regardless of Subsidiary. They now follow the table above. If your integration filtered these events by Subsidiary itself, that filtering is now redundant but harmless; no action is required. If it relied on receiving another Subsidiary’s document or tender events, it will stop receiving them.
Where the Subsidiary of a record cannot be determined, the event is delivered to every subscription in the tenant rather than withheld.

Event types

The authoritative list of valid event-type strings for your account is returned by Get event types (GET /api/p/v1.0/webhooks/event-types). load.changed and trip.changed events carry the full current snapshot of the record plus an optional data.diff node describing what changed — and, if you opt in, what the values were before. See Change Diffs (data.diff).

Anatomy of a delivery

When a subscribed event occurs, Alvys sends an HTTPS POST request to your configured endpoint. Headers:
  • X-Alvys-Event — the event type.
  • X-Alvys-Event-Id — unique identifier for the event. Remains the same across retry attempts; use it for idempotency.
  • X-Alvys-Timestamp — Unix timestamp (seconds) used for signature generation.
  • X-Alvys-Signature — HMAC-SHA256 signature (see Verifying signatures).
  • X-Alvys-Attempt — the delivery attempt number (starts at 1, increments on each retry).
Every event delivered for a subscribed event type uses the same envelope:
Every event delivered for a subscribed event type carries etag, identifying the version of the record the payload was built from. Tender events use version: "v2"; all other events use "v1". Every event delivered for a subscribed event type also carries a top-level subsidiaryId, the Subsidiary of the record the event is about. A subscription that covers several Subsidiaries receives events from all of them, so read subsidiaryId to tell which Subsidiary a delivery belongs to instead of inferring it from the subscription. subsidiaryId is always present. It is null when the record has no Subsidiary or Alvys cannot determine it; such an event is delivered to every subscription in the tenant. The payload that Test webhook delivery sends (webhook.test) and the webhook.verification challenge do not include subsidiaryId or etag. Treat the envelope id as an opaque string and use it only to deduplicate. Its form differs by event group, and it can change. Event payloads use camelCase property names (id, type, timestamp, version, etag, data, subsidiaryId), and fields with a null value are omitted. There are two exceptions: subsidiaryId is always present, and is null when the record has no Subsidiary; and data.diff.previousAttributes sends null for a field that had no value before the write. The management API (/api/p/v1.0/webhooks) and the REST endpoints use PascalCase instead. The data object contains event-specific fields. For load and trip events it carries the full current snapshot of the record. The snapshot has the same fields as the corresponding GET endpoint, in camelCase, so you can apply the current state directly without a follow-up request. See Event Delivery & Reliability for the full request format.

Verifying signatures

Every event delivery is signed so you can confirm it came from Alvys and was not tampered with. Verification requests (webhook.verification) are not signed. The X-Alvys-Signature header has the format t={timestamp},v1={signature}, where the signature is an HMAC-SHA256 hash of:
To validate a delivery:
  1. Extract the timestamp and signature value(s) from the X-Alvys-Signature header.
  2. Construct the signed payload from the timestamp, event ID, and the exact raw request body — do not reformat or reserialize the JSON.
  3. Compute an HMAC-SHA256 hash using your webhook’s signing secret.
  4. Compare against the provided signature(s) using constant-time comparison.
  5. Return 401 Unauthorized and do not process the event if no match is found.
During secret rotation the header carries two signatures (v1 for the new secret, v0 for the previous one) — accept either during the transition window. Rejecting requests whose timestamp is more than 5 minutes old reduces replay risk. Full details, including transport requirements and secret management: Security & Signature Verification.

Delivery guarantees

A delivery succeeds when your endpoint returns HTTP 200–299. Other 4xx responses (except 408 and 429) are permanent failures and are not retried. A successful delivery resets the consecutive-failure counter; once 10 distinct events fail consecutively, the webhook is disabled and must be manually re-enabled.
Acknowledge the event promptly after validation and persist processing asynchronously. This avoids timeouts, unnecessary retries, and accidental auto-disable.
See Event Delivery & Reliability for the complete retry, timeout, and ordering semantics.

Managing webhooks

Webhooks can be managed from the dashboard (Settings → Connections → Webhooks) or entirely via the API: Configuration details — states, endpoint verification, updating subscriptions, and the Include previous values option — are covered in Webhook Lifecycle & Configuration.

Monitoring and troubleshooting

Every delivery attempt is logged and queryable: Use Test webhook delivery to send a signed test payload to your endpoint and verify your signature logic end to end.

Best practices

  • Verify every signature before executing any business logic; return 401 on failure.
  • Deduplicate on X-Alvys-Event-Id — delivery is at-least-once, so duplicates are expected.
  • Acknowledge fast — return 2xx after validation and process asynchronously to stay inside the 30-second window.
  • Don’t rely on ordering — tolerate retries, duplicates, and timing variations.
  • Use data.diff to route on what changed, and tolerate change kinds you don’t recognize. An empty changes array can still carry fields that come from a related record.
  • Support dual signatures (v1 and v0) so secret rotation never interrupts your integration.
  • Watch health metrics and delivery logs so you catch failures before the auto-disable threshold.

Next steps

Webhook Lifecycle & Configuration

Create, verify, update, and manage webhook subscriptions per Subsidiary.

Security & Signature Verification

Validate HMAC-SHA256 signatures and handle secret rotation.

Event Delivery & Reliability

At-least-once delivery, retries, timeouts, and auto-disable semantics.

Change Diffs (data.diff)

React to exactly what changed with changes and previousAttributes.