User Tools

Site Tools


api:pbx:time_router:holidays

API : PBX : Time Router holidays

Introduction

This API is used to return a list of official holidays for a given country and year. This makes it easy to setup rules to handle special days.

Request

URL https://api.telecomx.dk/pbx/timerouter/holidays
Method GET, POST
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
ADMIN.
Body/Query country String Country: DK, SE, NO.
year String Year - 1900-2100.

Request example

https://api.telecomx.dk/pbx/timerouter/holidays?year=2018&country=DK

Response

Array of holiday objects.

Holiday object
date Date Date of the holiday.
name String Name of the holiday in local language.

Example

[
 {
  "date": "2018-12-31T00:00:00.000Z",
  "name": "Nytårsaften"
 },
 {
  "date": "2018-12-26T00:00:00.000Z",
  "name": "2. juledag"
 },
 {
  "date": "2018-12-25T00:00:00.000Z",
  "name": "Juledag" 
 },
 {
  "date": "2018-12-24T00:00:00.000Z",
  "name": "Juleaften"
 },
 {
  "date": "2018-06-05T00:00:00.000Z",
  "name": "Grundlovsdag"
 },
 {
  "date": "2018-05-20T22:00:00.000Z",
  "name": "2. Pinsedag"
 },
 {
  "date": "2018-05-19T22:00:00.000Z",
  "name": "Pinsedag"
 },
 {
  "date": "2018-05-09T22:00:00.000Z",
  "name": "Kristi himmelfartsdag"
 },
 {
  "date": "2018-04-26T22:00:00.000Z",
  "name": "Store bededag"
 },
 {
  "date": "2018-04-01T22:00:00.000Z",
  "name": "2. Påskedag"
 },
 {
  "date": "2018-03-31T22:00:00.000Z",
  "name": "Påskedag"
 },
 {
  "date": "2018-03-29T22:00:00.000Z",
  "name": "Langfredag"
 },
 {
  "date": "2018-03-28T22:00:00.000Z",
  "name": "Skærtorsdag"
 },
 {
  "date": "2018-03-24T23:00:00.000Z",
  "name": "Palmesøndag"
 },
 {
  "date": "2018-01-01T00:00:00.000Z",
  "name": "Nytårsdag"
 }
]

Errors

Error code Message Description
422 country Invalid country
422 year Invalid year
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/time_router/holidays.txt · Last modified: 2018/09/07 11:05 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki