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
Request Part Parameters
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
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
Request Part Parameters
Request
Responses
Success Response
Status code: 200
Description: sms sent successfully
Failure Response
Status code: 200
Description: Invalid parameters
Other Failure details
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
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
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
Responses
Success Response
Status code: 200
Description: Config parameter retrieved sucessfully
Other Failure details
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
Responses
Success Response
Status code: 200
Description: Config parameter retrieved sucessfully
Other Failure details
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
Request Body Parameters
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
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
Request Path Parameters
Request Body Parameters
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
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
Request Path Parameters
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
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
Request Path Parameter
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
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
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
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
Request Query Parameter
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
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
Request Path Parameters
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
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
Request Path Parameters
Request Part Parameters
Request Part (Document request) Parameters
Request
Responses
Success Response
Status code: 200
Description: Document uploaded successfully
Failure Response
Status code: 200
Description: Invalid document format supported
Other Failure details
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
Request Path Parameters
Request Query Parameters
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
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
Request Path Parameters
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
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
Request Path Parameters
Request Query Parameters
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
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
Request Path Parameters
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
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
Request Path Parameters
Request Query Parameters
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
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
Request Body Parameters
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
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
Request Body Parameters
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
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
Request Path Parameters
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
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
Responses
Success Response
Status code: 200
Description: Master Data Sync is successful
Other Failure details
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
Request Path Parameters
Request Body Parameters
Request
Responses
Success Response
Status code: 200
Description: Appointment booked successfully
Failure Response
Status code: 200
Description: If demographic data not found for the preregistration id or if Pre Registration Id is invalid(non-empty).
Failure Response
Status code: 200
Description: Slot availability not found for selected time.
Other Failure details
POST /appointment
This request is used to book mulitple registration centers. If the appointment data exists for the requested pre-registration ids, 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
Resource details
Request Body Parameters
Request
Responses
Success Response
Status code: 200
Description: Appointment booked successfully
Failure Response
Status code: 200
Description: If demographic data is not found for any of the preregistration id or if Pre Registration Id is invalid(non-empty).
Failure Response
Status code: 200
Description: Slot availability not found for selected time.
Other Failure details
PUT /appointment/{preRegistrationId}
This request used to cancel the appointment. Which will retrieve the appointment details for the specified pre-registration id,if appointment data exists update the availability for the slot by increasing the value and delete the record from the table and update the demographic record status "Pending_Appointment".
Resource URL
https://{base_url}/preregistration/v1/appointment/{preRegistrationId}
Resource details
Responses
Success Response
Status code: 200
Description: Appointment cancelled successfully
Failure Response
Status code: 200
Description: Appointment cancellation failed.
Other Failure details
GET /appointment/{preRegistrationId}
This request is to retrieve Pre-Registration appointment details by pre-Registration id.
Resource URL
https://{base_url}/preregistration/v1/appointment/{preRegistrationId}
Resource details
Request Path Parameters
Responses
Success Response
Status code: 200
Description: Appointment details successfully retrieved
Failure Response
Status code: 200
Description: No Appointment record found for the specified pre-registration id
Other Failure details
GET /appointment/availability/{registrationCenterId}
This request is used to retrieve all appointment slots available for booking based on the specified registration center id.
Resource URL
https://{base_url}/preregistration/v1/appointment/availability/{registrationCenterId}
Resource details
Request Path Parameters
Responses
Success Response
Status code: 200
Description: Availability details fetched successfully
Failure Response
Status code: 200
Description: No available slots found for specified registration center.
Other Failure details
GET /appointment/preRegistrationId/{registrationCenterId}?from_date=:Date&to_date=:Date
This request is used to retrieve all pre-registration ids available for specified registration center and date range.
If toDate parameter value is not passed in the request, fromDate will be considered as toDate.
Resource URL
https://{base_url}/preregistration/v1/appointment/preRegistrationId/{registrationCenterId}?from_date=:Date&to_date=:Date
Resource details
Request Path Parameters
Request Query Parameters
Responses
Success Response
Status code: 200
Description: Availability details fetched successfully
Failure Response
Status code: 200
Description: No available slots found for specified registration center with date range.
Other Failure details
BatchJob Service (Private)
This service is used by Pre-Registration portal to update an expired pre-registration id and consumed pre-registration id.
Below are privileged APIs cannot be operate with individuals credentials.
PUT /expiredStatus
This request is used to update status of pre-registration ids appointment to expired status in database. Batch service will expire all the appointments from date before exceution date till the last execution date of batch job.
Resource URL
https://{base_url}/preregistration/v1/batch/expiredStatus
Resource details
Responses
Success Response
Status code: 200
Description: Expired status updated successfully
Failure Response
Status code: 200
Description: No pre-registration record found to update expired status
Other Failure details
PUT /consumedStatus
This request is used to update the consumed status for all pre-Registration ids given by registration processor.
Resource URL
https://{base_url}/preregistration/v1/batch/consumedStatus
Resource details
Responses
Success Response
Status code: 200
Description: Consumed status updated successfully
Failure Response
Status code: 200
Description: No pre-registration record found to update consumed status
Other Failure details
Generate QR code service (public)
This service details used by Pre-Registration portal to generate QR Code.
POST qrCode/generate
This request is used to generate QR Code for the pre-registration acknowledgement.
Resource URL
https://{base_url}/preregistration/v1/qrCode/generate
Resource details
Request Part Parameters
Request
Below is the sample request with no validation for request value
Responses
Success Response
Status code: 200
Description: QR Code generated successfully
Failure Response
Status code: 200
Description: Failed to generate QR code
Other Failure details
Notification Service (public)
This service details used by Pre-Registration portal to trigger notification via SMS or email.
POST notification/notify
This request is used to notify the pre-registration acknowledgement via Email and SMS.
Resource URL
https://{base_url}/preregistration/v1/notification/notify
Resource details
Request Part (NotificationRequestDTO) Parameters
Request Part Parameters
Request
Responses
Success Response
Status code: 200
Description: Email and sms request successfully submitted
Failure Response
Status code: 200
Description: Mobile number or Email Id is missing
Other Failure details
Transliteration Service (Public)
This service is used by Pre-Registration portal to transliterate given value from one language to another language. In this API transliteration is using IDB ICU4J library , so accuracy will be less.
POST /transliteration/transliterate
This request is used to transliterate from_Field_value to to_field_value based on given valid from_lang_code to to_lang_code.
Resource URL
https://{base_url}/preregistration/v1/transliteration/transliterate
Resource details
Parameters
Request
Responses
Success Response
Status code: 200
Description: Given key is transliterated successfully
Failure Response
Status code: 200
Description: Failed to transliterate
Other Failure details
Captcha Service (Public)
This service is used in Pre-Registration portal to protects the website from spam and abuse. In this API we are google recaptcha V2 to authenticate.
POST /captcha/validatecaptcha
This request is used to validate the response from the google recaptcha v2 API used in the front end application.
Resource URL
https://{base_url}/preregistration/v1/captcha/validatecaptcha
Resource details
Parameters
Request
Responses
Success Response
Status code: 200
Description: Captcha successfully verified
Failure Response
Status code: 200
Description: Invalid Captcha
Other Failure details
Common Exception Details for all Preregistration API
Last updated