Skip to main content

Delta - Overview

A Delta is a record of a new, deleted, or updated resource in the Incentify system. For example, if an Activity object was updated (ie; status changed by a user) on Incentify then there would be a Delta record to track that change event.

As described in the Syncing Changed Resources Guide the intention is that on an interval you would request the list of Deltas (resources which have changed) from a reference timestamp you supply based on that interval. This will return a list of 0 to n Delta resources which have been created or updated since that reference timestamp.

Methods​

The API supports the following methods for Delta resources:

  • GET - List
    • Get a list of changed resources since reference timestamp
  • POST - Consumed & Mapped
    • After updating a resource/object (based on a Delta change event), this allows you to set the "consumed at time" to "now" on that modified resource/object (as a way to ensure the data you've injested into your internal system matches the latest data on Incentify).

Resource Representation​

The following JSON structure shows the format of a Delta resource:

{
"resource_type": ENUM("activity", "comment", "document"),
"resource_id": integer,
"resource_internal_id": string,
"action": ENUM("create", "update", "delete"),
"timestamp": string (RFC 3339 Nano Format (to micro precision) - 2022-05-03T17:13:44.123Z),
"consumed_at": string (RFC 3339 Nano Format (to micro precision) - 2022-05-03T17:13:44.123Z)
}

Resource Properties​

The following table defines the properties that appear in this resource:

KeyTypeDefinition
resource_typeENUM("activity", "comment", "document")The Object type of the resource which has changed.
resource_idintegerThe ID of the Object.
resource_internal_idstringThe ID of the Object on your internal system.
actionENUM("create", "update", "delete")The action of the delta
timestampstringThe date and time that the Delta Object action last occured at. The value is specified in RFC 3339 Nano Format (to micro precision) (2022-05-03T17:13:44.123Z).
consumed_atstringThe date and time that the Delta Object was last consumed. The value is specified in RFC 3339 Nano Format (to micro precision) (2022-05-03T17:13:44.123Z).