Resident Service APIs

Overview

This section details out all Resident Service REST APIs

Resident Services APIs

POST /resident/v1/rid/check-status

Resource URL

https://mosip.io/resident/v1/rid/check-status

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Request Body Parameters

Name
Required
Description
Default Value
Example
id
Y
API Id
mosip.resident.uinstatus
version
Y
API version
v1
requestTime
Y
Time when Request was captured
2018-12-09T06:39:04.683Z
request: transactionID
N
Transaction ID of request
dabed834-974f-11e9-bc42-526af7764f64
request: individualId
Y
RID
9830872690593682
request: individualIdType
Y
Allowed Type of Individual ID - RID
RID

Request Body

{
"id": "mosip.resident.checkstatus",
"version": "v1",
"requestTime": "2018-12-09T06:39:04.683Z",
"request": {
"individualId": "9830872690593682",
"individualIdType": "RID"
}
}

Responses

Success Response
{
"id": "mosip.resident.checkstatus",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
"ridStatus": "PROCESSING"
},
"errors": null
}
Status Code : 200 (OK)
Failed Response:
{
"id": "mosip.resident.checkstatus",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
},
"errors": [
{
"errorCode": "XXX-XXX-002",
"errorMessage": "Invalid RID"
}
]
}
Status Code : 200 (OK)
Failure details
Error Code
Error Message
Error Description
RES-SER-001
RID not found
RES-SER-002
One or more input parameter is invalid or does not exist
RES-SER-003
Token generation failed
RES-SER-005
API resource is not available
RES-SER-006
Unable to access API resource
RES-SER-009
Invalid Input Parameter
RES-SER-012
Invalid RID
RES-SER-015
Template exception
RES-SER-016
Template subject exception
RES-SER-017
Sending notification(Email and SMS) to resident failed.
RES-SER-020
Bad Request
RES-SER-021
Invalid APi response
RES-SER-SYS-001
System exception occured
RES-SER-SYS-002
IO Exception occured
RES-SER-SYS-003
JSON Processing Exception occured

POST /resident/v1/req/euin

This request will authenticate an Individual based on provided OTP and respond with e-UIN. Notification will be sent to phone/email.

Resource URL

https://mosip.io/resident/v1/req/euin

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Request Body Parameters

Name
Required
Description
Default Value
Example
id
Y
API Id
mosip.resident.euin
version
Y
API version
v1
requestTime
Y
Time when Request was captured
2018-12-09T06:39:04.683Z
request: transactionID
Y
Transaction ID of request
dabed834-974f-11e9-bc42-526af7764f64
request: individualId
Y
VID
9830872690593682
request: individualIdType
Y
Allowed Type of Individual ID - VID, UIN
VID
request: cardType
Y
Allowed Type of cardType - MASKED_UIN, UIN
request: otp
Y
OTP

Request Body

{
"id": "mosip.resident.euin",
"version": "v1",
"requestTime": "2018-12-09T06:39:04.683Z",
"request": {
"transactionID": "dabed834-974f-11e9-bc42-526af7764f64",
"individualId": "9830872690593682",
"individualIdType": "VID",
"cardType": "MASKED_UIN",
"otp": "123456"
}
}

Responses

Success Response
{
"id": "mosip.resident.euin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
"euin": "<uin-pdf byte string>",
"message": "Notification has been sent to the provided contact detail(s)"
},
"errors": null
}
Status Code : 200 (OK)
Failed Response
{
"id": "mosip.resident.euin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
},
"errors": [
{
"errorCode": "XXX-XXX-002",
"errorMessage": "OTP Authentication Failed"
}
]
}
Status Code : 200 (OK)

Failure details

Error Code
Error Message
Error Description
RES-SER-002
One or more input parameter is invalid or does not exist
RES-SER-003
Token generation failed
RES-SER-004
Invalid OTP
RES-SER-005
API resource is not available
RES-SER-006
Unable to access API resource
RES-SER-009
Invalid Input Parameter
RES-SER-010
Invalid VID
RES-SER-011
Invalid UIN
RES-SER-013
Invalid UIN for given VID
RES-SER-014
Your request is not successful, please try again later.
RES-SER-015
Template exception
RES-SER-016
Template subject exception
RES-SER-017
Sending notification(Email and SMS) to resident failed.
RES-SER-018
Invalid individualId
RES-SER-020
Bad Request
RES-SER-021
Invalid APi response
RES-SER-023
Could not find the submitted document
RES-SER-SYS-001
System exception occured
RES-SER-SYS-002
IO Exception occured
RES-SER-SYS-003
JSON Processing Exception occured

POST /resident/v1/req/print-uin

This request will authenticate an Individual based on provided OTP and post a request for UIN re-print to Postal Service. Notification will be sent to phone/email.

Resource URL

https://mosip.io/resident/v1/req/print-uin

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Request Body Parameters

Name
Required
Description
Default Value
Example
id
Y
API Id
mosip.resident.reprintuin
version
Y
API version
v1
requestTime
Y
Time when Request was captured
2018-12-09T06:39:04.683Z
request: transactionID
Y
Transaction ID of request
dabed834-974f-11e9-bc42-526af7764f64
request: individualId
Y
VID
9830872690593682
request: individualIdType
Y
Allowed Type of Individual ID - VID, UIN
VID
request: cardType
Y
Allowed Type of cardType - MASKED_UIN, UIN
request: otp
Y
OTP

Request Body

{
"id": "mosip.resident.reprintuin",
"version": "v1",
"requestTime": "2018-12-09T06:39:04.683Z",
"request": {
"transactionID": "dabed834-974f-11e9-bc42-526af7764f64",
"individualId": "9830872690593682",
"individualIdType": "VID",
"cardType": "MASKED_UIN",
"otp": "123456"
}
}

Responses

Success Response
{
"id": "mosip.resident.reprintuin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
"rid": "770872690593682",
"message": "Notification has been sent to the provided contact detail(s)"
},
"errors": null
}
Status Code : 200 (OK)
Failed Response
{
"id": "mosip.resident.reprintuin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
},
"errors": [
{
"errorCode": "XXX-XXX-002",
"errorMessage": "OTP Authentication Failed"
}
]
}
Status Code : 200 (OK)

Failure details

Error Code
Error Message
Error Description
RES-SER-002
One or more input parameter is invalid or does not exist
RES-SER-003
Token generation failed
RES-SER-004
OTP validation failed
RES-SER-005
API resource is not available
RES-SER-006
Unable to access API resource
RES-SER-009
Invalid Input Parameter
RES-SER-010
Invalid VID
RES-SER-011
Invalid UIN
RES-SER-013
Invalid UIN for given VID
RES-SER-014
Your request is not successful, please try again later.
RES-SER-015
Template exception
RES-SER-016
Template subject exception
RES-SER-017
Sending notification(Email and SMS) to resident failed.
RES-SER-018
Invalid individualId
RES-SER-019
Re print UIN request failed
RES-SER-020
Bad Request
RES-SER-021
Invalid APi response
RES-SER-SYS-001
System exception occured
RES-SER-SYS-002
IO Exception occured
RES-SER-SYS-003
JSON Processing Exception occured

POST /resident/v1/req/uin

This request will authenticate an Individual based on provided OTP and respond with UIN. Notification will be sent to phone/email.
This API is yet to be developed.

Resource URL

https://mosip.io/resident/v1/req/uin

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Request Body Parameters

Name
Required
Description
Default Value
Example
id
Y
API Id
mosip.resident.lostuin
version
Y
API version
v1
requestTime
Y
Time when Request was captured
2018-12-09T06:39:04.683Z
request: transactionID
Y
Transaction ID of request
dabed834-974f-11e9-bc42-526af7764f64
request: individualIdType
Y
Allowed Type of Individual ID - demo
demo
request: otp
Y
OTP
request: demographics
N
Demographic data of an Individual

Request Body

{
"id": "mosip.resident.lostuin",
"version": "v1",
"requestTime": "2018-12-09T06:39:04.683Z",
"request": {
"transactionID": "dabed834-974f-11e9-bc42-526af7764f64",
"individualIdType": "demo",
"otp": "123456",
"demographics": {
"name": [
{
"language": "ara",
"value": "ابراهيم بن علي"
},
{
"language": "fra",
"value": "Ibrahim Ibn Ali"
}
],
"gender": [
{
"language": "ara",
"value": "الذكر"
},
{
"language": "fra",
"value": "mâle"
}
],
"postalCode": {
"type": "10004"
},
"phone": {
"type": "998989989809"
},
"email": {
}
}
}
}

Responses

Success Response
{
"id": "mosip.resident.lostuin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
"uin": "989768897876565",
"message": "Notification has been sent to the provided contact detail(s)"
},
"errors": null
}
Status Code : 200 (OK)
Failed Response
{
"id": "mosip.resident.lostuin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
},
"errors": [
{
"errorCode": "XXX-XXX-002",
"errorMessage": "OTP Authentication Failed"
}
]
}
Status Code : 200 (OK)

Failure details

Error Code
Error Message
Error Description
RES-SER-002
One or more input parameter is invalid or does not exist
RES-SER-003
Token generation failed
RES-SER-004
OTP validation failed
RES-SER-005
API resource is not available
RES-SER-006
Unable to access API resource
RES-SER-009
Invalid Input Parameter
RES-SER-014
Your request is not successful, please try again later.
RES-SER-015
Template exception
RES-SER-016
Template subject exception
RES-SER-017
Sending notification(Email and SMS) to resident failed.
RES-SER-020
Bad Request
RES-SER-021
Invalid APi response
RES-SER-SYS-001
System exception occured
RES-SER-SYS-002
IO Exception occured
RES-SER-SYS-003
JSON Processing Exception occured

POST /resident/v1/req/rid

This request will authenticate an Individual based on provided OTP and respond with RID. Notification will be sent to phone/email.
This API is yet to be developed.

Resource URL

https://mosip.io/resident/v1/req/rid

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Request Body Parameters

Name
Required
Description
Default Value
Example
id
Y
API Id
mosip.resident.lostrid
version
Y
API version
v1
requestTime
Y
Time when Request was captured
2018-12-09T06:39:04.683Z
request: transactionID
Y
Transaction ID of request
dabed834-974f-11e9-bc42-526af7764f64
request: individualIdType
Y
Allowed Type of Individual ID - demo
demo
request: otp
Y
OTP
request: demographics
N
Demographic data of an Individual

Request Body

{
"id": "mosip.resident.lostrid",
"version": "v1",
"requestTime": "2018-12-09T06:39:04.683Z",
"request": {
"transactionID": "dabed834-974f-11e9-bc42-526af7764f64",
"individualIdType": "demo",
"otp": "123456",
"demographics": {
"name": [
{
"language": "ara",
"value": "ابراهيم بن علي"
},
{
"language": "fra",
"value": "Ibrahim Ibn Ali"
}
],
"gender": [
{
"language": "ara",
"value": "الذكر"
},
{
"language": "fra",
"value": "mâle"
}
],
"postalCode": {
"type": "10004"
},
"phone": {
"type": "998989989809"
},
"email": {
}
}
}
}

Responses

Success Response
{
"id": "mosip.resident.lostrid",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
"rid": "989768897876565",
"message": "Notification has been sent to the provided contact detail(s)"
},
"errors": null
}
Status Code : 200 (OK)
Failed Response:
{
"id": "mosip.resident.lostrid",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
},
"errors": [
{
"errorCode": "XXX-XXX-002",
"errorMessage": "OTP Authentication Failed"
}
]
}
Status Code : 200 (OK)

Failure details

Error Code
Error Message
Error Description
RES-SER-001
RID not found
RES-SER-002
One or more input parameter is invalid or does not exist
RES-SER-003
Token generation failed
RES-SER-004
OTP validation failed
RES-SER-005
API resource is not available
RES-SER-006
Unable to access API resource
RES-SER-009
Invalid Input Parameter
RES-SER-014
Your request is not successful, please try again later.
RES-SER-015
Template exception
RES-SER-016
Template subject exception
RES-SER-017
Sending notification(Email and SMS) to resident failed.
RES-SER-020
Bad Request
RES-SER-021
Invalid APi response
RES-SER-SYS-001
System exception occured
RES-SER-SYS-002
IO Exception occured
RES-SER-SYS-003
JSON Processing Exception occured

POST /resident/v1/req/update-uin

This request will authenticate an Individual based on provided OTP and respond with RID after successfully placing update request to Registration Processor. Notification will be sent to phone/email.

Resource URL

https://mosip.io/resident/v1/req/update-uin

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Request Body Parameters

Name
Required
Description
Default Value
Example
id
Y
API Id
mosip.resident.uin
version
Y
API version
v1
requestTime
Y
Time when Request was captured
2018-12-09T06:39:04.683Z
request: transactionID
Y
Transaction ID of request
dabed834-974f-11e9-bc42-526af7764f64
request: individualId
Y
UIN
9830872690593682
request: individualIdType
Y
Allowed Type of Individual ID - VID, UIN
UIN
request: otp
Y
OTP
request: demographics
Y
Demographic data of an Individual

Request Body

{
"id":"mosip.resident.updateuin",
"version":"v1",
"requestTime":"2018-12-09T06:39:04.683Z",
"request":{
"transactionID":"dabed834-974f-11e9-bc42-526af7764f64",
"individualId":"9830872690593682",
"individualIdType":"UIN",
"otp":"123456",
"identityJson":"<base64 encoded identity json byte array>",
"documents":[
{
"name":"<document name same as present inside id json>",
"value":"<base64 encoded document byte array>"
},
{
"name":"<document name same as present inside id json>",
"value":"<base64 encoded document byte array>"
}
]
}
}

Responses

Success Response
{
"id": "mosip.resident.updateuin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
"rid": "989768897876565",
"message": "Notification has been sent to the provided contact detail(s)"
},
"errors": null
}
Status Code : 200 (OK)
Failed Response
{
"id": "mosip.resident.uin",
"version": "v1",
"responseTime": "2018-12-09T06:39:04.683Z",
"response": {
},
"errors": [
{
"errorCode": "XXX-XXX-002",
"errorMessage": "OTP Authentication Failed"
}
]
}
Status Code : 200 (OK)

Failure details

Error Code
Error Message
Error Description
RES-SER-002
One or more input parameter is invalid or does not exist
RES-SER-003
Token generation failed
RES-SER-004
OTP validation failed
RES-SER-005
API resource is not available
RES-SER-006
Unable to access API resource
RES-SER-009
Invalid Input Parameter
RES-SER-010
Invalid VID
RES-SER-011
Invalid UIN
RES-SER-013
Invalid UIN for given VID
RES-SER-014
Your request is not successful, please try again later.
RES-SER-015
Template exception
RES-SER-016
Template subject exception
RES-SER-017
Sending notification(Email and SMS) to resident failed.
RES-SER-018
Invalid individualId
RES-SER-020
Bad Request
RES-SER-021
Invalid APi response
RES-SER-022
Resident UIN update failed
RES-SER-023
Could not find the submitted document
RES-SER-SYS-001
System exception occured
RES-SER-SYS-002
IO Exception occured
RES-SER-SYS-003
JSON Processing Exception occured

POST /resident/v1/vid

This request will authenticate an Individual based on provided OTP and will generate VID for the respective UIN.

Resource URL

https://mosip.io/resident/v1/vid

Resource details

Resource Details
Description
Response format
JSON
Requires Authentication
Yes

Request Body Parameters

Name
Required
Description
Default Value
Example
id
Y
API Id
mosip.resident.vid
version
Y
API version
v1
requestTime
Y
Time when Request was captured
2018-12-09T06:39:04.683Z
request: transactionID
Y
Transaction ID of request
dabed834-974f-11e9-bc42-526af7764f64
request: vidType
Y
VID Type - PERPETUAL or TEMPORARY
request: individualId
Y
UIN
9830872690593682
request: individualIdType
Y
Allowed Type of Individual ID - UIN
UIN
request: otp
Y
OTP

Request Body

{
"id": "mosip.resident.vid",
"version": "v1",
"requestTime": "2018-12-09T06:39:04.683Z",
"request": {
"transactionID": "dabed834-974f-11e9-bc42-526af7764f64",
"individualId": "9830872690593682",
"individualIdType": "UIN",
"otp": "123456",
"vidType": "PERPETUAL"
}
}