Introduction
In order to integrate your BitaBIZ data to Excel or PowerBI you need to:
- Activate your account API key
- Insert the API key in the URLs provided in this article
- Insert the URLs you are going to use in PowerBI or Excel
Employees
To get all employees including their master data in a company use this URL:https://registrations.api.bitabiz.com/pbi/INSERT API KEY HERE/employees
The employees URL include the following master data information:
BitaBIZ name/ID | API name/ID | Description |
Guid | Unique employee identification, with this id several reports can be joined. | |
First name Last name | Name | First name and last name |
First name Middle name Last name | Full name | First name, middle name, last name |
Department | Department | |
Job Title | JobTitle | |
Employee number | EmployeeId | Internal company id |
Payroll number | EmployeePayrollId | Payroll id used by an external payroll system |
Office location | Country.Name | Office location tag |
Country/region/calendar group | Country.Region | Country region and calendar group tag |
Group Company | Group.Company | Group company tag |
PersonalInfo.Email | ||
Birthday | PersonalInfo.Birthdate | |
Mobile number | PersonalInfo.Mobile | |
Date of employment | Employment.Start | |
Employment.End | Date of termination for inactive employees | |
LastLogin | ||
Active | By default, only active users are shown - add this attribute to the URL to get both active and inactive users: ?inactive=true |
Link between BitaBIZ employee master data and the API:
Employee master data include policy settings the employee is attached to:
BitaBIZ name/ID | API ID | Description |
SalaryAgreement.Id | ||
Policy | SalaryAgreement.Name | |
Vacation days/ year | SalaryAgreement.VacationDays | Does not include any adjustments or vacation taken |
Other Vacation days/ year | SalaryAgreement.OtherVacationDays | Does not include any adjustments or other vacation taken |
Work week -> Hours per day | SalaryAgreement.WeekDay | Standard work hours per weekday (Monday - Sunday) |
Work week -> Work hours per week | SalaryAgreement.HoursPerWeek | Sum of standard work hours per week |
Working week | SalaryAgreement.WorkingDays | 5 or 7-day working week |
Link between BitaBIZ policy settings and the API:
Employees / NationalHolidays
This route is for getting bank holidays for all employees in a company in a given period:
https://registrations.api.bitabiz.com/pbi/INSERT_API_TOKEN_HERE/employees/nationalHolidays
Optional parameter: from=YYYY-MM-dd, to=YYYY-MM-dd
National holidays include the following information and columns:
BitaBIZ name/ID | API ID | Description |
Guid | Unique employee identification, with this id several reports can be joined. | |
First Name Last name | Name | First name and last name. |
SumOfDays | Sum of national holidays in days in a period. | |
SumOfHours | Sum of national holidays in hours according to the employee's daily work hours. | |
HolidaysCount | Count of national holidays in a period. | |
Add holidays > Holiday name | Holidays.Description | Name of national holiday ie "New Year's Eve". |
Holidays.StartDate | ||
Holidays.EndDate | ||
Holidays.DayOfWeek | Name of a day (Monday-Sunday). | |
Holidays.SumDays | Value in days can be 1 for full-day or 0.5 for half-day. | |
Holidays.SumHours | Value in hours according to employee hours per day. |
Employees / History
Get the last two years of vacation and other vacation history, plus information on employee’s hour bank. https://registrations.api.bitabiz.com/pbi/INSERT_API_TOKEN_HERE/employees/history
Optional paramater: years=XXXX,XXXX,XXXX
Comma separated list of years: ?years=2018,2019,2020
History includes the following information and columns:
BitaBIZ name/ID | API ID | Description |
Guid | Unique employee identification, with this id several reports can be joined. | |
First Name Last Name | Name | First name and last name |
History.Year | In Denmark, 2020 value would refer to the year 01.05.2020 - 30.04.2021 | |
History.VacationEarned | Earned vacation plus adjustment | |
History.VacationAdjustment | Vacation adjustment only (can be negative) | |
History.OtherVacationEarned | Earned other vacation plus adjustment | |
History.OtherVacationAdjustment | Other vacation adjustments only (can be negative) | |
History.FlexBalance | Timebank balance | |
History.FlexBalanceAdjustment | Under development |
Registrations
Getting registrations for the whole company in a period specified.
https://registrations.api.bitabiz.com/v2-pbi/INSERT_API_TOKEN_HERE
Optional parameters:
from=YYYY-MM-dd, to=YYYY-MM-dd
reason = comma-separated reason codes, please see our table of possible reason codes
status = comma-separated status codes, please see our table of possible status codes
Registrations include the following information and columns:
BitaBIZ name/ID | API ID | Description |
Guid | ||
First name Last name | Name | First name and last name |
Registration.Spanned | Can be TRUE if spanning over several days | |
Registration.SpannedDay | When the registration consists of several days - this would be the count of the day. 0 is the first day in spanned registration. | |
Registration.Date | ||
Registration.TimeStart | ||
Registration.TimeEnd | ||
Registration.Amount.Days | Value in days if relevant for registration type | |
Registration.Amount.Hours | Value in hours if relevant for registration type | |
Registration.Amount.Km | Value in km if relevant for registration type | |
Registration.Amount.Unit | Default unit or a combination (days and hours) | |
Registration.DateDetails.Week | Week number | |
Registration.DateDetails.Weekday | Day number of the week (1 - Monday) | |
Registration.DateDetails.WeekDayEnglish | Name of the day of the week | |
Registration.DateDetails.Holiday | True if the registration overlaps national holiday | |
Registration.DateDetails.HolidayDetails.Description | Name of the national holiday that is overlapped | |
Registration.Type | Vacation, Other vacation, Child sick, Sick, Out of office, Overtime, Time off, Leave, Mileage | |
Registration.Subtype | Subtype - usually a job code for Time and Overtime registrations, or category like "Work from home" for Out of office registrations | |
Registration.Reason | BitaBIZ reason codes | |
Registration.Created | Timestamp of when the registration got created | |
Registration.Note | Only public of when the registration got created | |
Registration.JobCode.Id | Jobcode id for integration to other payroll systems | |
Registration.JobCode.IsPayroll | TRUE/FALES - if true registration is to be processed by an external payroll system |
Registrations / employee
Getting registrations for a single employee. Same columns and parameters can be applied as in the registrations route above
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations/{EMPLOYEEGUID}
Attributes in API queries
Attributes are URL parameters. The standard attribute is for example from and to. Parameters can be combined while the first parameter starts with ? other additional parameters are added with &
Example
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?from=2019-01-01&to=2019-12-31
FROM and TO parameter
From and to need to have a value in this format YYYY-MM-dd. It is also possible to use literal like
?from=2019-01-01&to=2019-12-31
?from=lastXXmonths.
Example
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?from=last24months
loads results between today and the same date 2 years ago.
STATUS Parameter
In BitaBIZ, registration can have 4 different status types.
APP = approved,
PEN = pending,
REJ = rejected
DEL = deleted.
By default only registrations with status=app (approved) are shown. If you need to add other registration status, separate values with comma. Status=app,pen,rej
Returns all pending registrations in a period.
REASON Parameter
BitaBIZ has over 10 different registration types. It is possible to filter out only certain registration types or combine two or more types. These parameters are not case sensitive, so both variations like ‘hh’ and ‘HH’ will work. Without the reason parameter being present, all registration types are returned.
Combination example
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=L,HF,HH,IC,IS,VT,VO,DT,DO
All reason examples
Sick registrations (Reason=IS)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=IS
Child sick (Reason=IC)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=IC
Vacation (Reason=HH)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=HH
Other vacation (Reason=HF)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=HF
Leave (Reason=L)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=L
Own types (Reason=P)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=P
Overtime (Reason=VO)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=VT
Time off (Reason=VT)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=VO
Time (Reason=TT)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=TT
Mileage (Reason=MI)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=MI
Daybank – plusdays (Reason=DO)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=DO
Daybank - minus days (Reason=DT)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=DT
FLEX (Reason=FT)
https://registrations.api.bitabiz.com/v2-pbi/{API token}/registrations?reason=FT