improved

Changes in the Get timesheet totals endpoint

We’d like to share a short update regarding the Get Timesheet Totals endpoint.

Starting November 15th, we will implement a change to align its behavior with the Connecteam UI.

The payItems array will now appear only under the dailyRecords array only (which is already presented there), and no longer under the records array.

This update ensures consistency with the UI and timesheet export, where pay items always represent the daily total hours rather than individual time activities within the same day.
In the future, when the system will support this scenario, it will be implemented within the timesheet totals response as well.

This adjustment may affect users who record multiple shifts per day, but rest assured, the data itself remains unchanged. The endpoint will continue to provide the same information, now structured in a clearer and more consistent format.

Example before a change for a user with 2 shifts a day:

{
  "requestId": "XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
  "data": {
    "startDate": "2025-10-27",
    "endDate": "2025-10-27",
    "users": [
      {
        "userId": "XXXXX",
        "dailyRecords": [
          {
            "date": "2025-10-27",
            "dailyTotalHours": 11,
            "dailyTotalWorkHours": 11,
            "isApproved": false,
            "payItems": [ // Pay items will be presented only on this level
              {
                "hours": 8,
                "payRule": {
                  "id": "XXXXX",
                  "code": "REG",
                  "type": "regular"
                },
                "actualPayRate": null,
                "totalPay": null
              },
              {
                "hours": 3,
                "payRule": {
                  "id": "XXXXX",
                  "code": "OT",
                  "type": "overtime"
                },
                "actualPayRate": null,
                "totalPay": null
              }
            ],
            "records": [
              {
                "timeActivityId": "XXXXX",
                "start": {
                  "timestamp": 1761535800,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "end": {
                  "timestamp": 1761546600,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "basePayRate": null,
                "resources": [
                  {
                    "resourceId": "XXXXX",
                    "subResourceId": null
                  }
                ],
                "payItems": [ //        This will be removed
                  {
                    "hours": 8,
                    "payRule": {
                      "id": "XXXXX",
                      "code": "CRT",
                      "type": "regular"
                    },
                    "actualPayRate": null,
                    "totalPay": null
                  },
                  {
                    "hours": 3,
                    "payRule": {
                      "id": "XXXXX",
                      "code": "COT",
                      "type": "overtime"
                    },
                    "actualPayRate": null,
                    "totalPay": null
                  }
                ]
              },
              {
                "timeActivityId": "XXXXX",
                "start": {
                  "timestamp": 1761550200,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "end": {
                  "timestamp": 1761579000,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "basePayRate": null,
                "resources": [
                  {
                    "resourceId": "XXXXX",
                    "subResourceId": null
                  }
                ],
                "payItems": null               // This will be removed
              }
            ]
          }
        ]
      }
    ]
  }
}

Example after the change

{
  "requestId": "XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
  "data": {
    "startDate": "2025-10-27",
    "endDate": "2025-10-27",
    "users": [
      {
        "userId": "XXXXX",
        "dailyRecords": [
          {
            "date": "2025-10-27",
            "dailyTotalHours": 11,
            "dailyTotalWorkHours": 11,
            "isApproved": false,
            "payItems": [
              {
                "hours": 8,
                "payRule": {
                  "id": "XXXXX",
                  "code": "REG",
                  "type": "regular"
                },
                "actualPayRate": null,
                "totalPay": null
              },
              {
                "hours": 3,
                "payRule": {
                  "id": "XXXXX",
                  "code": "OT",
                  "type": "overtime"
                },
                "actualPayRate": null,
                "totalPay": null
              }
            ],
            "records": [
              {
                "timeActivityId": "XXXXX",
                "start": {
                  "timestamp": 1761535800,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "end": {
                  "timestamp": 1761546600,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "basePayRate": null,
                "resources": [
                  {
                    "resourceId": "XXXXX",
                    "subResourceId": null
                  }
                ]
              },
              {
                "timeActivityId": "XXXXX",
                "start": {
                  "timestamp": 1761550200,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "end": {
                  "timestamp": 1761579000,
                  "timezone": "America/New_York",
                  "locationData": null
                },
                "basePayRate": null,
                "resources": [
                  {
                    "resourceId": "XXXXX",
                    "subResourceId": null
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}