Added

Implement the activities.added webhook to know when a new activity object is added.

An activity object will be added:

  1. When a new account is connected, and its scanned data includes activities data
  2. On a continuous basis, if a new activity is retrieved during Argyle's periodic scanning of connected accounts

Two time periods are recorded and delivered in the activities.added payload:

  1. available_from and available_to specify the date range of all activities associated with the account
  2. added_from and added_to specify the date range of the newly added activities

To retrieve recently added activities, list activities using the query parameters:

  1. account = the ID returned in the account field of the activities.added webhook payload
  2. from_start_date = the added_from timestamp in the activities.added webhook payload
  3. to_start_date = the added_to timestamp in the activities.added webhook payload

Event

activities.added

Payload

AttributesTypeDescription
accountstring uuidID of the account the activities were added to.
userstring uuidID of the user associated with the account.
added_fromstring timestampThe time of the earliest activity that was recently added.

The added_from timestamp will precede the added_to timestamp.
added_tostring timestampThe time of the latest activity that was recently added.
added_countintegerThe number of activities added to the account.
available_fromstring timestampThe time of the earliest activity available for the account.

The available_from timestamp will precede the available_to timestamp.
available_tostring timestampThe time of the latest activity available for the account.
available_countintegerThe total number of activities associated with the account at the moment the webhook call is made.

Examples

curl -X POST https://api.argyle.com/v1/webhooks \
  -u api_key_id:api_key_secret \
  -H "Content-Type: application/json" \
  -d '{"events": ["activities.added"],
       "secret": "<secret for signature verification>",
         "name": "activities.added",
          "url": "https://webhook.site/url"}'
{
    "event": "activities.added",
    "name": "Activities added",
    "data": {
        "account": "12db5af4-fd5f-4d1f-bd98-0360df770aa8",
        "user": "abdb5af4-fd5f-4d1f-bd10-0360df77012c",
        "added_from": "2019-08-07T20:12:09Z",
        "added_to": "2019-09-23T23:57:31Z",
        "added_count": 10,
        "available_from": "2019-03-07T20:12:09Z",
        "available_to": "2019-09-23T23:57:31Z",
        "available_count": 456
    }
}