Common APIs
This section contains detail about the service APIs in the Common Master data module
Title APIs These APIs includes create, update and fetch APIs. Create and Update API is used by the Administrator Portal for the Create and Update Title functionality. Fetch APIs are used by IDA to separate out Name from the title.
Gender APIs These APIs includes create, update and fetch APIs. Create and Update API is used by the Administrator Portal for the Create and Update Gender functionality. Fetch API is used by Pre-Registration to display the Genders on the demographic form page for the applicant to select one gender while filling out the form.
Age Group Types APIs This service will provide the age group based on the passed age.
ID Types APIs These API contains the Create and Fetch ID types API.
Holidays APIs These APIs includes create, update and fetch APIs. Create and Update API is used by the Administrator Portal for the Create and Update Holiday functionality. Fetch API is used by Pre-Registration to refer the list of Holiday for a Registration Center while generating booking appointments.
Locations APIs These APIs includes create, update and fetch APIs. Create and Update API is used by the Administrator Portal for the Create and Update Location functionality. Fetch API is used by Pre-Registration and ID objected validator. Pre-Registration uses this API to display locations in the demographic form page for applicant to select locations from the dropdown while filling in the address. ID object validator uses the fetch API to validate the value of location received in the packet against the Masterdata.
Languages APIs These include APIs to create, update and fetch MOSIP supported languages.
Individual Types APIs These includes the APIs to fetch list of Individual Types. This API is used by Pre-Registration to display the list of Individual type for an applicant to select on the Demographic page.
Application Types APIs These include APIs to create, update and fetch name of MOSIP Applications.
Blacklisted Words APIs These APIs includes create, update and fetch APIs. Create and Update API is used by the Administrator Portal for the Create and Update Blacklisted Word functionality. Fetch API is used by Pre-Registration to verify if a Blacklisted word in entered by the Applicant in the Demographic form.
Working days APIs This API is fetches the defined working days of a week for a Registration Center. It is used by Pre-Registration to consider working days while generating booking appointments for a Registration Center.
Exceptional holidays APIs This API is fetches the list of exceptional holidays if any defined for a Registration Center. It is used by Pre-Registration to consider exceptional holidays while generating booking appointments for a Registration Center.
Title
POST /title
This service will create the list of Title which are used in the MOSIP platform.
Resource URL
POST /title
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
titletype
Yes
Name of the title
Example Request
Example Response
Response Code : 200 (OK)
GET /title
This service will provides the service for list of all titles.
Resource URL
GET /title
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
NA
NA
NA
NA
NA
Example Response
Response Code : 200 (OK)
GET /title/{langcode}
This service will provides the service for the List of Titles.
Resource URL
GET /title/{langcode}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
langcode
Yes
Code of the language
Example Response
Response Code : 200 (OK)
PUT /title
This service will provides the service for updating a particular title.
Resource URL
PUT /title
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
code
Yes
Code of the title
titleName
Yes
Name of the title
isActive
Yes
Name of the title
langCode
Yes
Name of the title
titleDescription
Yes
Name of the title
Example Response
Response Code : 200 (OK)
DELETE /title/{code}
This service will provides the service for deleting a particular title.
Resource URL
DELETE /title/{code}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
code
Yes
Code of the title
Example Response
Response Code : 200 (OK)
Failure Response
Response Code : 200 (OK)
GET /title/all
This service will provides the service for list of all titles.
Resource URL
GET /title/all
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
orderBy
optional
order the requested data based on param
pageNumber
optional
page no for the requested data
pageSize
optional
page size for the requested data
sortBy
optional
sort the requested data based on param value
Example Response
Response Code : 200 (OK)
Failure details
KER-MSD-047
Error occured while fetching Titles
Fetch Issue
KER-MSD-XXX
Error occurred while inserting Title details
Insertion Issue
KER-MSD-048
Title not found
Data Not Found
KER-MSD-103
Error occurred while updating Title details
Update Issue
KER-MSD-104
Error occurred while deleting Title details
Deletion Issue
POST /titles/search
This API is used by the Administrator Portal to fetch list of Titles based on a given filter criteria to display the list of Titles on the Portal UI.
Resource URL
POST /titles/search
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
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 ["in","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
0
pageFetch
This is the amount of records to be fetched
10
10
Filter Values
name
["contains","equals","startsWith"]
status
["equals"]
Example Request
Example Response
Response Code : 200 (OK)
POST /titles/filtervalues
This API is used by the Administrator Portal UI to populate filter dropdowns on the Title List View UI Screen.
Resource URL
POST /titles/filtervalues
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
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
Example Response
Response Code : 200 (OK)
Gender
POST /gendertypes
This service will create the list of Gender which are used in the MOSIP platform.
Resource URL
POST /gendertypes
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
gendertype
Yes
Name of the gender
Example Request
Example Response
Response Code : 200 (OK)
PUT /gendertypes
This service will update Gender which are used in the MOSIP platform.
Resource URL
PUT/gendertypes
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
code
Yes
Code of gender type
genderName
Yes
Name of gender type
isActive
Yes
is active or not
code
Yes
language code of gender
Example Request
Example Response
Response Code : 200 (OK)
DELETE /gendertypes/{code}
This service will delete Gender which are used in the MOSIP platform.
Resource URL
DELETE/gendertypes/{code}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
code
Yes
Code of gender type
Example Response
Response Code : 200 (OK)
GET /gendertypes
This service will provides the service for the List of Genders.
Resource URL
GET /gendertypes
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
NA
NA
NA
NA
NA
Example Response
Response Code : 200 (OK)
GET /gendertypes/{langcode}
This service will provides the service for the List of Genders.
Resource URL
GET /gendertypes/{langcode}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
langcode
Yes
Code of the language
Example Response
Response Code : 200 (OK)
GET /gendertypes/{gendername}
This service will provides the gender based on the gender name.
Resource URL
GET /gendertypes/{gendername}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
gendername
Yes
Name of the gender
Example Response
Response Code : 200 (OK)
Failure Response
Response Code : 200 (OK)
GET gendertypes/all
This service will provides all gendertypes details.
Resource URL
GET gendertypes/all
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
orderBy
optional
order the requested data based on param
pageNumber
optional
page no for the requested data
pageSize
optional
page size for the requested data
sortBy
optional
sort the requested data based on param value
Example Response
Response Code : 200 (OK)
Failure details
KER-MSD-017
Error occured while fetching gender types
Fetch Issue
KER-MSD-018
Gender Type not found
Not Found
KER-MSD-068
Could not insert Gender Data
Insert Issue
KER-MSD-101
Error occurred while updating Gender Type details
Update Issue
KER-MSD-102
Error occurred while deleting Gender Type details
Delete Issue
POST /genders/search
This API is used by the Administrator Portal to fetch list of Genders based on a given filter criteria to display the list of Genders on the Portal UI.
Resource URL
POST /genders/search
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
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
0
pageFetch
This is the amount of records to be fetched
10
10
Example Request
Example Response
Response Code : 200 (OK)
POST /genders/filtervalues
This API is used by the Administrator Portal UI to populate filter dropdowns on the Gender List View UI Screen.
Resource URL
POST /genders/filtervalues
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
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
Example Response
Response Code : 200 (OK)
Age Group Types
GET /agegrouptype/{age}
This service will provides the age group based on the passed age.
Resource URL
GET /agegrouptype/{age}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
-NA-
Example Response
Failure Response
Response Code : 200 (OK)
ID Types
POST /idtypes
This service will create the list of Id types which are used in the MOSIP platform.
Resource URL
POST /idtypes
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
idtype
Yes
Name of the id type
languagecode
Yes
Language of the id type
Example Request
Example Response
Response Code : 200 (OK)
GET /idtypes/{langcode}
This service will provides the service for the List of id types based on language.
Resource URL
GET /idtypes/{langcode}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
langcode
Yes
Code of the language
Example Response
Response Code : 200 (OK)
Failure Response
Response Code : 200 (OK)
Failure details
KER-MSD-022
ID Type not found.
Not Found
KER-MSD-021
Error occurred while fetching ID Types
Fetch Issue
KER-MSD-059
Error occurred while inserting ID Type details.
Insert Issue
Holidays
GET /holidays
This service will get all the holidays.
Resource URL
GET /holidays
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
--NA--
Example Response
Response Code : 200 (OK)
POST /holidays
This service will create a new holiday.
Resource URL
POST /holidays
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
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
Example Response
Response Code : 200 (OK)
PUT /holidays
This service will update a holiday.