Finnish Holiday calendar API

This is a demo and documentation page for A REST calendar for determining public holidays in Finland. Using Beta functionality it is also possible to overlay user specific schedule with public holidays base.

Finnish calendar

GET /api/calendar

curl 'https://holiday-calendar.fi/api/calendar?start=<date>&end=<date>'

Parameters

Result

List working days between start and end in YYYY-mm-dd format, values are in format

{"2025-08-10": "working day", "2025-08-11": "weekend"}

Examples

Get current day

GET https://holiday-calendar.fi/api/calendar

Get current month

GET https://holiday-calendar.fi/api/calendar?full_month=true

Get date range

GET https://holiday-calendar.fi/api/calendar?start=01-01-2022&end=31-03-2022

Finnish working days

GET /api/working-days

curl 'https://holiday-calendar.fi/api/working-days?start=<date>&end=<date>'

Parameters

Result

List working days between start and end in YYYY-mm-dd format, values are in format

{ "2025-08-10": "working day" }

Finnish non-working days

GET /api/non-working-days

curl 'https://holiday-calendar.fi/api/non-working-days?start=<date>&end=<date>'

Parameters

Result

List working days between start and end in YYYY-mm-dd format, values are in format

{"2025-08-11": "weekend"}

Examples

Get holidays in range

GET https://holiday-calendar.fi/api/non-working-days?start=01-01-2022&end=31-03-2022

Login

POST /api/login

curl -d '{"username":"<user>","password":"<pass>"}' -H 'Content-Type: application/json' https://holiday-calendar.fi/api/login

Acquire Bearer token. Lifetime 2 hours.

Request body

{"username": "user", "password": "pass"}

Result

Bearer token (JSON encoded string)

"b480bb7f71c7a61a80d33bfcf42466bb"

Logout

POST /api/logout

curl -XPOST -H 'Authorization: Bearer <token>' https://holiday-calender/api/logout

Expires current Bearer token

Request body

None

Result

No content

Register

POST /api/register

curl -d '{"username": "<user>", "password": "<pass>", "email": "<email address>", "full_name":"<name>"}' -H 'Content-Type: application/json' https://holiday-calendar.fi/api/register

Register user account

Request body

{ "username": "user", "email": "user@domain.com", "password": "pass", "full_name": "User Mcuserson" }

Result

No content, confirm email is sent

Register confirm

POST /api/confirm

curl -d '"<confirmation code>"' -H 'Content-Type: application/json' https://holiday-calendar.fi/api/confirm

Activate account using confirm code

Request body

Confirmation code

"b480bb7f71c7a61a80d33bfcf42466bb"

Result

No content, you may now login

Users list

GET /api/users

curl -G -H 'Authorization: Bearer <token>' https://holiday-calendar.fi/api/users

Lists all users

Parameters

None

Result

List of users with fields:

[
    {
        "username":"john-doe",
        "password": "***",
        "email":"john.doe@gmail.com",
        "full_name":"John Doe"
    },
    {
        "username":"test-dummy",
        "password": "***",
        "email":"***",
        "full_name":null
    }
]

My account

GET /api/users/mine

curl -H "Authorization: Bearer <token>" https://holiday-calender.fi/api/users/mine

Parameters

None

Result

Your user data

{"username":"john-doe", "email":"john.doe@testi123.com", "password": "***", "full_name":"John Doe"}

Forgot password

POST /api/password/forgot

curl -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -d '"<email>"' https://holiday-calender.fi/api/password/forgot

Send an email token to change password

Request body

Email address of the user for which to change password

"user@email.com"

Result

No content, email is sent to the user.

Forgot password confirm

POST /api/password/change

curl -H "Content-Type: application/json" -d '{"token": "<emailed token>", "password": "<new password>"}' https://holiday-calender.fi/api/password/change

Change email using token from email

Request body

{"token": "b480bb7f71c7a61a80d33bfcf42466bb", "password": "New password"}

Result

No content, password is updated on the user

Edit my Account

PUT /api/users/mine

curl -XPUT -H "Authorization: Bearer <token>" -H 'Content-Type: application/json' -d '{"username": "<name>", "email": "<address>", "password": "<pass>", "full_name": "<name>"}' https://holiday-calendar.fi/api/users/mine

Request body

{"username": "user", "email": "user@domain.com", "password": "pass", "full_name": "User Mcuserson"}

Result

Updated user

{"username": "user", "email": "user@domain.com", "password": "pass", "full_name": "User Mcuserson"}

Delete my Account

DELETE /api/users/mine

curl -XDELETE -H "Authorization: Bearer <token>" https://holiday-calendar.fi/api/users/mine

Arguments

None

Result

Deleted user

{"username": "user", "email": "user@domain.com", "password": "pass", "full_name": "User Mcuserson"}

Create new schedule

POST /api/schedule

curl -d '{"name": "<calendar name>", "participants": [<usernames>], "desc": "<description>"}' -H 'Content-Type: application/json' -H 'Authorization: Bearer <token>' https://holiday-calendar.fi/api/schedule

Request body

{"name": "calendar","participants": ["john-doe"],"desc": "My first schedule"}

Result

Created schedule

{
"name": "calendar",
"owner": {
    "username":"john-doe",
    "email":"john.doe@gmail.com",
    "full_name":"John Doe"
},
"participants": [{
    "username":"john-doe",
    "email":"john.doe@gmail.com",
    "full_name":"John Doe"
}],
"desc": "My first schedule"}

List schedules

GET /api/schedules

curl -H 'Authorization: Bearer <token>' https://holiday-calendar.fi/api/schedules

Result

List of schedules you have access to

[
    {
        "name": "calendar",
        "owner": {
            "username":"john-doe",
            "email":"john.doe@gmail.com",
            "full_name":"John Doe"
        }
        "participants": [{
            "username":"john-doe",
            "email":"john.doe@gmail.com",
            "full_name":"John Doe"
        }],
        "desc": "My first schedule"
    }
]

Get schedule info

GET /api/schedule/<name>/info

curl -H 'Authorization: Bearer f098f17abd6d584a424e1b034fb93ba7' https://holiday-calendar.fi/api/schedule/<name>/info

Result

[
    {
        "name": "calendar",
        "owner": {
            "username":"john-doe",
            "email":"john.doe@gmail.com",
            "full_name":"John Doe"
        }
        "participants": [{
            "username":"john-doe",
            "email":"john.doe@gmail.com",
            "full_name":"John Doe"
        }],
        "desc": "My first schedule"
    }
]

Delete schedule

DELETE /api/schedule/<name>

curl -XDELETE -H 'Authorization: Bearer <token>' https://holiday-calendar.fi/api/schedule/<name>

Result

Empty body

Change availability in schedule

PUT /api/schedule/<name>

curl -XPUT -H "Content-Type: application/json" -H "Authorization: Bearer <token>" -d '{<data>: <availability>, ...}' https://holiday-calendar.fi/api/schedule/<name>

Request body

availability indexed by data

{"2025-08-10": "available", "2025-08-11": "not_set", "2025-08-12": "unavailable"}

Result

Empty body

Get availabilities in Schedule

GET /api/schedule/<name>

curl -H "Authorization: Bearer <token>" 'http://holiday-calendar.fi/api/schedule/<name>?start=<date>&end=<date>'

Parameters

Result

A JSON object of lists of `availability` indexed by `date` and then `username`. `not_set` is filled in from holiday calendar.

{
    "2025-08-10": {
        "john-doe": "available",
        "jane-doe": "unavailable"
    },
    "2025-08-11": {
        "john-doe": "unavailable",
        "jane-doe": "unavailable"
    },
    "2025-08-12" {
        "john-doe": "unavailable",
        "jane-doe": "unavailable"
    }
}

Considerations

Currently API is rate limited to 2 requests per second.

In order to register an account on the Web API or directly using the REST API, you must specify a working email address. Email address is used for register confirmation and forgor password functionality. Email address and full name fields are hidden from other users and login. Username should be considered public.