TruLinks
TruTac

Event Types & Payloads

Each event has a similar JSON schema, but a unique payload object that is determined by its event type.

Note: Some of these events may not be rendered in TruControl, they're only created for various internal and webhook purposes.

ClockingEvent

Triggered when a Clocking record is created, updated or deleted.

Events API payload

Key Type Description
action string The action that was performed. Can be "created", "updated", or "deleted"
clocking object The Clocking itself.

Webhook event name

clocking

Webhook payload example

{
  "action": "created",
  "clocking": {
    "id": "CLOCKING-ID-123",
    "driverId": "DRIVER-ID-123",
    "clockingTimeStamp": "2018-01-01T09:01:53",
    "isClockIn": true
  }
}

PingEvent

Triggered when a webhook is created or updated.

Events API payload

Key Type Description
action string The action that was performed. Can be "created" or "updated"
hook object The webhook configuration.

Webhook event name

ping

Webhook payload example

{
  "action": "created",
  "hook": {
    "id": "WEBHOOK-ID-123",
    "payloadUrl": "http://www.example.com/api/listener",
    "active": true,
    "events": [{
        "clocking"
      }]
  }
}