20.03.18 Holidays

The Holiday Object

Object PropertyRequiredObject TypeDescriptionMax Character Length
AccountHolidayIdYesGuidHoliday Type Id of Holiday32
HolidayNameYesStringHoliday Name of Holiday25
HolidayDateYesDateTimeHoliday Date of Holiday19
AccountHolidayDetailIdNoGuidHoliday Type Detail Id of Holiday32

List All Holidays

Returns a list of your all Holidays in your UNItekTIME account.
GET /API/Holidays

Example Request

curl "https://demo.unitektime.com/api/Holidays" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
    {
        "AccountHolidayDetailId": "00000000-0000-0000-0000-000000000000",
        "AccountHolidayId": "00000000-0000-0000-0000-000000000000",
        "HolidayName": "Demo",
        "HolidayDate": "2018-01-01T00:00:00+00:00"
    },
    {
        "AccountHolidayDetailId": "00000000-0000-0000-0000-000000000000",
        "AccountHolidayId": "00000000-0000-0000-0000-000000000000",
        "HolidayName": "Demo 2",
        "HolidayDate": "2018-01-01T00:00:00+00:00"
    }
]

Retrieve a Holiday

Retrieves the Holiday with the given ID. Returns a Holiday object and a 200 OK response code if a valid identifier was provided.
GET /API/Holidays/{Holiday_ID}

Example Request

curl "https://demo.unitektime.com/api/Holidays/00000000-0000-0000-0000-000000000000" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
    {
        "AccountHolidayDetailId": "00000000-0000-0000-0000-000000000000",
        "AccountHolidayId": "00000000-0000-0000-0000-000000000000",
        "HolidayName": "Demo 2",
        "HolidayDate": "2018-01-01T00:00:00+00:00"
    }
]

Create a Holiday

Creates a Holiday in your UNItekTIME account and returns the Response Message.
POST /API/Holidays
Object PropertyRequiredObject TypeDescriptionMax Character Length
AccountHolidayIdYesGuidHoliday Type Id of Holiday32
HolidayNameYesStringHoliday Name of Holiday25
HolidayDateYesDateTimeHoliday Date of Holiday19

Example Request

curl "https://demo.unitektime.com/api/Holidays" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'HolidayName': 'Sample','AccountHolidayId':'00000000-0000-0000-0000-0000000000000','HolidayDate','2018-01-01'}"

Example Response

[
    {
        "id": "00000000-0000-0000-0000-0000000000000",
        "message": "Holiday Added Successfully"
    }
]

Update a Holiday

Update an Holiday in your UNItekTIME account and returns the Response Message.
POST /API/Holidays/{Holiday_ID}

Example Request

curl "https://demo.unitektime.com/api/Holidays/00000000-0000-0000-0000-000000000000" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'HolidayDate','2018-01-01'}"

Example Response

[
    {
        "id": "00000000-0000-0000-0000-000000000000",
        "message": "Holiday Update Successfully"
    }
]

Delete a Holiday

Delete a Holiday. Returns a 200 OK response code if the call succeeded.
DELETE /API/Holiday/{Holiday_ID}

Example Request

curl "https://demo.unitektime.com/api/Holidays/00000000-0000-0000-0000-000000000000" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X DELETE \
      -H "Content-Type: application/json"

Example Response

[
    {
        "id": "00000000-0000-0000-0000-000000000000",
        "message": "Holiday Deleted successfully"
    }
]