Pre-registration data from UI is not flowing in create application API
Problem
After entering the data in pre-registration, you might be getting technical error after clicking on the continue button on the pre-registration demographic screen. The error message after debugging states that mandatory input data is missing for all the demographic screen and the in the create application request non of the fields are flowing from UI to API.
# Create Application Request Body
{
"id": "mosip.pre-registration.demographic.create",
"version": "1.0",
"request": {
"langCode": "eng",
"demographicDetails": {
"identity": {
"IDSchemaVersion": "1.0"
}
}
},
"requesttime": "2020-12-07T11:37:19.732Z"
}
# Create Application Response of the above request
{
"id":"mosip.pre-registration.demographic.create",
"version":"1.0",
"responsetime":"2020-12-07T11:37:19.732Z",
"response":null,
"errors":[
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/zone"
},
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/region"
},
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/province"
},
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/postalCode"
},
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/gender"
},
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/fullName"
},
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/city"
},
{
"errorCode":"KER-IOV-005",
"message":"Missing input parameter - identity/addressLine1"
}
]
}
Solution
This issue occurred in pre-registration because in 1.1.3 release, we have added a new property called “type” has been introduced in pre-registration UI specification. Based on this property the pre-registration application would store the data in identity josn while creating the create application API. The “type” property for each attribute in pre-registration UI specification should contain the same value specified in identity schema.
Change the UI specification by adding the new attributes in pre-registration-demographic.json
Restart the pre-registration application service
In case, the configuration server for your application is deployed locally then after changes make sure that local_git_repo enable is set as true or else the property change will not get reflected.