Webhook Subscription Attributes
The following attributes are contained within the subscription object.
ATTRIBUTE | DESCRIPTION |
---|---|
filters.attributes array of strings | JSON paths of the resource entity to which to subscribe. Wildcards (*) are supported. Refer to Path Generator API for how to indicate attributes for specific fields. Restrictions apply to collection entities. Refer to How to specify filter attributes for subscriptions section below for more details. Note: - Currently only Loan resource "change" and "fieldchange" events support filters.attributes. - filters.attributes cannot be used for “enhancedFieldChange” event. All changed fields will be returned in the payload. - The maximum limit of fields that can be added in a single subscription is 50. |
events array of strings | Comma-separated list of events in the subscription. Please see the Webhook Overview page for supported values. Note: A wildcard (*) cannot be used to subscribe to all types of events. |
endpoint string | The callback URL where the event notification will be delivered. The URL is expected to be a functioning and reliable HTTPS URL that is known only to the subscriber (a client's application). The callback URLs need to be under one base domain. E.g. [https://www.abc.com/url1]. This attribute is required when creating a webhook subscription. |
deliveryPolicy string | Acceptable values are: linear or exponential. This is an optional parameter, if not given as an input, the deliveryPolicy is defaulted to linear. |
signingkey string | Optional. The password to assign to the subscription. When providing a signing key, ensure the complexity requirements are met. See Complexity Requirements for Signing Keys for details. For more information about signing keys, see Subscription Signing Key. If a value is not provided, the default signing key will be used. |
resource string | Refers to the resource that is part of a subscription. For example, Loan or Transaction. This attribute is required when creating a webhook subscription. Please see the Webhook Overview page for supported resources. |
enableSubscription Boolean | Boolean true or false. Default is true. Can be added to Create, and Update, Webhook Subscription APIs to indicate whether the subscription is enabled or disabled. If "false" is chosen at subscription creation, the attribute must then be updated to "true" to enable the subscription. |
How to specify filter attributes when subscribing to loan "change" eventsWhen specifying filter attributes for a loan "change" event subscription, note that the fields in the Loan resource can be classified into three broad categories:
Static Fields : These are the fields that can be listed as attributes directly.
Example: applicationTakenMethodType
Attribute: "/applicationTakenMethodType"Collections : These are the entities within the Loan object which contains a list of items.
The attribute can be specified in the form of "/entity/itemNumber".
A few examples are Applications, Contacts, and Custom Fields.
Attribute:
i. "applications/0/" will trigger a notification if there is a change in any field within application with applicationIndex '0'
ii. To subscribe for a notification which gets triggered due to a change in any of the items in the Contacts collection, use "/contacts/"
iii. To subscribe for a notification which gets triggered due to the completion of a milestone, use "/milestoneLogs/*/doneIndicator"Example: To be notified when the name of a contact type LOAN_CLOSER is updated:
- V1 JSON Path: "/contacts[?(@/contactType == "LOAN_CLOSER")]/name"
- Supported Filter Attribute: "/contacts/*/contactType/name"
- Collections with conditional Patterns : These are entities which contain items that can
have multiple conditions. Currently, they can be subscribed to only at the collection level.
A couple of examples are Fees and Assets.
Attribute: "/fees/*"
How to specify filter attributes when subscribing to loan "fieldchange" eventsWhen specifying filter attributes for a "fieldchange" event subscription, note the following format:
/fields/{{fieldId}}
Example:
"filters": { "attributes": [ "/fields/1109" ]
No validation on filter's attributes
Please note that we do not validate the values specified under attributes. Invalid attributes are ignored.