Get incremental changes

This endpoint allows querying the changes registered in the incidences since a specific date. The goal is to make recurrent requests to keep the data updated more easily.

GET /api/v2/businesses/{businessId}/incidences/incremental?since={yyyy-MM-ddTHH:mm:ss.mss}

The response is paginated, meaning it contains a next header indicating the URL of the next incremental request: to get the next page, a request should be made to that URL. The last page does not contain the header, indicating that pagination has ended.

If the data included in the request is correct, the request returns the incidences that have changed since a given date (since) up to the current date. Orquest only stores the last 45 days of incremental changes, so the query should consider that time interval.

[
  {
    "employeeId": "string",
    "businessDay": "2024-05-07",
    "incidences": [
      {
        "type": "string",
        "initTime": "09:00",
        "endTime": "10:00",
        "workedMinutes": 0,
        "from": "2024-05-07",
        "to": "2024-05-07",
        "id": "string",
        "orquestId": 3456
      }
    ]
  }
]

Considerations

Due to the complex nature of the data, sometimes it cannot be determined whether an item has actually changed or not. For example, in the case of massive changes, when the modification is made en bloc and an exhaustive comparison is not carried out. In this sense, it is possible to take into account that the incidences of a day have changed, regardless of how many incidences have changed in that day.

Using this endpoint requires that the functionality be activated in advance by the Orquest team, due to its computational and memory costs when performing audits on certain entities. Therefore, it will be necessary to analyze the use case and manage its activation.