This section details about the service APIs for the Holidays.
Holidays
GET /holidays
This service will get all the holidays.
Resource URL
GET /holidays
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
Example Response
Copy {
"id": null,
"version": null,
"responsetime": "2019-11-15T09:41:14.274Z",
"metadata": null,
"response": {
"holidays": [
{
"id": 2000001,
"locationCode": "KTA",
"holidayDate": "2019-01-01",
"holidayDay": "2",
"holidayMonth": "1",
"holidayYear": "2019",
"holidayName": "New Year's Day",
"holidayDesc": "National Holiday",
"langCode": "eng",
"isActive": true
}
]
},
"errors": null
}
Response Code : 200 (OK)
POST /holidays
This service will create a new holiday.
Resource URL
POST /holidays
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
Example Request
Copy {
"id": "string",
"metadata": {},
"request": {
"holidayDate": "string",
"holidayDay": "string",
"holidayDesc": "string",
"holidayMonth": "string",
"holidayName": "string",
"holidayYear": "string",
"id": 0,
"isActive": true,
"langCode": "string",
"locationCode": "string"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
Example Response
Copy {
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"id": "string",
"metadata": {},
"response": {
"holidayDate": "string",
"holidayName": "string",
"langCode": "string",
"locationCode": "string"
},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"version": "string"
}
Response Code : 200 (OK)
PUT /holidays
This service will update a holiday.
Resource URL
PUT /holidays
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
Example Request
Copy {
"id": "string",
"metadata": {},
"request": {
"id": 0,
"locationCode": "string",
"holidayDate": "string",
"holidayName": "string",
"holidayDesc": "string",
"langCode": "string",
"isActive": true,
"newHolidayName": "string",
"newHolidayDate": "string",
"newHolidayDesc": "string"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
Example Response
Copy {
"holidayDate": "string",
"holidayName": "string",
"langCode": "string",
"locationCode": "string"
}
Response Code : 200 (OK)
DELETE /holidays
This service will provides the service to delete a holiday.
Resource URL
DELETE /holidays
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
name of the holiday to be deleted
Example Request
Copy {
"id": "string",
"metadata": {},
"request": {
"holidayDate": "string",
"holidayName": "string",
"locationCode": "string"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
Example Response
Copy {
"holidayDate": "string",
"holidayName": "string",
"locationCode": "string"
}
Response Code : 200 (OK)
GET /holidays/{holidayid}
This service will provides the service to get all holidays by Id.
Resource URL
GET /holidays/{holidayid}
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
Example Response
Copy {
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"id": "string",
"metadata": {},
"response": {
"holidays": [
{
"holidayDate": "string",
"holidayDay": "string",
"holidayDesc": "string",
"holidayMonth": "string",
"holidayName": "string",
"holidayYear": "string",
"id": 0,
"isActive": true,
"langCode": "string",
"locationCode": "string"
}
]
},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"version": "string"
}
Response Code : 200 (OK)
GET /holidays/{holidayid}/{langcode}
This service will get all the holidays by holidayid and language code.
Resource URL
GET /holidays/{holidayid}/{langcode}
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
Example Response
Copy {
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"id": "string",
"metadata": {},
"response": {
"holidays": [
{
"holidayDate": "string",
"holidayDay": "string",
"holidayDesc": "string",
"holidayMonth": "string",
"holidayName": "string",
"holidayYear": "string",
"id": 0,
"isActive": true,
"langCode": "string",
"locationCode": "string"
}
]
},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"version": "string"
}
Response Code : 200 (OK)
GET /holidays/all
This service will retrieve all the holidays with additional metadata.
Resource URL
GET /holidays/all
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
page no for the requested data
page size for the requested data
sort the requested data based on param value
Example Response
Copy {
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"id": "string",
"metadata": {},
"response": {
"data": [
{
"createdBy": "string",
"holidayDate": 0,
"holidayDay": "string",
"holidayDesc": "string",
"holidayId": 0,
"holidayMonth": "string",
"holidayName": "string",
"holidayYear": "string",
"isActive": true,
"isDeleted": true,
"langCode": "string",
"locationCode": "string",
"name": "string",
"updatedBy": "string"
}
],
"pageNo": 0,
"totalItems": 0,
"totalPages": 0
},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"version": "string"
}
Response codes
Failure details
Error Code
Error Message
Error Description
Error occured while fetching Holidays
Error occurred while inserting holiday
Error occurred while updating holiday
Error occurred while deleting holiday
Error occured while fetching Location Hierarchy
POST /holidays/filtervalues
This API is used by the Administrator Portal UI to populate filter dropdowns on the Holiday List View UI Screen.
Resource URL
POST /holidays/filtervalues
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
Array of the filter applied. In case of "list" screen, this array will be empty
The column name in the JSON response
The value have to be in ["unique","all"]
Language code in Language code in ISO 639-2 format
Example Request
Copy {
"id": "string",
"metadata": {},
"request": {
"filters": [
{
"columnName": "string",
"type": "string",
"text": "string"
}
],
"languageCode": "string",
"optionalFilters": [
{
"value": "string",
"fromValue": "string",
"toValue": "string",
"columnName": "string",
"type": "string"
}
]
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
Example Response
Copy {
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"id": "string",
"metadata": {},
"response": {
"filters": [
{
"fieldID": "string",
"fieldValue": "string"
}
]
},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"version": "string"
}
Response Code : 200 (OK)
POST /holidays/search
This API is used by the Administrator Portal to fetch list of Holidays based on a given filter criteria to display the list of Holidays on the Portal UI.
Resource URL
POST /holidays/search
Resource details
Resource Details
Description
Parameters
Name
Required
Description
Default Value
Example
Array of the filter applied. In case of "list" screen, this array will be empty
The column name in the JSON response
The value have to be in ["contains","equals","startsWith","between"]
Value or id selected in the filter by the end user
If the type is "between", this field is the value of the fromName
If the type is "between", this field is the value of the toName
Language code in Language code in ISO 639-2 format
This is an array of the sort field and type
The field on which the sort is applied
This should be either of ['ASC','DESC']
The pagination parameter object
This is the amount of records to be fetched
Filter Values
Please find the filter columns used in search
Example Request
Copy {
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string",
"request": {
"filters" : [
{
"columnName": "",
"type": "in",
"value": "",
"fromValue": "",
"toValue": ""
}
],
"sort":[
{
"sortfield":"string",
"sorttype":"ASC"
}
],
"pagination":{
"pageStart":"number",
"pageFetch":"number"
},
"languageCode":""
}
}
Example Response
Copy {
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"holidays": [
{
"holidayDate": "string",
"holidayDay": "string",
"holidayDesc": "string",
"holidayMonth": "string",
"holidayName": "string",
"holidayYear": "string",
"id": 0,
"isActive": true,
"langCode": "string",
"locationCode": "string"
}
],
"fromRecord" : "number",
"toRecord":"number",
"totalRecord":"number"
}
}
Response Code : 200 (OK)