Webhooks

Introduction

It’s possible to retrieve change-events of access clockings with webhooks.

Caution

Read the Webhooks page. There is important information on required implementation!

Tip

Check the Swagger page for more technical information on the endpoints.

Endpoint details

POST
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/webhooks

Body properties

This list of properties is applicable for this endpoint.

Property Type Description
destinationUrl string The URL where webhook notifications will be sent.
collectionName string The name of the collection to subscribe to (access-clockings).

Event properties

This list of properties is posted to your consumer endpoint.

Property Type Description
changeVersion string Property to indicate the order of changes.
id integer Unique identifier for the access clocking.
person.id integer Internal ID of the person who performed the clocking.
date string Date of the access clocking (YYYY-MM-DD).
timeOfDayInMinutes integer Minutes since midnight (0 to 1439) representing the time of the clocking on the specified date.
terminal.id integer Internal ID of the terminal on which the clocking occurred.
status string Result of the access attempt (AccessOk, AccessRefused, WrongPinCode, AlarmCode, AntiPassbackError, OutZone, UnknownBadge).

External references

It’s possible to use predefined external references and custom external references. More information can be found on the External References Page

For a list of predefined external references, see the external reference options section.

Note

Check the query options below the endpoint on the Swagger page for the relevant external references.

Good to know

Time of day

Access clockings always happen on the actual date itself. This is different from other clocking kinds, which have a notion of previous/current/next day.

Note

The timeOfDayInMinutes property for access clockings is limited to values from 0 to 1439 (24 hours), unlike other clockings which support negative values and values above 1440 for overnight clockings.

Status values

A more detailed description of the possible values for the status property.

Value Description
AccessOk Access granted.
AccessRefused Access denied.
WrongPinCode PIN code verification failed.
AlarmCode Alarm code entered (meaning may depend on configuration).
AntiPassbackError Anti-passback rule violated (e.g., required entry/exit sequence not followed).
OutZone Exited a defined zone (floor plan context; may depend on configuration).
UnknownBadge Badge was unknown at the time of clocking. This can be reprocessed if the badge is later linked to a person, but the status remains UnknownBadge.

Examples

A webhook for access clockings

Example for creating a webhook for access clockings:

POST
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/webhooks

{
    "destinationUrl": "https://www.fictional-customer.com/protime/access-clockings",
    "collectionName": "access-clockings"
}