Skip to Content
CerebrumDocs
GuidesAPI referenceTrust & security

Webhook Payload Deltas

Additional information on how an order has changed

Selected order-update notifications include metadata.delta, an array of JSON Patch-style operations with explicit before and after values. The notification remains compact; a delta is a change summary, not a full order or full result set.

When metadata is present

Deltas apply only to the order.updated events:

  • ORDER_STATUS_CHANGE
  • ORDER_SCORE_CHANGE
  • ORDER_CUSTOM_SCORE_CHANGE
  • ORDER_DISPUTE_RESOLVED

The meanings are distinct:

StateMeaning
metadata omittedThe event does not support deltas, or that emission path did not have a pre-update order snapshot.
metadata.delta is []A pre-update snapshot existed, but no fields in the mapped delta shape changed. Timestamp-only changes produce this state.
metadata.delta has entriesEach entry describes a change in the mapped order shape.

Neither metadata nor metadata.delta is nullable. An individual before or after value can be null when null is the actual mapped value.

For example, the direct score-update path can include a delta, while the ID-verification PDF-attachment path emits ORDER_SCORE_CHANGE without a pre-update snapshot and therefore without metadata.

Operation shape

Each entry has op, path, and independently optional before and after:

  • op is add, remove, replace, move, copy, or test in the transport type. The current diff implementation's documented examples use add, remove, and replace.
  • path is an RFC 6901 JSON Pointer. Escape ~ as ~0 and / as ~1.
  • before is read from the old mapped order and after from the new mapped order.

An undefined side disappears during JSON serialization. It is not converted to null. Consequently, an add normally has no before, and a remove normally has no after.

Synthetic fixtures

A status replacement:

{
  "metadata": {
    "delta": [
      {
        "op": "replace",
        "path": "/status",
        "before": "PENDING",
        "after": "COMPLETE"
      }
    ]
  }
}

An added score, with no before property:

{
  "metadata": {
    "delta": [
      {
        "op": "add",
        "path": "/score",
        "after": "NO_ALERTS"
      }
    ]
  }
}

A removed custom score, with no after property:

{
  "metadata": {
    "delta": [
      {
        "op": "remove",
        "path": "/customScore",
        "before": "Review-1"
      }
    ]
  }
}

No mapped changes despite a snapshot:

{
  "metadata": {
    "delta": []
  }
}

Compared data and redaction

The mapped order includes business fields such as status, score, customScore, alert, deliveryMethod, organizationId, additionalMetadata, postbackWebhookUrl, optOut, deviceType, captureMethod, and fileNumber. Relations, internal metadata, IP data, legacy parent organization data, and the timestamp-only fields createdAt, updatedAt, reportedAt, and reportCompletedAt are excluded.

reportableResults is reduced rather than copied in full. It includes searchType and alertsFound, plus reportStatus, case and charge IDs, and reportableCharges when present. Sensitive result details are not embedded in the delta.

{
  "metadata": {
    "delta": [
      {
        "op": "replace",
        "path": "/reportableResults",
        "before": null,
        "after": [
          {
            "searchType": "natcrim",
            "alertsFound": false
          },
          {
            "searchType": "county",
            "alertsFound": false
          }
        ]
      }
    ]
  }
}

Use the delta for efficient change handling, but retrieve the exact order when your workflow needs authoritative current state or expanded results. See the event catalog and payload schema.

On this page