Webhooks
Overview
Webhooks allow you to receive notifications whenever there are updates to a select set of resources.
This prevents you from having to rely on continuous or even periodic requests just to check for updates that may or may not have happened. It also helps you avoid rate limiting.
Webhook update notifications are sent as POST requests to a callback URL that you supply. Notifications are lightweight, indicating only that a resources has been updated.
Fields
Field | TypeInt | Description |
---|---|---|
action | String | The effect which occurred to the resource. (e.g.: "created", "replaced", "updated", "deleted") |
objects | String | Additional information about the action that has occurred. (e.g.: '{"data_source": 1}', '{"action_type": "Response"}' |
reference_code | String | A code used to specify where in our project the webhook call was created, in case debugging is necessary. |
related_id | Int | The ID associated to the related resource used to make calls to the API to update the resource. (e.g: "business", "account") |
related_model | String | The name of the related resource used to make calls to the API to update the resource. (e.g: "business", "account") |
resource_id | Int | The ID associated to the resource affected by the action. |
resource_model | String | The name of the resource affected by the action. (e.g: "profile", "review") |
Example Webhook
{
'action': 'created',
'objects': '{"data_source": 4}',
'reference_code': '006',
'related_id': 2230,
'related_model': 'business',
'resource_id': 1181,
'resource_model': 'profile'
}
Redundant Webhooks
If a profile is removed, subsequently reviews related to the profile will also be removed. You will not receive webhooks for the removed reviews as you can assume they do not exist without a profile. Similarly, if a business is removed you will not receive webhooks informing you of the removal of the profiles belonging to that business.
Retries
We will attempt sending the webhooks again if the initial attempt fails at larger and larger intervals. A total of 6 attempts per webhook will be made.
Supported Webhooks
Business, Company, Profile, Review, Suggested Action.
Updated over 4 years ago