Pre Registration APIs
This section details about the service API in the Pre-Registration modules.
Note: The id, version and requesttime in request and responsetime in response bodies are optional fields and not consumed by pre-registration application unless defined. Though we need to pass these as part of the request, it should not be tested. Few of the error messages are intended for API consumer, who are mostly SI and developers. User friendly messages need to be mapped in the UI reference implementation.
API testing Prerequisites
Generate a Authorization Token by using following Kernel AuthManager APIs
To send an OTP /authmanager/sendOTPUsingPOST
To validate the OTP /authmanager/userIdOTPUsingPOST Once OTP get validate successfully you will get the Authorization token.
Use this Authorization token in the every request header of all pre-registration APIs.
Login Service (Public)
This service details used by Pre-Registration portal to authenticate user by sending OTP to the user, validating with userid and OTP.
POST /login/sendOtp
This request will send the OTP to the requested user in the preferred channel(sms/email)
Resource URL
https://{base_url}/preregistration/v1/login/sendOtp
Resource details
Response format
JSON
Requires Authentication
No
Request Part Parameters
id
Yes
id
mosip.pre-registration.login.sendotp
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
request.userid
Yes
user id of the applicant(mobile number/email address)
8907654778
For SMS
Request for SMS
Responses for SMS
Success Response
Status code: 200
Description: OTP sent successfully to specified channel
For Email
Request for Email
Responses for Email
Success Response
Status code: 200
Description: OTP sent successfully to specified channel
Failure Response
Status code: 200
Description: Invalid parameters
Other Failure details
PRG_PAM_LGN_008
Invalid Request userId received
if requested userId is empty or invalid
PRG_PAM_CORE_001
Request id is invalid
Invalid or empty Request Id
PRG_PAM_CORE_002
Request version is invalid
Invalid or empty Request version
PRG_PAM_CORE_003
Invalid request time
Empty Request time
PRG_CORE_REQ_013
Request date should be current date
If request date is not current date
POST /login/validateOtp
This request will validate the OTP with respect to userid and provide the authorize token in the browser cookies.
Resource URL
https://{base_url}/preregistration/v1/login/validateOtp
Resource details
Response format
JSON
Requires Authentication
No
Request Part Parameters
id
Yes
id
mosip.pre-registration.login.useridotp
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
request.userid
Yes
user id of the applicant (mobile number/email address)
8907654778
request.OTP
Yes
received OTP
345674
Request
Responses
Success Response
Status code: 200
Description: sms sent successfully
Failure Response
Status code: 200
Description: Invalid parameters
Other Failure details
KER-ATH-003
User Detail doesn't exist.
If userId is empty or invalid
KER-OTV-003
OTP can't be empty or null.
If otp field is empty or null
KER-OTV-004
OTP consists of only numeric characters. No other characters is allowed
If otp contains character other than numeric
PRG_PAM_CORE_001
Request id is invalid
Invalid or empty Request Id
PRG_PAM_CORE_002
Request version is invalid
Invalid or empty Request version
PRG_PAM_CORE_003
Invalid request time
Empty Request time
PRG_CORE_REQ_013
Request date should be current date
If request date is not current date
PRG_PAM_LGN_013
VALIDATION_UNSUCCESSFUL
If incorrect otp is entered
PRG_PAM_LGN_014
Token is not present in the header
When token does not come from kernel service in the header
POST /login/invalidateToken
This request will invalidate the authorization token when force logout is done.
Resource URL
https://{base_url}/preregistration/v1/login/invalidateToken
Resource details
Response format
JSON
Requires Authentication
Yes
Responses
Success Response
Status code: 200
Description: Token invalidated successfully
Failure Response
Status code: 200
Description: Token is not present in cookies
Other Failure details
KER-ATH-008
Token is not present in datastore, Please try with new token
If token is not present in datastore
KER-ATH-006
Cookies are empty
When no Cookie is passed in the header
GET /login/config
This request will load the configuration parameters while loading the pre-registration portal page.
All the values are retrieving from the pre-registration config properties file. If any value get changed in the config properties file it will get reflected in the response of this API. Following mentioned response is the sample of that.
Resource URL
https://{base_url}/preregistration/v1/login/config
Resource details
Response format
JSON
Requires Authentication
No
Responses
Success Response
Status code: 200
Description: Config parameter retrieved sucessfully
Other Failure details
PRG_AUTH_012
Config file not found in the config server
If config file is missing in the config server
GET /login/refreshconfig
This request will reload the configuration parameters.
When ever there is change in the property file, then this rest end point should be called manually,so that the property get reflected.
Resource URL
https://{base_url}/preregistration/v1/login/refreshconfig
Resource details
Response format
JSON
Requires Authentication
No
Responses
Success Response
Status code: 200
Description: Config parameter retrieved sucessfully
Other Failure details
PRG_AUTH_012
Config file not found in the config server
If config file is missing in the config server
Demographic Service (public)
This service details used by Pre-Registration portal to maintain the demographic data by providing his/her basic details.
POST /applications
This request is used to create new pre-registration with demographic details, which generates pre-registration id and associates it with demographic details.
Resource URL
https://{base_url}/preregistration/v1/applications
Resource details
Response format
JSON
Requires Authentication
Yes
Request Body Parameters
id
Yes
Id of the application
mosip.pre-registration.demographic.create
version
Yes
version of the application
1.0
requesttime
Yes
Request time of the application
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
request.langCode
Yes
primary language code
value will be derived from UI
request.demographicDetails
Yes
demographicDetails of the applicant
request.demographicDetails.identity
Yes
identity of the applicant
request.demographicDetails.identity.gender
Yes
gender of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.city
Yes
city of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.phone
Optional
mobile number of the applicant
request.demographicDetails.identity.IDSchemaVersion
Optional
id schema version
1
request.demographicDetails.identity.fullName
Yes
full name of the applicant
request.demographicDetails.identity.dateOfBirth
Yes
date of birth of the applicant
request.demographicDetails.identity.email
Optional
email Id of the applicant
request.demographicDetails.identity.province
Yes
province of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.postalCode
Yes
postal code of the applicant
request.demographicDetails.identity.addressLine1
Yes
address Line 1 of the applicant
request.demographicDetails.identity.addressLine2
Optional
address Line 2 of the applicant
request.demographicDetails.identity.addressLine3
Optional
address Line 3 of the applicant
request.demographicDetails.identity.region
Yes
region of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.residenceStatus
Yes
residence status of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.zone
Yes
zone of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.referenceIdentityNumber
Yes
referenceIdentityNumber Number of the applicant
Request
Responses
Success Response
Status code: 200
Description: Pre-Registration successfully Created
Failure Response
Status code: 200
Description: invalid or empty request id
Other Failure details
PRG_PAM_CORE_002
Request version is invalid
Invalid or empty Request version
PRG_PAM_CORE_003
Invalid request time
Empty Request time
PRG_CORE_REQ_013
Request date should be current date
If request date is not current date
PRG_CORE_REQ_014
Lang code is invalid
when language code is invalid or empty
PRG_PAM_CORE_011
encryption failed
encryption of demographic data failed
PRG_PAM_APP_007
json parsing is failed
demographic json parsing failed
PRG_PAM_CORE_010
hashing failed
demographic data hashing failed
PRG_PAM_CORE_012
decryption failes
decryption of demographic data failed
PRG_PAM_APP_020
Rest call to get prid failed
Service call to get Prid failed
PRG_PAM_APP_021
Duplicate key for prid
Failure of unique key constrains
KER-IOV-005
Missing input parameter - identity/fullName
If fullName attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/dateOfBirth|identity/age
If dateOfBirth attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/gender
If gender attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/residenceStatus
If residenceStatus attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/addressLine1
If addressLine1 attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/region
If region attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/zone
If zone attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/province
If province attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/city
If city attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/postalCode
If postalCode attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/referenceIdentityNumber
If referenceIdentityNumber attribute is not found in the identity request
KER-IOV-004
Invalid input parameter - identity/phone
If phone attribute is found but it's value is empty or invalid
KER-IOV-004
Invalid input parameter - identity/email
If email attribute is found but it's value is empty or invalid
KER-IOV-004
Invalid input parameter - identity/fullName/{*}/language
If language code is empty or invalid in the specified position(*) inside fullName attribute
KER-IOV-004
Invalid input parameter - identity/dateOfBirth
If dateOfBirth value is empty or invalid
KER-IOV-004
Invalid input parameter - identity/gender/{*}/language
If language code is empty or invalid in the specified position(*) inside gender attribute
KER-IOV-004
Invalid input parameter - identity/gender/{*}/value
If value is empty or invalid in the specified position(*) inside gender attribute
KER-IOV-004
Invalid input parameter - identity/addressLine1/{*}/language
If language code is empty or invalid in the specified position(*) inside addressLine1 attribute
KER-IOV-004
Invalid input parameter - identity/addressLine2/{*}/language
If language code is empty or invalid in the specified position(*) inside addressLine2 attribute
KER-IOV-004
Invalid input parameter - identity/addressLine3/{*}/language
If language code is empty or invalid in the specified position(*) inside addressLine3 attribute
KER-IOV-004
Invalid input parameter - identity/residenceStatus/{*}/language
If language code is empty or invalid in the specified position(*) inside residenceStatus attribute
KER-IOV-004
Invalid input parameter - identity/region/{*}/language
If language code is empty or invalid in the specified position(*) inside region attribute
KER-IOV-004
Invalid input parameter - identity/region/{*}/value
If value is empty or invalid in the specified position(*) inside region attribute
KER-IOV-004
Invalid input parameter - identity/province/{*}/language
If language code is empty or invalid in the specified position(*) inside province attribute
KER-IOV-004
Invalid input parameter - identity/province/{*}/value
If value is empty or invalid in the specified position(*) inside province attribute
KER-IOV-004
Invalid input parameter - identity/city/{*}/language
If language code is empty or invalid in the specified position(*) inside city attribute
KER-IOV-004
Invalid input parameter - identity/city/{*}/value
If value is empty or invalid in the specified position(*) inside city attribute
KER-IOV-004
Invalid input parameter - identity/zone/{*}/language
If language code is empty or invalid in the specified position(*) inside zone attribute
KER-IOV-004
Invalid input parameter - identity/zone/{*}/value
If value is empty or invalid in the specified position(*) inside zone attribute
KER-IOV-004
Invalid input parameter - identity/postalCode
If postalCode is empty or invalid
KER-IOV-004
Invalid input parameter - identity/referenceIdentityNumber
If referenceIdentityNumber is empty or invalid
PUT /applications/{preRegistrationId}
This request is used to update pre-registration's demographic details by providing pre-registration id in the path parameter and updated demographic details in request body.
Resource URL
https://{base_url}/preregistration/v1/applications/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegistrationId
Yes
pre-registration id of the application
64269837502851
Request Body Parameters
id
Yes
Id of the application
mosip.pre-registration.demographic.create
version
Yes
version of the application
1.0
requesttime
Yes
Request time of the application
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
request.langCode
Yes
primary language code
value will be derived from UI
request.demographicDetails
Yes
demographicDetails of the applicant
request.demographicDetails.identity
Yes
identity of the applicant
request.demographicDetails.identity.gender
Yes
gender of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.city
Yes
city of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.phone
Optional
mobile number of the applicant
request.demographicDetails.identity.IDSchemaVersion
Optional
id schema version
1
request.demographicDetails.identity.fullName
Yes
full name of the applicant
request.demographicDetails.identity.dateOfBirth
Yes
date of birth of the applicant
request.demographicDetails.identity.email
Optional
email Id of the applicant
request.demographicDetails.identity.province
Yes
province of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.postalCode
Yes
postal code of the applicant
request.demographicDetails.identity.addressLine1
Yes
address Line 1 of the applicant
request.demographicDetails.identity.addressLine2
Optional
address Line 2 of the applicant
request.demographicDetails.identity.addressLine3
Optional
address Line 3 of the applicant
request.demographicDetails.identity.region
Yes
region of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.residenceStatus
Yes
residence status of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.zone
Yes
zone of the applicant
value will be derived from the domain metadata
request.demographicDetails.identity.referenceIdentityNumber
Yes
referenceIdentityNumber Number of the applicant
Request
Responses
Success Response
Status code: 200
Description: Pre-Registration demographic details successfully updated
Failure Response
Status code: 200
Description: Invalid preregistration id(non-empty) or data is not found for that preregistration id.
Other Failure details
PRG_PAM_CORE_001
Request id is invalid
Invalid or empty Request Id
PRG_PAM_CORE_002
Request version is invalid
Invalid or empty Request version
PRG_PAM_CORE_003
Invalid request time
Empty Request time
PRG_CORE_REQ_013
Request date should be current date
If request date is not current date
PRG_PAM_CORE_011
encryption failed
encryption of demographic data failed
PRG_PAM_APP_007
json parsing is failed
demographic json parsing failed
PRG_PAM_CORE_010
hashing failed
demographic data hashing failed
PRG_PAM_CORE_012
decryption failes
decryption of demographic data failed
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
KER-IOV-005
Missing input parameter - identity/fullName
If fullName attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/dateOfBirth|identity/age
If dateOfBirth attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/gender
If gender attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/residenceStatus
If residenceStatus attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/addressLine1
If addressLine1 attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/region
If region attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/zone
If zone attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/province
If province attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/city
If city attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/postalCode
If postalCode attribute is not found in the identity request
KER-IOV-005
Missing input parameter - identity/referenceIdentityNumber
If referenceIdentityNumber attribute is not found in the identity request
KER-IOV-004
Invalid input parameter - identity/phone
If phone attribute is found but it's value is empty or invalid
KER-IOV-004
Invalid input parameter - identity/email
If email attribute is found but it's value is empty or invalid
KER-IOV-004
Invalid input parameter - identity/fullName/{*}/language
If language code is empty or invalid in the specified position(*) inside fullName attribute
KER-IOV-004
Invalid input parameter - identity/dateOfBirth
If dateOfBirth value is empty or invalid
KER-IOV-004
Invalid input parameter - identity/gender/{*}/language
If language code is empty or invalid in the specified position(*) inside gender attribute
KER-IOV-004
Invalid input parameter - identity/gender/{*}/value
If value is empty or invalid in the specified position(*) inside gender attribute
KER-IOV-004
Invalid input parameter - identity/addressLine1/{*}/language
If language code is empty or invalid in the specified position(*) inside addressLine1 attribute
KER-IOV-004
Invalid input parameter - identity/addressLine2/{*}/language
If language code is empty or invalid in the specified position(*) inside addressLine2 attribute
KER-IOV-004
Invalid input parameter - identity/addressLine3/{*}/language
If language code is empty or invalid in the specified position(*) inside addressLine3 attribute
KER-IOV-004
Invalid input parameter - identity/residenceStatus/{*}/language
If language code is empty or invalid in the specified position(*) inside residenceStatus attribute
KER-IOV-004
Invalid input parameter - identity/region/{*}/language
If language code is empty or invalid in the specified position(*) inside region attribute
KER-IOV-004
Invalid input parameter - identity/region/{*}/value
If value is empty or invalid in the specified position(*) inside region attribute
KER-IOV-004
Invalid input parameter - identity/province/{*}/language
If language code is empty or invalid in the specified position(*) inside province attribute
KER-IOV-004
Invalid input parameter - identity/province/{*}/value
If value is empty or invalid in the specified position(*) inside province attribute
KER-IOV-004
Invalid input parameter - identity/city/{*}/language
If language code is empty or invalid in the specified position(*) inside city attribute
KER-IOV-004
Invalid input parameter - identity/city/{*}/value
If value is empty or invalid in the specified position(*) inside city attribute
KER-IOV-004
Invalid input parameter - identity/zone/{*}/language
If language code is empty or invalid in the specified position(*) inside zone attribute
KER-IOV-004
Invalid input parameter - identity/zone/{*}/value
If value is empty or invalid in the specified position(*) inside zone attribute
KER-IOV-004
Invalid input parameter - identity/postalCode
If postalCode is empty or invalid
KER-IOV-004
Invalid input parameter - identity/referenceIdentityNumber
If referenceIdentityNumber is empty or invalid
GET /applications/{preRegistrationId}
This request is used to retrieve Pre-Registration demographic data by pre-Registration id provided in request path parameter.
Resource URL
https://{base_url}/preregistration/v1/applications/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegistrationId
Yes
Id of the application
32042841521591
Responses
Success Response:
Status code: 200
Description: Demographic data successfully retrieved
Failure Response
Status code: '200'
Description: No data found for the requested pre-registration id(non-empty).
Other Failure details
PRG_PAM_CORE_010
hashing failed
demographic data hashing failed
PRG_PAM_CORE_012
decryption failes
decryption of demographic data failed
PRG_PAM_APP_007
json parsing is failed
demographic json parsing failed
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
GET /applications/status/{preRegistrationId}
This request is used to retrieve pre-registration application status by providing the pre-registration id in request path parameter.
Resource URL
https://{base_url}/preregistration/v1/applications/status/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameter
preRegistrationId
Yes
Id of the application
62076019780925
Responses
Success Response
Status code: 200
Description: All applications status fetched successfully
Failure Response
Status code: 200
Description: No data found for the requested pre-registration id(non-empty).
Other Failure details
PRG_PAM_CORE_010
hashing failed
demographic data hashing failed
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
GET /applications
This request is used to retrieve all Pre-Registration id, Full name in both language, Status Code, Document details(Only for Proof Of Address), Appointment details and Postal Code by user id from authorization token.
Without pagination
if pageIndex parameter is not passed as query param, then all the demographic data for the user will be retrieved without applying pagination mechanism.
Resource URL
https://{base_url}/preregistration/v1/applications
Resource details
Response format
JSON
Requires Authentication
Yes
Responses
Success Response
Status code: 200
Description: All applications fetched successfully
Failure Response
Status code: 200
Description: No record found for the requested user id.
Other Failure details
PRG_PAM_CORE_010
hashing failed
demographic data hashing failed
PRG_PAM_CORE_012
decryption failed
decryption of demographic data failed
PRG_PAM_APP_007
json parsing is failed
demographic json parsing failed
PRG_PAM_APP_018
Failed to read the identity json from the server
If the configured identity json file is unreachable
With pagination
If pageIndex parameter is passed as query param, then all the demographic data for the user will be retrieved in terms of pages.
PageSize parameter is configurable.
PageIndex is by default 0 if no value is passed for query param.
Resource URL
https://{base_url}/preregistration/v1/applications?pageIndex=0
Resource details
Response format
JSON
Requires Authentication
Yes
Request Query Parameter
pageIndex
Yes
page index of the application
0(By default)
Responses
Success Response
Status code: 200
Description: All applications fetched successfully
Failure Response
Status code: 200
Description: No record found for the requested user id.
Other Failure details
PRG_PAM_APP_016
no record found for the requested page index
if there is no more demographic data found for the requested page index
PRG_PAM_APP_019
Invalid page index value
If page index value is invalid
PRG_PAM_APP_015
Page size must be greater than zero
if page size is invalid or if it is defined 0 or less than 0 in config
PRG_PAM_CORE_010
hashing failed
demographic data hashing failed
PRG_PAM_CORE_012
decryption failed
decryption of demographic data failed
PRG_PAM_APP_007
json parsing is failed
demographic json parsing failed
PRG_PAM_APP_018
Failed to read the identity json from the server
If the configured identity json file is unreachable
DELETE /applications/{preRegistrationId}
This request is used to discard the entire pre-registration details based pre-registration id provided in request path parameter.
Resource URL
https://{base_url}/preregistration/v1/applications/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegistrationId
Yes
pre-registration id of the application
29605371807216
Responses
Success Response
Status code: 200
Description: Deletion of individual is successfully
Failure Response
Status code: 200
Description: No data found for the requested pre-registration id(non-empty)
Other Failure details
PRG_PAM_APP_003
delete operation is not allowed
Deletion of Preregistration fails if its status is neither pending appointment nor booked
PRG_PAM_DOC_016
failed to delete the booking
If Booking data is failed to delete
PRG_PAM_APP_004
failed to delete the pre-registration data
If Preregistration data is failed to delete
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
Document Service (public)
This service enables Pre-Registration portal to request for uploading the document for a particular pre-registration. If any one upload file greater than specified size which is allowed by ngnix config; it will give 413 Request Entity Too Large error.
POST /documents/{preRegistrationId}
This request is used to upload document with the metadata which include document category code, document type code and document format for a pre-registration Id.
Document category code, document type code and language code are derived from kernel master data. Specification for the same can be found in Document APIs.
URL:
For valid Document category code refer below GET method for respective language code : /documentcategories/{langcode}
For valid Document type code refer below GET method for respective language and document category code: /documenttypes/{documentcategorycode}/{langcode}
Resource URL
https://{base_url}/preregistration/v1/documents/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegistrationId
Yes
Pre-registration id of the application
32042841521591
Request Part Parameters
file
Yes
Document which we need to upload
Request Part (Document request) Parameters
id
Yes
Id of the application
mosip.pre-registration.document.upload
version
Yes
version of the application
1.0
requesttime
Yes
Request tme of the application
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
request.docCatCode
Yes
Document category code
POA
request.docTypCode
Yes
Document type code
RNC
request.langCode
Yes
Language code of the application
fra
Request
Responses
Success Response
Status code: 200
Description: Document uploaded successfully
Failure Response
Status code: 200
Description: Invalid document format supported
Other Failure details
PRG_PAM_CORE_001
Request id is invalid
Invalid or empty Request Id
PRG_PAM_CORE_002
Request version is invalid
Invalid or empty Request version
PRG_PAM_CORE_003
Invalid request time
Empty Request time
PRG_CORE_REQ_013
Request date should be current date
If request date is not current date
PRG_PAM_DOC_007
Document exceeding permitted size
when uploaded document size is exceeding the configured size
PRG_CORE_REQ_018
Document Catagory code is invalid
empty or invalid document category code
PRG_CORE_REQ_017
Document type code is invalid
empty or invalid document type code
PRG_CORE_REQ_014
Language code is invalid
If language code is empty or invalid
PRG_PAM_CORE_011
encryption failed
encryption of document data failed
PRG_PAM_DOC_015
Json exception
document request json parsing failed
PRG_PAM_CORE_010
hashing failed
document data hashing failed
PRG_PAM_DOC_010
Document virus scan failed
virus scan of uploaded document is failed
PRG_PAM_APP_005
No data found for the requested pre-registration id
invalid preregistration id or data is not found for that preregistration id
PRG_PAM_DOC_012
Document table not accessible
access to document table fails
PRG_PAM_DOC_009
Document upload failed
if the document & document details are failed to store
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
PUT /documents/{preRegistrationId}
This request is used to copy the document from source pre-registration id to destination pre-registration id with the specified document category code.
Resource URL
https://{base_url}/preregistration/v1/documents/{preRegistrationId}?catCode={doc_cat_code}&sourcePreId={preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegistrationId
Yes
Destination Pre-registration id of the application
67531403498547
Request Query Parameters
catCode
Yes
Document category code
POA
sourcePreId
Yes
Source Pre-registration id of the application
97285429827016
Responses
Success Response
Status code: 200
Description: Document successfully copied
Failure Response
Status code: 200
Description: If Document has not been uploaded for the source pre-registration Id(non-empty)
Other Failure details
PRG_CORE_REQ_001
request parameter is missing
If source or destination preregistration id is empty
PRG_CORE_REQ_017
Catagory code is invalid
if document category code is not POA
PRG_PAM_APP_005
No data found for the requested pre-registration id
If source preregistration id or destination preregistration id is invalid(non-empty) or no preregistration data found for any of the preregistration id
PRG_PAM_DOC_012
Document table not accessible
access to document table fails
PRG_PAM_DOC_009
Document upload failed
if the document & document details are failed to store
PRG_PAM_DOC_011
Document copy failed from source to destination
when document is not copied from source to destination preregistration id
PRG_CORE_REQ_010
hashing failed
document data hashing failed
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
GET /documents/preregistration/{preRegistrationId}
This request used to retrieve all documents metadata associated with particular pre-registration.
Resource URL
https://{base_url}/preregistration/v1/documents/preregistration/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegistrationId
Yes
Pre-registration id of the application
97285429827016
Responses
Success Response
Status code: 200
Description: Documents retrieved successfully
Failure Response
Status code: 200
Description: if pre-registration id is invalid(non-empty)
Other Failure details
PRG_PAM_DOC_012
Document table not accessible
access to document table fails
PRG_PAM_DOC_005
Failed to fetch from File System server
if the document is failed to be fetched from file system
PRG_PAM_CORE_012
decryption failes
decryption of document data failed
PRG_PAM_CORE_010
hashing failed
document data hashing failed
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
PRG_PAM_DOC_005
Documents is not found for the requested pre-registration id
when the document is not uploaded for the preregistration id
PRG_PAM_APP_005
No data found for the requested pre-registration id
When the application is deleted and trying to fetch the document of that pre-registration-id
GET /documents/{documentId}?preRegistrationId={preRegistrationId}
This request used to retrieve the document for a particular document id from the File System server.
Resource URL
https://{base_url}/preregistration/v1/documents/{documentId}?preRegistrationId={preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
documentId
Yes
document id of the application
0748c439-4f83-11e9-ae3b-7b0aa1318f48
Request Query Parameters
preRegistrationId
Yes
pre-registration id of the application
74843948119371
Responses
Success Response
Status code: 200
Description: Document successfully retrieved
Failure Response
Status code: 200
Description: if pre-registration id is invalid(non-empty)
Other Failure details
PRG_PAM_DOC_012
Document table not accessible
access to document table fails
PRG_PAM_DOC_005
Failed to fetch from File System server
if the document is failed to be fetched from file system
PRG_CORE_REQ_012
decryption failed
decryption of document data failed
PRG_CORE_REQ_010
hashing failed
document data hashing failed
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
PRG_PAM_DOC_022
DocumentId is not belongs to the pre-registration Id
If document id is not related to the pre-registration id or if document is not found for the pre-registration id
DELETE /documents/preregistration/{preRegsitrationId}
This request used to delete all the documents which are associated with requested pre-registration id.
Resource URL
https://{base_url}/preregistration/v1/documents/preregistration/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegsitrationId
Yes
pre-registration id of the application
37802950913289
Responses
Success Response
Status code: 200
Description: Documents successfully deleted
Failure Response
Status code: 200
Description: if the pre-registration id is invalid(non-empty)
Other Failure details
PRG_PAM_DOC_006
Documents failed to delete
if the document & document details are failed to delete
PRG_PAM_DOC_012
Document table not accessible
access to document table fails
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
PRG_PAM_DOC_005
Documents is not found for the requested pre-registration id
If document is not uploaded for the pre-registration id
PRG_PAM_APP_005
No data found for the requested pre-registration id
When the application is deleted and trying to fetch the document of that pre-registration-id
DELETE /documents/{documentId}?preRegistrationId={preRegistrationId}
This request used to delete the document for a particular document id from database and File System server.
Resource URL
https://{base_url}/preregistration/v1/documents/{documentId}?preRegistrationId={preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
documentId
Yes
document id of the application
0748c439-4f83-11e9-ae3b-7b0aa1318f48
Request Query Parameters
preRegistrationId
Yes
pre-registration id of the application
74843948119371
Responses
Success Response
Status code: 200
Description: Document successfully deleted
Failure Response
Status code: 200
Description: if the pre-registration id is invalid(non-empty)
Other Failure details
PRG_PAM_DOC_006
Documents failed to delete
if the document & document details are failed to delete
PRG_PAM_DOC_012
Document table not accessible
access to document table fails
PRG_PAM_APP_017
Requested preregistration id does not belong to the user
when the user tries to access another user's demographic data
PRG_PAM_DOC_022
DocumentId is not belongs to the pre-registration Id
If document id is not related to the pre-registration id or if document is not found for the pre-registration id
DataSync Service (External)
This service enables Pre-Registration to a registration client, request to retrieve all pre-registration ids based on registration client id, appointment date and an user type.
POST /sync
This request is used by registration client to retrieve all the pre-registration Ids by the date range of appointment done.
Resource URL
https://{base_url}/preregistration/v1/sync
Resource details
Response format
JSON
Requires Authentication
Yes
Request Body Parameters
id
Yes
Id of the application
mosip.pre-registration.datasync
version
Yes
version of the application
1.0
requesttime
Yes
Request time of the application
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
request.registrationCenterId
Yes
Registration Center Id for which the data is required
10001
request.fromDate
Yes
From date of the appointment
2019-02-09
request.toDate
Yes
To date of the appointment
2019-02-12
Request
Responses
Success Response
Status code: 200
Description: All Pre-Registration Ids fetched successfully
Failure Response
Status code: 200
Description: If appointment is not booked under the registration center and requested date range.
Other Failure details
PRG_PAM_CORE_001
Request id is invalid
Invalid or empty Request Id
PRG_PAM_CORE_002
Request version is invalid
Invalid or empty Request version
PRG_PAM_CORE_003
Invalid request time
Empty Request time
PRG_CORE_REQ_013
Request date should be current date
If request date is not current date
PRG_DATA_SYNC_009
registration center id is invalid
Empty registration center Id
PRG_CORE_REQ_013
Request date should be current date
when the date is not current date
PRG_DATA_SYNC_007
Demographic record failed to fetch
when rest service to demographic service fails
PRG_DATA_SYNC_016
booking data not found
when rest service to booking service fails
PRG_CORE_REQ_019
Invalid date time format
If from date or to date is invalid
PRG_CORE_REQ_020
From date is greater than To date
If from date is greater than to date
POST /sync/consumedPreRegIds
This request is used by registration processor, to retrieve all processed pre-registration ids and store in pre-registration database so that after batch jon run , job will delete records from main table and move to history table(consumed).
Resource URL
https://{base_url}/preregistration/v1/sync/consumedPreRegIds
Resource details
Response format
JSON
Requires Authentication
Yes
Request Body Parameters
id
Yes
Id of the application
mosip.pre-registration.datasync.store
version
Yes
version of the application
1.0
requesttime
Yes
Request time of the application
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
request.preRegistrationIds
Yes
List of Preregistration Ids
42973267563920
Request
Responses
Success Response
Status code: 200
Description: Consumed Pre-Registrations saved
Failure Response
Status code: 200
Description: No pre-registration ids passed in request body or all the preregistration ids are invalid
Other Failure details
PRG_PAM_CORE_001
Request id is invalid
Invalid or empty Request Id
PRG_PAM_CORE_002
Request version is invalid
Invalid or empty Request version
PRG_PAM_CORE_003
Invalid request time
Empty Request time
PRG_CORE_REQ_013
Request date should be current date
If request date is not current date
PRG_DATA_SYNC_007
Demographic record failed to fetch
when rest service to demographic service fails
GET /sync/{preRegistrationId}
This request is used by registration client to retrieve particular pre-registration data based on a pre-registration id.
ID.json will include both demographic and uploaded document metadata content.
Resource URL
https://{base_url}/preregistration/v1/sync/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
preRegistrationId
Yes
Pre Registration id
41342175487213
Responses
Success Response
Status code: 200
Description: Data Sync records fetched
Failure Response
Status code: 200
Description: No demographic data exists for the requested pre-registration id or if the pre-registration id is invalid(non-empty)
Other Failure details
PRG_BOOK_RCI_013
booking data not found
If appointment is not booked against the preregistration id
PRG_DATA_SYNC_007
Demographic record failed to fetch
when rest service to demographic service fails
PRG_DATA_SYNC_016
booking data not found
when rest service to booking service fails
PRG_DATA_SYNC_005
Unable to create zip file
If any error occurs while creating the zip file bytes
PRG_DATA_SYNC_014
file IO exception
File system exception
PRG_DATA_SYNC_006
unable to fetch the document
when rest service to document service fails
Booking Service (Public)
This service details used by Pre-Registration portal to book an appointment by providing his/her basic appointment details.
GET /appointment/availability/sync
This request is used to synchronize booking slots availability table with master data.
Resource URL
https://{base_url}/preregistration/v1/appointment/availability/sync
Resource details
Response format
JSON
Requires Authentication
Yes
Responses
Success Response
Status code: 200
Description: Master Data Sync is successful
Other Failure details
PRG_BOOK_RCI_015
No available slots found for specified registration center
If no slots are available in the specified registration center
PRG_BOOK_RCI_016
Availablity table not accessible
access to availability table fails
PRG_BOOK_RCI_034
Json processing exception
Json parse exception while sending notification
PRG_BOOK_RCI_033
Notification service call failed
Notification service call fail
PRG_BOOK_RCI_020
Master data not found
Master date service call fail
POST /appointment/{preRegistrationId}
This request is used to book an registration center. If the appointment data exists for the requested pre-registration id, it will cancel it and update the new appointment data. If no appointment data then it will book an appointment for specified registration center and time slot.
Resource URL
https://{base_url}/preregistration/v1/appointment/{preRegistrationId}
Resource details
Response format
JSON
Requires Authentication
Yes