This section details about the service APIs for the Holidays
- GET /holidays
- POST /holidays
- PUT /holidays
- DELETE /holidays
- GET /holidays/{holidayid}
- GET /holidays/{holidayid}/{langcode}
- GET /holidays/all
- POST /holidays/filtervalues
- POST /holidays/search
This service will get all the holidays.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
--NA-- |
{
"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
}
200
Description: Success
404
Description: Not Found
401
Description: Unauthorized
403
Description: Forbidden
This service will create a new holiday.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
locationCode | Yes | location code | ||
holidayDate | Yes | date | ||
holidayMonth | Yes | month | ||
holidayYear | Yes | year | ||
holidayName | Yes | name | ||
holidayDesc | Yes | description | ||
langCode | Yes | language code | ||
isActive | Yes | is active? |
{
"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"
}
{
"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"
}
201
Description: Created
401
Description: Unauthorized
403
Description: Forbidden
204
Description: Not Found
This service will update a holiday.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
locationCode | Yes | location code | ||
holidayDate | Yes | date | ||
newHolidayDate | Yes | new date | ||
newHolidayName | Yes | new name | ||
holidayName | Yes | name | ||
holidayDesc | Yes | description | ||
langCode | Yes | language code | ||
isActive | Yes | is active? | ||
newHolidayDesc | Yes | new description |
{
"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"
}
{
"holidayDate": "string",
"holidayName": "string",
"langCode": "string",
"locationCode": "string"
}
200
Description: Success
201
Description: Created
401
Description: Unauthorized
403
Description: Forbidden
404
Description: Not Found
This service will provides the service to delete a holiday.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
holidayDate | Yes | date to be deleted | ||
holidayName | Yes | name of the holiday to be deleted | ||
locationCode | Yes | location code |
{
"id": "string",
"metadata": {},
"request": {
"holidayDate": "string",
"holidayName": "string",
"locationCode": "string"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
{
"holidayDate": "string",
"holidayName": "string",
"locationCode": "string"
}
200
Description: Success
204
Description: No Content
401
Description: Unauthorized
403
Description: Forbidden
This service will provides the service to get all holidays by Id.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
holidayid | yes | holiday Id |
{
"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"
}
200
Description: Success
401
Description: Unauthorized
403
Description: Forbidden
404
Description: Not found
This service will get all the holidays by holidayid and language code.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
holidayid | yes | holiday Id | ||
langCode | Yes | language code |
{
"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"
}
200
Description: Success
401
Description: Unauthorized
403
Description: Forbidden
404
Description: Not Found
This service will retrieve all the holidays with additional metadata.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
orderBy | optional | response order | desc | |
pageNumber | optional | page no for the requested data | 0 | |
pageSize | optional | page size for the requested data | 10 | |
sortBy | optional | sort the requested data based on param value | createdDateTime |
{
"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"
}
200
Description: Success
500
Description: Error occured while retrieving holidays
401
Description: Unauthorized
403
Description: Forbidden
404
Description: Not found
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-019 | Error occured while fetching Holidays | Fetch Issue |
KER-MSD-020 | Holiday not found | Data Not Found |
KER-MSD-065 | Error occurred while inserting holiday | Insertion Issue |
KER-MSD-099 | Error occurred while updating holiday | Update Issue |
KER-MSD-100 | Error occurred while deleting holiday | Deletion Issue |
KER-MSD-025 | Error occured while fetching Location Hierarchy | fetch issue |
KER-MSD-026 | Location not found | Data Not Found |
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
filters | No | Array of the filter applied. In case of "list" screen, this array will be empty | -NA- | |
columnName | No | The column name in the JSON response | -NA- | |
type | No | The value have to be in ["unique","all"] | unique | unique |
languagecode | Yes | Language code in Language code in ISO 639-2 format |
{
"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"
}
{
"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"
}
200
Description: Success
401
Description: Unauthorized
403
Description: Forbidden
404
Description: Not found
This service is for the holdays search functionality. All the filter parameters are passed and the holidays are searched and the matching results are returned.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
filters | No | Array of the filter applied. In case of "list" screen, this array will be empty | -NA- | |
columnName | No | The column name in the JSON response | -NA- | |
type | No | The value have to be in ["contains","equals","startsWith","between"] | -NA- | |
value | No | Value or id selected in the filter by the end user | -NA- | |
fromValue | No | If the type is "between", this field is the value of the start range | -NA- | |
toValue | No | If the type is "between", this field is the value of the end range | -NA- | |
languagecode | Yes | Language code in Language code in ISO 639-2 format | ||
sort | No | This is an array of the sort field and type | ||
sortfield | The field on which the sort is applied | modifiedDate | ||
sorttype | This should be either of ['ASC','DESC'] | ASC | ||
pagination | The pagination parameter object | |||
pageStart | This is the start index | 0 | 10 | |
pageFetch | This is the amount of records to be fetched | 10 | 10 |
{
"id": "string",
"metadata": {},
"request": {
"filters": [
{
"value": "string",
"fromValue": "string",
"toValue": "string",
"columnName": "string",
"type": "string"
}
],
"sort": [
{
"sortField": "string",
"sortType": "string"
}
],
"pagination": {
"pageStart": 0,
"pageFetch": 0
},
"languageCode": "string"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
{
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"id": "string",
"metadata": {},
"response": {
"data": [
{
"createdBy": "string",
"description": "string",
"isActive": true,
"isDeleted": true,
"langCode": "string",
"updatedBy": "string",
"word": "string"
}
],
"fromRecord": 0,
"toRecord": 0,
"totalRecord": 0
},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"version": "string"
}