BitaBIZ Rest API ApiKey

BitaBIZ Rest API can be used for retrieving employees, registrations and other information. To use and test our API you will need to activate and use an ApiKey, that you can find in BitaBIZ under Setup Admin > Company > Subscription plan.

How to test the API

Our API can be tested in a desktop tool like Postman or at SwaggerHub https://app.swaggerhub.com/apis/BitaBIZ/registrations/1.0.1

In Postman you will need to add the ApiKey as x-apikey in the Headers section of your request

In SwaggerHub click ‘Authorize’ > Enter your ApiKey and ‘Authorize‘

GET /v1/employees

Get all employees and their information in your company https://registrations.api.bitabiz.com/v1/employees

Header parameter: x-apikey
Optional parameter: ?inactive=true (Includes inactive employees in the company)

Contains the following keys and information:

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

First name

Middle name

Last name

fullName

First name, middle name, last name

Department

department

ID-number

pNumber

Production unit p-number set on employee's department.

Job Title

jobTitle

Employee number

employeeId

Internal company id

Payroll number

employeePayrollId

Payroll id used by an external payroll system

Office location

officeLocation

Office location tag

Country/region/calendar group

country.region

Country region and calendar group tag

Group Company

groupCompany

Group company tag

Email

personalInfo.email

Birthday

personalInfo.birthdate

Mobile number

personalInfo.mobile

Date of employment

employment.start

Date of termination

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:

GET /v1/employees/nationalholidays

This request is for getting bank holidays for all employees in a company in a given period:
https://registrations.api.bitabiz.com/v1/employees/nationalholidays

Header parameter: x-apikey
Optional parameter: from=yyyy-MM-dd, to=yyyy-MM-dd

Contains the following keys and information:

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, 1 for full day 0.5 for half day

holidays.sumHours

Value in hours according to employees work hours per day

GET /v1/employees/history

Gets the last 2 years of vacation and other vacation history, plus information on employee’s hour bank.
https://registrations.api.bitabiz.com/v1/employees/history

Header parameter: x-apikey
Optional parameter: years=XXXX,XXXX,XXXX
Comma separated list of years: ?years=2018,2019,2020

Contains the following keys and information:

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

Hour bank adjustment (can be negative)

GET /v2/registrations

Getting registrations for the whole company in a period specified. https://registrations.api.bitabiz.com/v2/registrations

Optional parameters:
from=yyyy-MM-dd, to=yyyy-MM-dd or lastXXmonths
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

Contains the following keys and information:

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

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

GET /v2/registrations/{EMPLOYEEGUID}

Getting registrations for a single employee. Same keys and parameters can be applied as in the registrations request above.

Attributes in API queries

Attributes are URL parameters. Standard attributes are for example from and to. Parameters can be combined where the first parameter is preceded with the character “?” and other additional parameters are preceded with the character “&”.

Example
https://registrations.api.bitabiz.com/v2/registrations?from=2019-01-01&to=2019-12-31

FROM and TO parameter

From and to attributes need to have a value in this format yyyy-MM-dd:
?from=2019-01-01&to=2019-12-31

It is also possible to use literal like:
?from=lastXXmonths.

Example
https://registrations.api.bitabiz.com/v2/registrations?from=last24months
loads results between today and 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

Example
https://registrations.api.bitabiz.com/v2/registrations?from=2019-01-01&to=2019-12-31&status=pen

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/GUID/registrations?reason=L,HF,HH,IC,IS,VT,VO,DT,DO

All REASON examples

Sick registrations (Reason=IS)
https://registrations.api.bitabiz.com/v2/registrations?reason=IS

Child sick (Reason=IC)
https://registrations.api.bitabiz.com/v2/registrations?reason=IC

Vacation (Reason=HH)
https://registrations.api.bitabiz.com/v2/registrations?reason=HH

Other vacation (Reason=HF)

https://registrations.api.bitabiz.com/v2/registrations?reason=HF

Leave (Reason=L)
https://registrations.api.bitabiz.com/v2/registrations?reason=L

Own types (Reason=P)
https://registrations.api.bitabiz.com/v2/registrations?reason=P

Overtime (Reason=VO)
https://registrations.api.bitabiz.com/v2/registrations?reason=VT

Time off (Reason=VT)
https://registrations.api.bitabiz.com/v2/registrations?reason=VO

Time (Reason=TT)
https://registrations.api.bitabiz.com/v2/registrations?reason=TT

Mileage (Reason=MI)
https://registrations.api.bitabiz.com/v2/registrations?reason=MI

Daybank – plusdays (Reason=DO) https://registrations.api.bitabiz.com/v2/registrations?reason=DO

Daybank - minus days (Reason=DT) https://registrations.api.bitabiz.com/v2/registrations?reason=DT

FLEX (Reason=FT)
https://registrations.api.bitabiz.com/v2/registrations?reason=FT

Did this answer your question?