Skip to content

Add worklogs for an employment within a date range

Request

Replaces all worklogs for the employment within the inclusive date range defined by date_from and date_to.

Existing worklogs in the replacement range that are not included in the request are removed. The request is processed synchronously and the response contains the persisted worklogs in the range, including their server-assigned IDs.

Worklogs with date must fall within the replacement range. Absence worklogs must be wholly contained within the replacement range; otherwise the request is rejected.

Security
OAuth2Sandbox
Path
employeeIdstringrequired

ID of the employee.

employmentIdstringrequired

ID of the employment.

Query
date_fromstring, (date)required

Start date of the inclusive replacement range, in YYYY-MM-DD format.

Must not be later than date_to.

Example:date_from=2025-05-01
date_tostring, (date)required

End date of the inclusive replacement range, in YYYY-MM-DD format.

Must not be earlier than date_from.

Example:date_to=2025-05-31
Bodyapplication/jsonrequired
Array [
One of:
]
curl -i -X PUT \
  'https://api.<slug>.isv-test.fennoa.com/v2/payroll/employees/{employeeId}/employments/{employmentId}/worklogs?date_from=2025-05-01&date_to=2025-05-31' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "type": "absence",
      "salary_category_id": 1,
      "absence_start": "2025-05-07",
      "absence_end": "2025-05-07",
      "absence_days": 1,
      "description": "Example description",
      "status": "approved",
      "dimension_ids": [
        1,
        2
      ]
    },
    {
      "type": "salary",
      "salary_category_id": 1,
      "date": "2025-05-07",
      "price": "10.50",
      "amount": "5.00",
      "multiplier": "1.00",
      "description": "Example description",
      "status": "pending",
      "dimension_ids": [
        1,
        2
      ]
    },
    {
      "type": "daily_allowance",
      "salary_category_id": 1,
      "date": "2025-05-07",
      "price": "10.50",
      "amount": "5.00",
      "multiplier": "1.00",
      "description": "Example description",
      "status": "approved",
      "daily_allowance_codes": [
        "full_daily_allowance"
      ],
      "dimension_ids": [
        1,
        2
      ]
    },
    {
      "type": "kilometers",
      "salary_category_id": 1,
      "date": "2025-05-07",
      "price": "10.50",
      "amount": "5.00",
      "multiplier": "1.00",
      "description": "Example description",
      "kilometers": 10,
      "status": "approved",
      "dimension_ids": [
        1,
        2
      ]
    }
  ]'

Responses

Persisted worklogs in the replaced date range.

Bodyapplication/json
dataArray of anyrequired
Response
{ "data": [ { … } ] }