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:
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:
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:
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:
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