MOSIP Docs 1.1.5
GitHubCommunityTech Blogs
  • Home
  • Architecture
    • Guiding Principles
    • MOSIP Architecture
      • Technology Stack
    • MOSIP and Data
      • Naming Standards
      • Data-Model
    • Privacy & Security
      • Cryptography in MOSIP
    • Anonymous Profiling Support
  • Modules
    • Pre-Registration
      • Pre-Registration Functionality
      • UI Specification for Pre-registration
      • Pre-Registration Configuration
    • Registration
      • Registration Functionality
      • Registration Packet
      • Registration Client Setup
      • First User Registration and Onboarding
      • Guide to Configure MOSIP for Biometrics
      • Guide to On-board Biometric Devices
      • Device Integration Specifications
      • UI Specification for Registration Client
    • Registration Processor
      • Registration Processor Functionality
      • Deduplication and Manual Adjudication
      • MOSIP ID Object Definition
    • ID Repository
    • ID Authentication
      • ID Authentication Functionality
    • Resident Services
      • Resident Services Functionality
    • Partner Management
      • Partner Management Functionality
      • MOSIP Partner Secure Communication
      • Partner Self Service Portal
    • Administration
      • Admin Services Functionality
      • Download Card
    • Kernel
      • Audit Manager Functionality
        • Admin Service Audits
        • Resident Service Audits
        • Partner Management Audits
        • Registration Client Audits
        • Registration Processor Audits
        • ID Repository Audits
        • ID Authentication Audits
        • Pre-registration Audits
      • Authentication and Authorization Functionality
      • Auth Adapter
      • Auth Implementation
      • Common Services Functionality
      • Data Services Functionality
      • Master Data Services Functionality
      • UIN and VID Generation Service Functionality
      • VID Generator
  • Biometrics
    • ABIS
    • Biometric SDK
    • MDS Specification
    • Biometric Specification
    • CBEFF XML
    • Compliance Tool Kit
  • Build & Deploy
    • Sandbox Installer
    • Deployment Architectures
    • Cell Based Deployment Architecture
    • Hardware Security Module HSM Specifications
    • Hardware Sizing
    • Customizations for a Country
    • Other Installation Guides
      • Steps to Install and Configure HDFS
      • Steps to Install and use PostgreSQL Version 10.2 on RHEL 7.5
      • Steps to Install Clam AntiVirus Version 0.101.0
      • Steps to Install Keycloak Standalone Server
    • Services in MOSIP
  • Glossary
  • Contribute
    • Call for Contribution
    • Contributor's Guide
    • Code of Conduct
    • Issue Reporting Guideline
    • Coding Standards
      • Auth Angular User Guide
      • Auth SpringBoot User Guide
      • Gitub Workflow
      • MOSIP Java Coding Standards
      • MOSIP REST API guidelines
      • Registration Client UI Developer Document
      • Registration Client Developer Documentation
      • Security Tools
    • Testing
      • Test Rig Design
      • Tester Documentation
      • Testing Attachments Kernel
  • APIs
    • ABIS APIs
    • Admin APIs
    • AuthN and AuthZ APIs
    • Biometric SDK APIs
    • BlacklistedWords APIs
    • Common APIs
    • Device APIs
    • Device Type and Subtype APIs
    • Device Management APIs
    • Document APIs
    • Dynamic Fields APIs
    • Holiday APIs
    • ID Authentication APIs
    • ID Repository APIs
    • ID Schema APIs
    • Kernel APIs
    • Machine APIs
    • Master Data Biometric APIs
    • Packet APIs
    • Packet Manager APIs
    • Partner Management Service APIs
    • Pre Registration APIs
    • Registration Center APIs
    • Registration Processor APIs
    • Resident Service APIs
    • Sync Data APIs
    • Template APIs
    • Zone APIs
  • Older Releases
    • Release Notes 1.1.5
      • Enhancements
      • Defect Fixes
      • Patches
        • Patch 1.1.5.5
        • Patch 1.1.5.5-P1
    • Release Notes 1.1.4
      • Enhancements
      • Defect Fixes
    • Release Notes 1.1.3
      • Features
      • Bug Fixes
    • Release Notes 1.1.2
      • Features
      • Bug Fixes
    • Release Notes 1.1.1
      • Bug Fixes
      • Artifact Version
    • Release Notes 1.1.0
      • Features
      • Bug Fixes
      • 1.2.0 Features
      • Artifact Version
    • Release Notes 1.0.6
    • Release Notes 1.0.5
    • Release Notes 1.0.0
      • Features
    • Release Notes 0.9.0
  • Roadmap
    • Roadmap Activities
  • Revision History
  • License
Powered by GitBook
On this page
  • 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

Was this helpful?

Export as PDF
  1. APIs

Holiday APIs

PreviousDynamic Fields APIsNextID Authentication APIs

Last updated 3 years ago

Was this helpful?

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

Response format

JSON

Requires Authentication

Yes

Parameters

Name
Required
Description
Default Value
Example

--NA--

Example Response

{
  "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

Response format

JSON

Requires Authentication

Yes

Parameters

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?

Example Request

{
  "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

{
  "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

Response format

JSON

Requires Authentication

Yes

Parameters

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

Example Request

{
  "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

{
  "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

Response format

JSON

Requires Authentication

Yes

Parameters

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

Example Request

{
  "id": "string",
  "metadata": {},
  "request": {
    "holidayDate": "string",
    "holidayName": "string",
    "locationCode": "string"
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Example Response

{
  "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

Response format

JSON

Requires Authentication

Yes

Parameters

Name
Required
Description
Default Value
Example

holidayid

yes

holiday Id

Example Response

{
  "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

Response format

JSON

Requires Authentication

Yes

Parameters

Name
Required
Description
Default Value
Example

holidayid

yes

holiday Id

langCode

Yes

language code

Example Response

{
  "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

Response format

JSON

Requires Authentication

Yes

Parameters

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

Example Response

{
  "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

Response Code
Description

200

Success

400

Bad request

401

Unauthorized

403

Forbidden

Failure details

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

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

Response format

JSON

Requires Authentication

Yes

Parameters

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

Example Request

{
  "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

{
  "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

Response format

JSON

Requires Authentication

Yes

Parameters

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 fromName

-NA-

toValue

No

If the type is "between", this field is the value of the toName

-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

0

pageFetch

This is the amount of records to be fetched

10

10

Filter Values

Please find the filter columns used in search

  1. holidayName

  2. holidayDate|["between"]

  3. isActive

Example Request

{
  "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

{
  "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)


GET /holidays
POST /holidays
PUT /holidays
DELETE /holidays
GET /holidays/{holidayid}
GET /holidays/{holidayid}/{langcode}
GET /holidays/all
POST /holidays/filtervalues
POST /holidays/search