Links

Registration Center APIs

This section contains detail about the service APIs in the Registration Center Masterdata module

Registration Centers API

These APIs includes create, update and fetch APIs. Create and Update API is used by the Administrator Portal for the Create and Update Center functionality. Fetch APIs are used by Pre-Registration to display the List of Registration Centers on the UI for an Applicant to select and book appointments. Registration processor also uses the fetch API to validate if a packet is generated in an Authorized Registration Center or not.

POST /registrationcenters

This service will create the list of Registration Centers which are used in the MOSIP platform. Please find the steps to create primary/secondary languages

Resource URL

POST /registrationcenters

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
name
Yes
Name of the registration center
centertypecode
Yes
Code of the center type
addressline1
Yes
Line 1 of the address
addressline2
No
Line 2 of the address
addressline3
No
Line 3 of the address
locationcode
Yes
Code of the location of the registration center
longitude
Yes
Longitude of the registration center
latitude
Yes
Latitude of the registration center
contactphone
No
Contact phone number of the registration center
workinghours
Yes
Working hours of the registration center
perkioskprocesstime
Yes
Process time per kiosk in the registration center
centerstarttime
Yes
Office start time of the registration center
centerendtime
Yes
Office end time of the registration center
holidaylocationcode
Yes
Holiday location of the registration center
contactperson
No
Contact person of the registration center
lunchstarttime
No
Lunch start time of the registration center
lunchendtime
No
Lunch end time of the registration center
timezone
No
time zone of the registration center
lang_code
Yes
language code

Example Request

{
"id": "string",
"metadata": null,
"request": {
"addressLine1": "address 1",
"addressLine2": "",
"addressLine3": "",
"centerEndTime": "18:00:00",
"centerStartTime": "09:30:00",
"centerTypeCode": "REG",
"contactPerson": "",
"contactPhone": "",
"holidayLocationCode": "KTA",
"langCode": "eng",
"latitude": "2.1111",
"locationCode": "14000",
"longitude": "2.1111",
"lunchEndTime": "00:00:00",
"lunchStartTime": "00:00:00",
"name": "Regcenter 1",
"perKioskProcessTime": "00:15:00",
"timeZone": "(GTM+01:00) CENTRAL EUROPEAN TIME",
"workingHours": 8.5,
"zoneCode": "TTA",
"id": "",
"isActive": false
},
"version": "1.0",
"requesttime": "2019-11-18T10:46:23.956Z"
}

Error Response:

{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"response": null
}

Failure details

Error Code
Error Message
Error Description
KER-MSD-500
Internal Server Error
If system error occurs
KER-ATH-403
Forbidden
If unauthorized role detected
KER-ATH-401
Authentication Failed
If no role/invalid token is detected
KER-MSD-060
Error occurred while Inserting Registration Center details
If any error occur from database
KER-MSD-303
Received data is not present in all Languages supported by MOSIP
If all the mandatory data is not received in all the configured languages
KER-MSD-306
Records with duplicate language code found
if records received contain duplicate language codes
KER-MSD-307
Latitude or Longitude must have minimum 4 digits after decimal
If the Latitude and/or Longitude are in invalid format
KER-MSD-308
Center Lunch Start Time must be smaller than Center Lunch End Time
If Center Lunch start time is bigger than Center Lunch End Time
KER-MSD-309
Center Start Time must be smaller than Center End Time
If Center Start time is bigger than Center End Time

PUT /registrationcenters

This service will update the list of Registration Centers which are used in the MOSIP platform.

Resource URL

PUT /registrationcenters

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
name
Yes
Name of the registration center
id
Yes
Id of the registration center
Incase of Primary empty and Generated id incase of Secondary
centertypecode
Yes
Code of the center type
addressline1
Yes
Line 1 of the address
addressline2
No
Line 2 of the address
addressline3
No
Line 3 of the address
locationcode
Yes
Code of the location of the registration center
longitude
Yes
Longitude of the registration center
latitude
Yes
Latitude of the registration center
contactphone
No
Contact phone number of the registration center
workinghours
Yes
Working hours of the registration center
perkioskprocesstime
Yes
Process time per kiosk in the registration center
centerstarttime
Yes
Office start time of the registration center
centerendtime
Yes
Office end time of the registration center
holidaylocationcode
Yes
Holiday location of the registration center
isactive
Yes
Is the registration center active
contactperson
No
Contact person of the registration center
lunchstarttime
No
Lunch start time of the registration center
lunchendtime
No
Lunch end time of the registration center
timezone
No
time zone of the registration center
lang_code
Yes
language code
numberOfKiosks
No
Number of Kiosks

Example Request

{
"id": "string",
"metadata": null,
"request": {
"addressLine1": "address 1",
"addressLine2": "",
"addressLine3": "",
"centerEndTime": "18:00:00",
"centerStartTime": "09:30:00",
"centerTypeCode": "REG",
"contactPerson": "fdsf",
"contactPhone": "",
"holidayLocationCode": "KTA",
"langCode": "eng",
"latitude": "2.1111",
"locationCode": "14000",
"longitude": "2.1111",
"lunchEndTime": "00:00:00",
"lunchStartTime": "00:00:00",
"name": "Regcenter 21",
"perKioskProcessTime": "00:15:00",
"timeZone": "(GTM+01:00) CENTRAL EUROPEAN TIME",
"workingHours": "8.5",
"zoneCode": "TTA",
"id": "10936",
"isActive": true,
"numberOfKiosks": 0
},
"version": "1.0",
"requesttime": "2019-12-02T15:32:26.503Z"
}

Error Response:

{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"response": null
}

Failure details

Error Code
Error Message
Error Description
KER-MSD-500
Internal Server Error
If system error occurs
KER-ATH-403
Forbidden
If unauthorized role detected
KER-ATH-401
Authentication Failed
If no role/invalid token is detected
KER-ATH-111
Error occurred while updating Registration Center details
If any error occur from database
KER-MSD-303
Received data is not present in all Languages supported by MOSIP
If all the mandatory data is not received in all the configured languages
KER-MSD-304
Center IDs received for all languages is not same
If all the IDs received are not same for data in all the languages
KER-MSD-305
Center ID and Language Code combination is not unique in the request received
If combination of Center ID and Language code in duplicate in request
KER-MSD-306
Records with duplicate language code found
if records received contain duplicate language codes
KER-MSD-307
Latitude or Longitude must have minimum 4 digits after decimal
If the Latitude and/or Longitude are in invalid format
KER-MSD-308
Center Lunch Start Time must be smaller than Center Lunch End Time
If Center Lunch start time is bigger than Center Lunch End Time
KER-MSD-309
Center Start Time must be smaller than Center End Time
If Center Start time is bigger than Center End Time

GET /registrationcenters

This service will provides the service for the List of Registration Centers.

Resource URL

GET /registrationcenters

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
-NA-

Example Response

{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"registrationcenters": [
{
"registrationcentername":"",
"centertypecode":"",
"addressline1":"",
"addressline2":"",
"addressline3 ":"",
"longitude ":"",
"latitude":"",
"contactphone":"",
"numberofkiosks":"",
"workinghours":"",
"perkioskprocesstime":"",
"officestarttime":"",
"officeendtime":"",
"holidaylocationcode":"",
"isactive":"",
"centertype":"",
"address":"",
"workinghours":"",
"contactnumber":"",
"pincode":"",
"locationcode":""
},
{
"registrationcentername":"",
"centertypecode":"",
"addressline1":"",
"addressline2":"",
"addressline3 ":"",
"longitude ":"",
"latitude":"",
"contactphone":"",
"numberofkiosks":"",
"workinghours":"",
"perkioskprocesstime":"",
"officestarttime":"",
"officeendtime":"",
"holidaylocationcode":"",
"isactive":"",
"centertype":"",
"address":"",
"workinghours":"",
"contactnumber":"",
"pincode":"",
"locationcode":""
}
]
}
}

GET /registrationcenters/{id}/{languagecode}

This service will provides the service for the List of Registration Centers.

Resource URL

GET /registrationcenters/{id}/{languagecode}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
-NA-

Example Response

{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"registrationcenters": [
{
"registrationcentername":"",
"centertypecode":"",
"addressline1":"",
"addressline2":"",
"addressline3 ":"",
"longitude ":"",
"latitude":"",
"contactphone":"",
"numberofkiosks":"",
"workinghours":"",
"perkioskprocesstime":"",
"officestarttime":"",
"officeendtime":"",
"holidaylocationcode":"",
"isactive":"",
"centertype":"",
"address":"",
"workinghours":"",
"contactnumber":"",
"pincode":"",
"locationcode":""
},
{
"registrationcentername":"",
"centertypecode":"",
"addressline1":"",
"addressline2":"",
"addressline3 ":"",
"longitude ":"",
"latitude":"",
"contactphone":"",
"numberofkiosks":"",
"workinghours":"",
"perkioskprocesstime":"",
"officestarttime":"",
"officeendtime":"",
"holidaylocationcode":"",
"isactive":"",
"centertype":"",
"address":"",
"workinghours":"",
"contactnumber":"",
"pincode":"",
"locationcode":""
}
]
}
}

GET /getregistrationcenterholidays/{languagecode}/{registrationcenterid}/{year}

This service will list of holidays for a particular registration center for that particular year.

Resource URL

GET /getregistrationcenterholidays/{languagecode}/{registrationcenterid}/{year}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
registrationcenterid
Yes
ID of the registration center
year
Yes
The year for which the list of holidays is listed

Example Response

{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"registrationcenter": [
{
"registrationcentername":"",
"centertypecode":"",
"addressline1":"",
"addressline2":"",
"addressline3 ":"",
"longitude ":"",
"latitude":"",
"contactphone":"",
"numberofkiosks":"",
"workinghours":"",
"perkioskprocesstime":"",
"officestarttime":"",
"officeendtime":"",
"holidaylocationcode":"",
"isactive":"",
"centertype":"",
"address":"",
"workinghours":"",
"contactnumber":"",
"pincode":"",
"locationcode":"",
"holidays": [
"holiday" : {
"holidayID": "string",
"holidayDate": "string",
"holidayName": "string",
"holidayDay": "string",
"holidayMonth": "string",
"holidayYear": "string",
"languagecode":"string"
}
]
}
]
}
}
200

GET /getlocspecificregistrationcenters/{langcode}/{locationcode}

This service will return a list of enrollment center details based on the location code

Resource URL

GET /getlocspecificregistrationcenters/{langcode}/{locationcode}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
locationcode
Yes
The location code for which the list of enrollment centers are needed

Example Response

{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"registrationCenters": [
{
"addressLine1": "string",
"addressLine2": "string",
"addressLine3": "string",
"centerEndTime": "HH:mm:ss",
"centerStartTime": "HH:mm:ss",
"centerTypeCode": "string",
"contactPerson": "string",
"contactPhone": "string",
"holidayLocationCode": "string",
"id": "string",
"isActive": true,
"languageCode": "string",
"latitude": "string",
"locationCode": "string",
"longitude": "string",
"lunchEndTime": "HH:mm:ss",
"lunchStartTime": "HH:mm:ss",
"name": "string",
"numberOfKiosks": 0,
"perKioskProcessTime": "HH:mm:ss",
"timeZone": "string",
"workingHours": "string"
}
]
}
}
200
Description: OK

GET /getcoordinatespecificregistrationcenters/{languagecode}/{longitude}/{latitude}/{proximitydistance}

This service will return a list of enrollment center details based on the coordinates

Resource URL

GET /getcoordinatespecificregistrationcenters/{languagecode}/{longitude}/{latitude}/{proximitydistance}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
languagecode
Yes
Language code in Language code in ISO 639-2 format
longitude
Yes
The longitude for which the list of enrollment centers are needed
latitude
Yes
The latitude code for which the list of enrollment centers are needed
proximitydistance
Yes
The proximity diameter in meter

Example Response

{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"registrationcenter": [
{
"registrationcentername":"",
"centertypecode":"",
"addressline1":"",
"addressline2":"",
"addressline3 ":"",
"longitude ":"",
"latitude":"",
"contactphone":"",
"numberofkiosks":"",
"workinghours":"",
"perkioskprocesstime":"",
"officestarttime":"",
"officeendtime":"",
"holidaylocationcode":"",
"isactive":"",
"centertype":"",
"address":"",
"workinghours":"",
"contactnumber":"",
"pincode":"",
"locationcode":""
}
]
}
}
200
Description: Success

GET /registrationcentershistory/{id}/{languagecode}/{eff_dtimes}

This service will provides the service for the List of Registration Centers History.

Resource URL

GET /registrationcentershistory/{id}/{languagecode}/{eff_dtimes}

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Parameters

Name
Required
Description
Default Value
Example
-NA-