Retrieve a delta

Retrieve a delta

Introduction

It’s possible to retrieve changes with the delta.

Caution

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

Tip

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

Endpoint details

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/clockings?delta

Response properties

This list of properties is returned by this endpoint.

Property Type Description
changeVersion string Property to indicate the order of changes.
id integer Unique identifier for the clocking.
person.id integer Internal ID of the person who performed the clocking.
date string Date of the clocking (YYYY-MM-DD).
timeOfDayInMinutes integer Minutes since midnight (-1440 and 2880) representing the time of the clocking on the specified date.
originalTimeOfDayInMinutes integer Original time of the clocking as registered by the terminal or input source. Only present if the clocking has been edited.
calculatedTimeOfDayInMinutes integer The time of day in minutes after any corrections or calculations.
isGenerated boolean Indicates if the clocking was generated by the system.
terminal.id integer Internal ID of the terminal on which the clocking occurred.
geolocation.longitude number Longitude coordinate where the clocking was registered.
geolocation.latitude number Latitude coordinate where the clocking was registered.
kind string Type of clocking (InOut, Reason, Activity, ActivityEnd).
reason.id integer Internal ID of the reason for the clocking (only present if kind is Reason).
activityLevels array Array of activity levels, each with a level and an activityDefinition.id (only present if kind is Activity).
status string Status of the clocking (Unknown, Active, Deleted).

Filters

This list of filters can be used for this endpoint. Some filters are mandatory.

Filter Type Description
date Required The start date must be a recent date in the past, with the earliest allowed start date being January 1st of the previous year
kind Optional Filter by clocking kind (InOut, Reason, Activity, ActivityEnd)

Note

  • People cannot be used in the delta
  • The start date must be a recent date in the past, with the earliest allowed start date being January 1st of the previous year
  • The end date isn’t required, when providing an end date there is a max range of 1 year
  • Clocking kinds are optional

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

Overnight clockings

The Protime API supports handling overnight clockings. Clocking data is imported on the correct day, based on the configuration of the day program within Protime.

Note

The timeOfDayInMinutes property supports values from -1440 up to 2880. This allows you to register clockings that occur before midnight (previous day) or after midnight (next day), which is especially useful for night shifts and overnight clockings.

Soft-deleted clockings

Note

Soft-deleted clockings are included in the responses. These are clockings that have been manually deleted but remain in the system with a “Deleted” status.

In delta responses, soft-deleted records appear as:

  • "changeType": "InsertOrUpdate" indicating whether the record was added or updated (InsertOrUpdate) or physically deleted (Delete).
  • "status": "Deleted" indicating whether a clocking is active or soft-deleted.

Example of a soft-delete in a delta response:

{
  "changeType": "InsertOrUpdate",
  "data": {
    "status": "Deleted",
    "timeOfDayInMinutes": 9999,
    "originalTimeOfDayInMinutes": 551,
    "date": "2025-04-22",
    "kind": "InOut",
    "terminal": {
        "id": 684743
    },
    //...
  }
}

Examples

A delta with date and external reference

Example for clockings with a delta starting from 1st of January 2025 and employee number as external reference for people:

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/clockings?filter=date ge '2025-01-01'&externalReferences=(people,@employee-number)&delta