The following endpoints allow importing work time and vacation time balances.
WORK_TIME_BALANCE = WORKED_TIME - MANDATORY_WORKING_TIME VACATION_BALANCE = GUARANTEED_VACATION_DAYS - USED_VACATION_DAYS
An imported balance overrides Bezala's own calculations up to and including the time balance date.
Example. In Finland, the vacation year is calculated from April 1 to March 31. So if the user has, for example, 4 unused vacation days from the last year as of April 1, a vacation balance with the value of 4 and dated March 31 should be imported into Bezala.
Get a list of imported work time and vacation balances for the specified user.
{
"collection": [
{
"id": 2,
"user_id": 819,
"balance_type": "vacation",
"date": "2025-03-31",
"value": 5.0,
"units": "days",
"creator_id": 42,
"creator_name": "John Smith"
},
{
"id": 1,
"user_id": 819,
"balance_type": "work_time",
"date": "2025-03-15",
"value": 75,
"units": "minutes",
"creator_id": 42,
"creator_name": "John Smith"
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_count": 2
}
}
| Param name | Description |
|---|---|
|
user_id
required |
User ID. Validations:
|
|
balance_type
optional |
Filter time entries by the specified balance type. Validations:
|
|
page
optional |
Page number. Validations:
|
|
per_page
optional |
Number of records per page. Default: 50. Validations:
|
|
sort_by
optional |
Sort by field. Default: Validations:
|
|
order
optional |
Sorting order (descending or ascending). Default: Validations:
|
Get the latest imported time balance for the specified user.
{}
{
"id": 2,
"user_id": 819,
"balance_type": "vacation",
"date": "2025-03-31",
"value": 5.0,
"units": "days",
"creator_id": 42,
"creator_name": "John Smith"
}
| Param name | Description |
|---|---|
|
user_id
required |
User ID. Validations:
|
|
balance_type
optional |
Get the latest balance of the specified balance type. Validations:
|
| Param name | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
user_id
required |
User ID. Validations:
|
|||||||||
|
time_balance
required |
Time balance parameters. Validations:
|
|||||||||
|
time_balance[balance_type]
required |
Balance type: Validations:
|
|||||||||
|
time_balance[date]
required |
Date of time balance calculation. The value of the balance is the value as of the end of the specified day. Validations:
|
|||||||||
|
time_balance[value]
required |
The value of the imported time balance. Can be either positive or negative.
Validations:
|
| Param name | Description |
|---|---|
|
user_id
required |
User ID Validations:
|
|
id
required |
Time balance ID Validations:
|