Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Company Timesheet

Update a timesheet record

put

Updates an existing timesheet record by ID. Only provided fields will be updated.

Path parameters
timesheetIdstringRequired

Timesheet ID

Body

Timesheet update data

startTimestring · date-timeOptional

Start date and time of the work period in UTC

Example: 2024-01-15T09:00:00.000Z
endTimestring · date-timeOptional

End date and time of the work period in UTC

Example: 2024-01-15T17:00:00.000Z
periodTypestring · enumOptional

Type of period: ACTIVE, VACATION, BANK_HOLIDAY, SICK_LEAVE, INDISPOSITION_ABSENCE, or DAY_OFF

Example: ACTIVEPossible values:
changeReasonstring · min: 1Required

Reason for updating this timesheet record

Example: Manual correction requested by manager
timeZonestring · min: 1Required

IANA timezone ID for this update (e.g. Europe/Madrid). Stored on the timesheet document; start/end times above are still stored as UTC.

Example: Europe/Madrid
Responses
200

Timesheet updated successfully

application/json

DTO representing a person's timesheet entry

idstringOptional

Timesheet entry ID

Example: 64f8a0e2d5b7c9a1e3f4a5b6
personIdstringOptional

Person ID

Example: 64f8a0e2d5b7c9a1e3f4a5b6
startTimestring · date-timeOptional

Start time of the timesheet entry

endTimestring · date-timeOptional

End time of the timesheet entry

isActivebooleanOptional

Whether the timesheet entry is currently active

isEditablebooleanOptional

Whether the timesheet entry can be edited

periodTypestring · enumOptional

Type of timesheet period

Possible values:
timeZonestringOptional

IANA timezone ID stored for this entry when provided by the client

put/api/v1/company/timesheet/{timesheetId}
PUT /api/v1/company/timesheet/{timesheetId} HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 182

{
  "startTime": "2024-01-15T09:00:00.000Z",
  "endTime": "2024-01-15T17:00:00.000Z",
  "periodType": "ACTIVE",
  "changeReason": "Manual correction requested by manager",
  "timeZone": "Europe/Madrid"
}
{
  "id": "64f8a0e2d5b7c9a1e3f4a5b6",
  "personId": "64f8a0e2d5b7c9a1e3f4a5b6",
  "startTime": "2026-01-01T00:00:00.000Z",
  "endTime": "2026-01-01T00:00:00.000Z",
  "isActive": true,
  "isEditable": true,
  "breaks": [
    {
      "startTime": "2026-01-01T00:00:00.000Z",
      "endTime": "2026-01-01T00:00:00.000Z",
      "duration": 1
    }
  ],
  "periodType": "ACTIVE",
  "timeZone": "text",
  "changeHistory": [
    {
      "startTime": "2026-01-01T00:00:00.000Z",
      "endTime": "2026-01-01T00:00:00.000Z",
      "breaks": [
        {
          "startTime": "2026-01-01T00:00:00.000Z",
          "endTime": "2026-01-01T00:00:00.000Z",
          "duration": 1
        }
      ],
      "periodType": "ACTIVE",
      "changeReason": "text",
      "changedBy": "64f8a0e2d5b7c9a1e3f4a5b6",
      "changedAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Delete a timesheet record

delete

Deletes an existing timesheet record by ID. The deleted record is archived in the DeletedTimesheets collection.

Path parameters
timesheetIdstringRequired

Timesheet ID

Body

Timesheet delete data

deleteReasonstring · min: 1Required

Reason for deleting this timesheet record

Example: Duplicate record created by mistake
Responses
200

Timesheet deleted successfully

No content

delete/api/v1/company/timesheet/{timesheetId}
DELETE /api/v1/company/timesheet/{timesheetId} HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "deleteReason": "Duplicate record created by mistake"
}

No content

Create multiple timesheet records for multiple employees

post

Creates timesheet records for multiple employees in a single request. Each element groups creation requests by employeeId.

Path parameters
companyIdstringRequired

Company ID

Bodyobject · TimesheetEmployeeBatchCreateRequestDTO[]

List of timesheet creation data grouped by employee

employeeIdstringOptional

Employee ID

Example: 65a1b2c3d4e5f67890123456
Responses
200

Timesheets created successfully

No content

post/api/v1/company/timesheet/{companyId}/users/batch
POST /api/v1/company/timesheet/{companyId}/users/batch HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 278

[
  {
    "employeeId": "65a1b2c3d4e5f67890123456",
    "createRequests": [
      {
        "startTime": "2024-01-15T09:00:00.000Z",
        "endTime": "2024-01-15T17:00:00.000Z",
        "breaks": [
          {
            "startTime": "2024-01-15T13:00:00.000Z",
            "endTime": "2024-01-15T14:00:00.000Z"
          }
        ],
        "periodType": "ACTIVE",
        "timeZone": "Europe/Madrid"
      }
    ]
  }
]

No content

Create a new timesheet record

post

Creates a new timesheet record for an employee. Includes start time, end time, breaks, and period type.

Path parameters
companyIdstringRequired

Company ID

employeeIdstringRequired

Employee ID

Body

Timesheet creation data

startTimestring · date-timeRequired

Start date and time of the work period in UTC

Example: 2024-01-15T09:00:00.000Z
endTimestring · date-timeOptional

End date and time of the work period in UTC

Example: 2024-01-15T17:00:00.000Z
periodTypestring · enumRequired

Type of period: ACTIVE, VACATION, BANK_HOLIDAY, SICK_LEAVE, INDISPOSITION_ABSENCE, or DAY_OFF

Example: ACTIVEPossible values:
timeZonestring · min: 1Required

IANA timezone ID for the client sending this request (e.g. Europe/Madrid). Stored on the timesheet document.

Example: Europe/Madrid
Responses
200

Timesheet created successfully

No content

post/api/v1/company/timesheet/{companyId}/user/{employeeId}
POST /api/v1/company/timesheet/{companyId}/user/{employeeId} HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 215

{
  "startTime": "2024-01-15T09:00:00.000Z",
  "endTime": "2024-01-15T17:00:00.000Z",
  "breaks": [
    {
      "startTime": "2024-01-15T13:00:00.000Z",
      "endTime": "2024-01-15T14:00:00.000Z"
    }
  ],
  "periodType": "ACTIVE",
  "timeZone": "Europe/Madrid"
}

No content

Create multiple timesheet records

post

Creates multiple timesheet records for an employee. Receives a list of TimesheetCreateRequestDTO and creates each one.

Path parameters
companyIdstringRequired

Company ID

employeeIdstringRequired

Employee ID

Bodyobject · TimesheetCreateRequestDTO[]

List of timesheet creation data

startTimestring · date-timeRequired

Start date and time of the work period in UTC

Example: 2024-01-15T09:00:00.000Z
endTimestring · date-timeOptional

End date and time of the work period in UTC

Example: 2024-01-15T17:00:00.000Z
periodTypestring · enumRequired

Type of period: ACTIVE, VACATION, BANK_HOLIDAY, SICK_LEAVE, INDISPOSITION_ABSENCE, or DAY_OFF

Example: ACTIVEPossible values:
timeZonestring · min: 1Required

IANA timezone ID for the client sending this request (e.g. Europe/Madrid). Stored on the timesheet document.

Example: Europe/Madrid
Responses
200

Timesheets created successfully

No content

post/api/v1/company/timesheet/{companyId}/user/{employeeId}/batch
POST /api/v1/company/timesheet/{companyId}/user/{employeeId}/batch HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 217

[
  {
    "startTime": "2024-01-15T09:00:00.000Z",
    "endTime": "2024-01-15T17:00:00.000Z",
    "breaks": [
      {
        "startTime": "2024-01-15T13:00:00.000Z",
        "endTime": "2024-01-15T14:00:00.000Z"
      }
    ],
    "periodType": "ACTIVE",
    "timeZone": "Europe/Madrid"
  }
]

No content

Get timesheet history for a specific user

get

Retrieves the timesheet history for a specific employee in a company. Supports pagination and date filtering.

Path parameters
companyIdstringRequired

Company ID

employeeIdstringRequired

Employee ID

Query parameters
fromintegerOptional

Starting index for pagination (default: 0)

Default: 0
tointegerOptional

Ending index for pagination (default: 10)

Default: 10
dateFromstring · dateOptional

Start date filter (format: ddMMyyyy)

dateTostring · dateOptional

End date filter (format: ddMMyyyy)

Responses
200

Successfully retrieved user timesheet history

application/json
fromstring · dateOptional
tostring · dateOptional
totalCountinteger · int64Optional
get/api/v1/company/timesheet/{companyId}/user/{employeeId}/history
GET /api/v1/company/timesheet/{companyId}/user/{employeeId}/history HTTP/1.1
Host: api.happyforce.com
Accept: */*
200

Successfully retrieved user timesheet history

{
  "from": "2026-01-01",
  "to": "2026-01-01",
  "byPersonTimeSheet": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "id": "64f8a0e2d5b7c9a1e3f4a5b6",
        "personId": "64f8a0e2d5b7c9a1e3f4a5b6",
        "startTime": "2026-01-01T00:00:00.000Z",
        "endTime": "2026-01-01T00:00:00.000Z",
        "isActive": true,
        "isEditable": true,
        "breaks": [
          {
            "startTime": "2026-01-01T00:00:00.000Z",
            "endTime": "2026-01-01T00:00:00.000Z",
            "duration": 1
          }
        ],
        "periodType": "ACTIVE",
        "timeZone": "text",
        "changeHistory": [
          {
            "startTime": "2026-01-01T00:00:00.000Z",
            "endTime": "2026-01-01T00:00:00.000Z",
            "breaks": [
              {
                "startTime": "2026-01-01T00:00:00.000Z",
                "endTime": "2026-01-01T00:00:00.000Z",
                "duration": 1
              }
            ],
            "periodType": "ACTIVE",
            "changeReason": "text",
            "changedBy": "64f8a0e2d5b7c9a1e3f4a5b6",
            "changedAt": "2026-01-01T00:00:00.000Z"
          }
        ]
      }
    ]
  },
  "totalCount": 1
}

Get timesheet history for a company

get

Retrieves the timesheet history for all employees in a company. Supports pagination and date filtering.

Path parameters
companyIdstringRequired

Company ID

Query parameters
fromintegerOptional

Starting index for pagination (default: 0)

Default: 0
tointegerOptional

Ending index for pagination (default: 10)

Default: 10
dateFromstring · dateOptional

Start date filter (format: ddMMyyyy)

dateTostring · dateOptional

End date filter (format: ddMMyyyy)

Responses
200

Successfully retrieved timesheet history

application/json
fromstring · dateOptional
tostring · dateOptional
totalCountinteger · int64Optional
get/api/v1/company/timesheet/{companyId}/history
GET /api/v1/company/timesheet/{companyId}/history HTTP/1.1
Host: api.happyforce.com
Accept: */*
200

Successfully retrieved timesheet history

{
  "from": "2026-01-01",
  "to": "2026-01-01",
  "byPersonTimeSheet": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "id": "64f8a0e2d5b7c9a1e3f4a5b6",
        "personId": "64f8a0e2d5b7c9a1e3f4a5b6",
        "startTime": "2026-01-01T00:00:00.000Z",
        "endTime": "2026-01-01T00:00:00.000Z",
        "isActive": true,
        "isEditable": true,
        "breaks": [
          {
            "startTime": "2026-01-01T00:00:00.000Z",
            "endTime": "2026-01-01T00:00:00.000Z",
            "duration": 1
          }
        ],
        "periodType": "ACTIVE",
        "timeZone": "text",
        "changeHistory": [
          {
            "startTime": "2026-01-01T00:00:00.000Z",
            "endTime": "2026-01-01T00:00:00.000Z",
            "breaks": [
              {
                "startTime": "2026-01-01T00:00:00.000Z",
                "endTime": "2026-01-01T00:00:00.000Z",
                "duration": 1
              }
            ],
            "periodType": "ACTIVE",
            "changeReason": "text",
            "changedBy": "64f8a0e2d5b7c9a1e3f4a5b6",
            "changedAt": "2026-01-01T00:00:00.000Z"
          }
        ]
      }
    ]
  },
  "totalCount": 1
}

Delete multiple timesheet records

delete

Deletes several timesheet records in a single request, sharing the same delete reason. Deletion is best-effort: ids that cannot be deleted (e.g. not found) are skipped without aborting the rest. The response reports which ids were deleted and which failed. Each deleted record is archived in the DeletedTimesheets collection.

Path parameters
companyIdstringRequired

Company ID

Body

Batch delete data

deleteReasonstring · min: 1Required

Reason applied to every timesheet deleted in this batch

Example: Duplicate records imported by mistake
Responses
200

Bulk deletion processed; see response for per-id outcome

application/json

Outcome of a bulk timesheet deletion, reporting deleted and failed ids

delete/api/v1/company/timesheet/{companyId}/batch
DELETE /api/v1/company/timesheet/{companyId}/batch HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "timesheetIds": [],
  "deleteReason": "Duplicate records imported by mistake"
}
{
  "deleted": [],
  "failed": [
    {
      "timesheetId": "text",
      "reason": "text"
    }
  ]
}

Last updated