Webhooks

This page covers webhook payloads for Shift endpoints.

Shift created

This sample webhook payload covers the shifts-created endpoint.

{
   "webhook_id":"f82ab0a92ddd4bb7b6117635159b366a",
   "task_id":"c32fb957ec7246828da56be7516da765",
   "link_id":"9915c50cc047413bb810767f218390f8",
   "product":"employment",
   "data_source": "payroll",
   "tracking_info":null,
   "event_type":"shifts-created",
   "event_created_at":"2022-08-23T17:32:24.812306Z",
   "objects_count":1,
   "employment_id":"427abebd8590457e8332fdff77fc412f",
   "user_id": "88fef4cea64c40b5ad6727cc9b0b9fdc",
	 "template_id": null
}

The shifts-created event occurs for any successful non-refresh Task. It returns when the action is complete with new objects. For multiple shifts or bank accounts, Truv responds with a webhook for each object created.

Shift updated

The examples below are webhook payloads for statements-updated, shifts-updated, or bank-accounts-updated.

{
   "webhook_id":"f82ab0a92ddd4bb7b6117635159b366a",
   "task_id":"c32fb957ec7246828da56be7516da765",
   "link_id":"9915c50cc047413bb810767f218390f8",
   "product":"employment",
   "data_source":"payroll",
   "tracking_info":null,
   "event_type":"shifts-updated",
   "event_created_at":"2022-08-23T17:32:24.812306Z",
   "objects_count":1,
   "employment_id":"427abebd8590457e8332fdff77fc412f",
   "user_id": "88fef4cea64c40b5ad6727cc9b0b9fdc",
	 "template_id": null
}

The shifts-updated events returns when any refresh task is successful and complete. This includes a different number of shifts from a previous task, such as when a person had 8 shifts and now has 9.