Webhooks

Introduction

All the Webhooks behave basically the same as far as how and when they will Synchronise data.

  • The first time a Webhook runs it will typically Synchronise all records of the relevant entity for the Webook.
  • However, a Webhook can be configured to sync all records or have it start syncing changes from now on.
  • Subsequent runs will only send records that have been created or modified since the last Synchronisation.
  • Data is sent in batches.

Setup

Setting up a Webhook requires the ShelterBuddy team to know the URL for the endpoint that you have to handle the call from the Webhook. Please email support@shelterbuddy.com with your endpoint for this to be set up. 
You will need to know what model to expect, the details for the models are available below.


Available Webhooks

NameDescriptionFollowing examples can be found at resources look for the Response model.
DispatchJobWebhook for dispatch job updates.

DispatchJobV2
GET api/v2/dispatch/{id}

PhysicalLocationWebhook for physical location updates.PhysicalLocationV2
GET api/v2/location/physicallocation/{id}
PersonWebhook for person updates.PersonV2
GET api/v2/person/{id}
UserWebhook for user updates.UserV2
GET api/v2/user/{id}
AnimalWebhook for animals.AnimalV2
GET api/v2/animal/{id}
PersonMergeWebhook for peron merges.PersonMergeV2
POST api/v2/person/merge/list?page={page}&pageSize={pageSize}
AnimalMergeWebhook for animal merges.MergeV2
GET api/v2/animal/merge/{id}
AnimalDeleteWebhook for animal deletesDeleteV2
GET api/v2/animal/Delete/{id}
AnimalIconWebhook for animal icons
Model
{
   isActive,
   isPublic,
   Uri,
   LastUpdatedUtc,
   Extension
}
Animal PhotosWebhook for animal photos.PhotoV2 
POST api/v2/animal/photo/list?page={page}&pageSize={pageSize}

Animal Photos

Overview

The Animal Photos Webhook returns photos for any animals that have had their photo added/updated/deleted since the last successful sync.  Actions that will be detected by the webhook include:

  • Add a photo
  • Adding/removing Tags
  • Deleting a photo (If no photos are returned, this indicates that all photos have been deleted)