← Resources

Developer Reference

Claim Approvals Webhook Reference

UnityTrip can notify your systems in real time as claims move through their lifecycle. When an event you've subscribed to occurs, UnityTrip sends an HTTP request to your configured endpoint with a JSON payload describing what happened. This document describes each event type and the structure of its payload so you can build and validate your receiving integration.

Delivery basics

  • Method: POST
  • Content-Type: application/json
  • Body: a single JSON object per event.
  • Endpoint: the Webhook URL you configure in Ops Manager (Webhooks).
  • A webhook fires only for the event types selected in its configuration.
  • Always respond with a 2xx status code to acknowledge receipt. Non-2xx responses may be treated as failed deliveries.

Common envelope

Every event shares the same top-level structure. The data object carries fields specific to each event type, while the remaining fields are common to all.

FieldTypeDescription
deliveryIdstring (UUID)Unique ID for this individual delivery. Use it to detect and discard duplicates.
claimIdstring (UUID)Internal unique identifier of the claim.
claimIdentifierstringHuman-readable claim reference (e.g. CLM-01533).
eventTypestringThe event name. Determines the shape of data.
timestampstring (ISO 8601)When the event was generated.
dataobjectEvent-specific metadata. See each event below.
costCenterobjectThe cost centre associated with the claim.
costCenter.idstring (UUID)Internal cost centre identifier.
costCenter.namestringDisplay name of the cost centre.
costCenter.identifierstringShort code for the cost centre (e.g. NEIL1).
fundobjectThe fund associated with the claim.
fund.idstring (UUID)Internal fund identifier.
fund.namestringDisplay name of the fund.
requestTitlestringTitle given to the request.
tripReasonstringStated reason for the trip (e.g. Business).
requestDescriptionstringFree-text description of the request.
linkstring (URL)Deep link to the claim in the UnityTrip web app.

Common data fields

These fields appear within data across most event types:

FieldTypeDescription
$typeintegerInternal discriminator identifying the event payload type.
timestampstring (ISO 8601)When the underlying action occurred.
emailstring | nullEmail of the user associated with the action, when applicable. May be null for system-initiated actions.
publishedAtstring (ISO 8601)When the event was published to the delivery queue.
outOfSyncReasonstring | nullReason the claim was flagged out of sync, if any. Empty string or null when none.

Event-specific data fields are listed under each event below.


ClaimCreatedEvent

Fired when a new claim is created.

Example payload

{
  "deliveryId": "8c7b97c2-6cbe-4ceb-9bee-93cb1fcf8bb9",
  "claimId": "db9adf7d-1522-45ad-ac61-b789a2156267",
  "claimIdentifier": "CLM-01533",
  "eventType": "ClaimCreatedEvent",
  "timestamp": "2026-06-02T01:12:15.9707421+00:00",
  "data": {
    "$type": 7,
    "timestamp": "2026-06-02T01:12:13.9291571+00:00",
    "email": "[email protected]",
    "publishedAt": "2026-06-02T01:12:14.5512303+00:00"
  },
  "costCenter": {
    "id": "4beda99c-9efd-4b51-ae32-8fcc1b0b48b2",
    "name": "Example Cost Centre",
    "identifier": "NEIL1"
  },
  "fund": {
    "id": "50ba2af9-40f7-41b5-8e10-1a8ba774f746",
    "name": "Training"
  },
  "requestTitle": "Example request",
  "tripReason": "Business",
  "requestDescription": "NEIL1 - Training",
  "link": "https://app.unitytrip.app/claims/db9adf7d-1522-45ad-ac61-b789a2156267"
}

data fields

Uses the common envelope and common data fields. $type is 7.


ClaimApprovedEvent

Fired when a claim is approved.

Example payload

{
  "deliveryId": "8ab890dc-95d7-47f8-b69d-573ed1831ffb",
  "claimId": "db9adf7d-1522-45ad-ac61-b789a2156267",
  "claimIdentifier": "CLM-01533",
  "eventType": "ClaimApprovedEvent",
  "timestamp": "2026-06-02T01:21:07.3115601+00:00",
  "data": {
    "$type": 1,
    "outOfSyncReason": "",
    "timestamp": "2026-06-02T01:21:05.7020226+00:00",
    "email": "[email protected]",
    "publishedAt": "2026-06-02T01:21:05.8547919+00:00"
  },
  "costCenter": {
    "id": "4beda99c-9efd-4b51-ae32-8fcc1b0b48b2",
    "name": "Example Cost Centre",
    "identifier": "NEIL1"
  },
  "fund": {
    "id": "50ba2af9-40f7-41b5-8e10-1a8ba774f746",
    "name": "Training"
  },
  "requestTitle": "Example request",
  "tripReason": "Business",
  "requestDescription": "NEIL1 - Training",
  "link": "https://app.unitytrip.app/claims/db9adf7d-1522-45ad-ac61-b789a2156267"
}

data fields

Uses the common envelope and common data fields. $type is 1.

FieldTypeDescription
outOfSyncReasonstring | nullReason the claim was out of sync, if any e.g., an admin chose to override and cancel a claim.

ClaimUpdatedEvent

Fired when an existing claim is updated.

Example payload

{
  "deliveryId": "54d93a54-a99e-411e-9a9c-19849daaf9b2",
  "claimId": "75da7441-5a94-43cf-af42-1f9ee060533c",
  "claimIdentifier": "CLM-01458",
  "eventType": "ClaimUpdatedEvent",
  "timestamp": "2026-06-02T01:24:10.4166107+00:00",
  "data": {
    "$type": 6,
    "reason": "Clarification change made2",
    "timestamp": "2026-06-02T01:24:10.3362989+00:00",
    "email": null,
    "publishedAt": "2026-06-02T01:24:10.3746569+00:00"
  },
  "costCenter": {
    "id": "1c143e48-3335-4b88-90d3-721ff20f62c5",
    "name": "Example Cost Centre",
    "identifier": "NEIL1"
  },
  "fund": {
    "id": "50ba2af9-40f7-41b5-8e10-1a8ba774f746",
    "name": "Training"
  },
  "requestTitle": "Example request",
  "tripReason": "Business",
  "requestDescription": "NEIL1 - Training",
  "link": "https://app.unitytrip.app/claims/75da7441-5a94-43cf-af42-1f9ee060533c"
}

data fields

Uses the common envelope and common data fields. $type is 6.

FieldTypeDescription
reasonstringReason given for the update.

ClaimRejectedEvent

Fired when a claim is rejected.

Example payload

{
  "deliveryId": "ba4592d2-3c9e-4b60-9bd9-4ffef38159cb",
  "claimId": "7d2e71d0-b8eb-4956-9437-3e4be5c646ff",
  "claimIdentifier": "CLM-01462",
  "eventType": "ClaimRejectedEvent",
  "timestamp": "2026-06-02T01:26:32.5960592+00:00",
  "data": {
    "$type": 2,
    "reason": "",
    "outOfSyncReason": null,
    "timestamp": "2026-06-02T01:26:32.4997626+00:00",
    "email": null,
    "publishedAt": "2026-06-02T01:26:32.5627479+00:00"
  },
  "costCenter": {
    "id": "1c143e48-3335-4b88-90d3-721ff20f62c5",
    "name": "Example Cost Centre",
    "identifier": "NEIL1"
  },
  "fund": {
    "id": "50ba2af9-40f7-41b5-8e10-1a8ba774f746",
    "name": "Training"
  },
  "requestTitle": "Example request",
  "tripReason": "Business",
  "requestDescription": "NEIL1 - Training",
  "link": "https://app.unitytrip.app/claims/7d2e71d0-b8eb-4956-9437-3e4be5c646ff"
}

data fields

Uses the common envelope and common data fields. $type is 2.

FieldTypeDescription
reasonstringReason given for the rejection. May be an empty string.
outOfSyncReasonstring | nullReason the claim was out of sync, if any e.g., an admin chose to override and cancel a claim.

ClaimClosedEvent

Fired when a claim is closed.

Example payload

{
  "deliveryId": "ad84ae04-c2fb-49fb-901c-7f8fecacfada",
  "claimId": "b8fd7e64-5789-42bc-ae5c-087ee3812eb3",
  "claimIdentifier": "CLM-01532",
  "eventType": "ClaimClosedEvent",
  "timestamp": "2026-06-02T01:09:40.879154+00:00",
  "data": {
    "$type": 8,
    "reason": "Closed by admin",
    "byAdmin": true,
    "timestamp": "2026-06-02T01:09:39.777797+00:00",
    "email": null,
    "publishedAt": "2026-06-02T01:09:39.8600662+00:00"
  },
  "costCenter": {
    "id": "4beda99c-9efd-4b51-ae32-8fcc1b0b48b2",
    "name": "Example Cost Centre",
    "identifier": "NEIL1"
  },
  "fund": {
    "id": "50ba2af9-40f7-41b5-8e10-1a8ba774f746",
    "name": "Training"
  },
  "requestTitle": "Example request",
  "tripReason": "Business",
  "requestDescription": "NEIL1 - Training",
  "link": "https://app.unitytrip.app/claims/b8fd7e64-5789-42bc-ae5c-087ee3812eb3"
}

data fields

Uses the common envelope and common data fields. $type is 8.

FieldTypeDescription
reasonstringReason the claim was closed.
byAdminbooleantrue if the claim was closed by an administrator.

ClaimRevisionCreated

Fired when a revision of a claim is created.

Example payload

{
  "deliveryId": "182967b4-f015-4f0b-b1b9-67fb3c15cef0",
  "claimId": "db9adf7d-1522-45ad-ac61-b789a2156267",
  "claimIdentifier": "CLM-01533",
  "eventType": "ClaimRevisionCreated",
  "timestamp": "2026-06-02T01:26:05.8002028+00:00",
  "data": {
    "$type": 10,
    "reason": "2 days testing of change",
    "version": 1,
    "outOfSyncReason": null,
    "timestamp": "2026-06-02T01:26:05.7511428+00:00",
    "email": null,
    "publishedAt": "2026-06-02T01:26:05.778295+00:00"
  },
  "costCenter": {
    "id": "4beda99c-9efd-4b51-ae32-8fcc1b0b48b2",
    "name": "Example Cost Centre",
    "identifier": "NEIL1"
  },
  "fund": {
    "id": "50ba2af9-40f7-41b5-8e10-1a8ba774f746",
    "name": "Training"
  },
  "requestTitle": "Example request",
  "tripReason": "Business",
  "requestDescription": "NEIL1 - Training",
  "link": "https://app.unitytrip.app/claims/db9adf7d-1522-45ad-ac61-b789a2156267"
}

data fields

Uses the common envelope and common data fields. $type is 10.

FieldTypeDescription
reasonstringReason given for the revision.
versionintegerVersion number of the revision.
outOfSyncReasonstring | nullReason the claim was out of sync, if any e.g., an admin chose to override and cancel a claim.

ClaimRevisionApprovedEvent

Fired when a claim revision is approved.

Example payload

{
  "deliveryId": "c2fd953c-0038-496a-a0ad-4beb36df4a5a",
  "claimId": "db9adf7d-1522-45ad-ac61-b789a2156267",
  "claimIdentifier": "CLM-01533",
  "eventType": "ClaimRevisionApprovedEvent",
  "timestamp": "2026-06-02T01:28:24.2506214+00:00",
  "data": {
    "$type": 14,
    "version": 1,
    "outOfSyncReason": "",
    "timestamp": "2026-06-02T01:28:24.1943104+00:00",
    "email": "[email protected]",
    "publishedAt": "2026-06-02T01:28:24.2195565+00:00"
  },
  "costCenter": {
    "id": "4beda99c-9efd-4b51-ae32-8fcc1b0b48b2",
    "name": "Example Cost Centre",
    "identifier": "NEIL1"
  },
  "fund": {
    "id": "50ba2af9-40f7-41b5-8e10-1a8ba774f746",
    "name": "Training"
  },
  "requestTitle": "Example request",
  "tripReason": "Business",
  "requestDescription": "NEIL1 - Training",
  "link": "https://app.unitytrip.app/claims/db9adf7d-1522-45ad-ac61-b789a2156267"
}

data fields

Uses the common envelope and common data fields. $type is 14.

FieldTypeDescription
versionintegerVersion number of the approved revision.
outOfSyncReasonstring | nullReason the claim was out of sync, if any e.g., an admin chose to override and cancel a claim.

Quick reference: event types and $type values

Event type$typeDescription
ClaimCreatedEvent7A new claim is created.
ClaimApprovedEvent1A claim is approved.
ClaimUpdatedEvent6An existing claim is updated.
ClaimRejectedEvent2A claim is rejected.
ClaimClosedEvent8A claim is closed.
ClaimRevisionCreated10A revision of a claim is created.
ClaimRevisionApprovedEvent14A claim revision is approved.
Note: Always switch on the eventType string rather than the numeric $type discriminator, as $type is an internal value subject to change.

Example payloads above use placeholder emails, names, titles, and URLs. Real payloads will contain your organisation's actual data.