This section details about the REST services in ID Repository module.
These services is used by Registration Processor to store/update during registration process and ID Authentication to retrieve Identity of an Individual for their authentication.
Registration Processor
- Registration Processor will create a new ID record or update an existing ID record in ID repository and store corresponding demographic and bio-metric documents. Registration Processor can also retrieve Identity details of an Individual using RID.
ID Authentication
- ID Authentication can retrieve Identity details of an Individual using UIN for authentication purpose.
Identity Services does not support search based on attributes of an ID.
This service will create a new ID record in ID repository and store corresponding demographic and bio-metric documents.
https://mosip.io/idrepository/v1/identity/
Response format
JSON
Requires Authentication
Yes
id
yes
Id of the API
mosip.id.create
version
yes
version of the API
v1
requesttime
yes
timestamp of the request
2018-12-11T06:12:25.288Z
request
yes
Request Body attributes
request: registrationId
yes
registration id
request: biometricReferenceId
yes
ABIS Reference ID
request: identity
yes
JSON body as per ID object schema
request: documents
yes
Documents that are to be uploaded for any ID attribute
Request
Success Response
Response Code : 200 (OK)
IDR-IDC-001
Missing Input Parameter - %s
Input Parameter Missing
IDR-IDC-002
Invalid Input Parameter - %s
Invalid Input Parameter
IDR-IDC-003
Invalid Request
Invalid Request attribute
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-005
Input Data Validation Failed
Validation on input fails
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
IDR-IDC-012
Record already exists in DB
Identity with input UIN or RID already exists in DB
IDR-IDS-003
Failed to encrypt/decrypt message using Kernel Crypto Manager
Error thrown from Kernel Crypto Manager
IDR-IDS-004
Failed to store/retrieve files in DFS
Error while storing file in DFS
IDR-IDS-005
Failed to process Id Object using kernel Id Object validator
Error while validating ID Object against Id ObjectValidator
IDR-IDS-007
Failed to retrieve data from kernel Masterdata
Error while retrieving data from Kernel MasterData
This service will retrieve an ID record from ID repository for a given UIN (Unique Identification Number) and identity type as bio/demo/all.
When type=bio is selected, individualBiometrics along with Identity details of the Individual are returned
When type=demo is selected, Demographic documents along with Identity details of the Individual are returned
When type=all is selected, both individualBiometrics and demographic documents are returned along with Identity details of the Individual
If no identity type is provided, stored Identity details of the Individual will be returned as a default response.
https://mosip.io/idrepository/v1/identity/uin/{uin}?type=bio
Response format
JSON
Requires Authentication
Yes
Success Response
Response Code : 200 (OK)
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-007
No Record(s) found
Identity with input UIN does not exist
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
IDR-IDS-001
Identity Element hash does not match
Error while matching Identity hash with hash of decrypted Identity
IDR-IDS-002
Biometric/Document hash does not match
Error while matching hash of Biometric/Document with hash of decrypted Biometric/Document
IDR-IDS-003
Failed to encrypt/decrypt message using Kernel Crypto Manager
Error thrown from Kernel Crypto Manager
IDR-IDS-004
Failed to store/retrieve files in DFS
Error while storing file in DFS
IDR-IDS-006
File(s) not found in DFS
Requested Biometric/Demographic documents not found in DFS
IDR-IDS-007
Failed to retrieve data from kernel Masterdata
Error while retrieving data from Kernel MasterData
This operation will retrieve an ID record from ID repository for a given RID (Registration ID) and identity type as bio/demo/all.
When type=bio is selected, individualBiometrics along with Identity details of Individual are returned
When type=demo is selected, Demographic documents along with Identity details of Individual are returned
When type=all is selected, both individualBiometrics and demographic documents are returned along with Identity details of Individual
If no identity type is provided, stored latest Identity details of Individual mapped to the UIN of input RID will be returned as a default response.
https://mosip.io/idrepository/v1/identity/rid/{rid}?type=bio
Response format
JSON
Requires Authentication
Yes
Success Response
Response Code : 200 (OK)
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-007
No Record(s) found
Identity with input RID does not exist
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
IDR-IDS-001
Identity Element hash does not match
Error while matching Identity hash with hash of decrypted Identity
IDR-IDS-002
Biometric/Document hash does not match
Error while matching hash of Biometric/Document with hash of decrypted Biometric/Document
IDR-IDS-003
Failed to encrypt/decrypt message using Kernel Crypto Manager
Error thrown from Kernel Crypto Manager
IDR-IDS-004
Failed to store/retrieve files in DFS
Error while storing file in DFS
IDR-IDS-006
File(s) not found in DFS
Requested Biometric/Demographic documents not found in DFS
IDR-IDS-007
Failed to retrieve data from kernel Masterdata
Error while retrieving data from Kernel MasterData
This operation will update an existing ID record in the ID repository for a given UIN (Unique Identification Number)
https://mosip.io/idrepository/v1/identity/
Response format
JSON
Requires Authentication
Yes
id
Y
Id of the API
mosip.id.update
version
Y
version of the API
v1
requesttime
Y
timestamp of the request
2018-12-11T06:12:25.288Z
request
Y
Request body attributes
request: status
N
status of ID
request: registrationId
Y
Registration id
request: biometricReferenceId
N
ABIS Reference Id
request: identity
M
JSON body as per the ID object schema
request: identity: UIN
M
UIN for which Identity is updated
request: documents
N
Documents that are to be uploaded for any ID attribute
Success Response
Response Code : 200 (OK)
IDR-IDC-001
Missing Input Parameter - %s
Input Parameter Missing
IDR-IDC-002
Invalid Input Parameter - %s
Invalid Input Parameter
IDR-IDC-003
Invalid Request
Invalid Request attribute
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-005
Input Data Validation Failed
Validation on input fails
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
IDR-IDC-012
Record already exists in DB
Identity with input RID already exists in DB
IDR-IDS-001
Identity Element hash does not match
Error while matching Identity hash with hash of decrypted Identity
IDR-IDS-002
Biometric/Document hash does not match
Error while matching hash of Biometric/Document with hash of decrypted Biometric/Document
IDR-IDS-003
Failed to encrypt/decrypt message using Kernel Crypto Manager
Error thrown from Kernel Crypto Manager
IDR-IDS-004
Failed to store/retrieve files in DFS
Error while storing file in DFS
IDR-IDS-006
File(s) not found in DFS
Requested Biometric/Demographic documents not found in DFS
IDR-IDS-005
Failed to process Id Object using kernel Id Object validator
Error while validating ID Object against Id ObjectValidator
IDR-IDS-007
Failed to retrieve data from kernel Masterdata
Error while retrieving data from Kernel MasterData
These services can be used to perform various operations on VID like generate or re-generate VID, update VID status, etc.
Registration Processor
- Registration Processor will create a new perpetual VID once UIN is generated successfully.
Resident Services
- Individual can use Resident Services to generate or re-generate a new temporary VID.
ID Authentication
- ID Authentication can retrieve UIN for a given VID for authenticating Individual using VID.
This service will generate a new VID based on VID type provided.
https://mosip.io/idrepository/v1/vid
Response format
JSON
Requires Authentication
Yes
id
yes
Id of the API
mosip.vid.create
version
yes
version of the API
v1
requesttime
yes
timestamp of the request
2019-04-30T06:12:25.288Z
request
yes
Request Body attributes
request: vidType
yes
VID Type
Perpetual or Temporary
request: UIN
yes
Individual's UIN
981576026435
Success Response
Response Code : 200 (OK)
IDR-VID-002
Failed to generate VID
Error while generating VID
IDR-VID-003
Could not generate/regenerate VID as per policy
Error while generating VID based on policy
IDR-VID-004
Deactivate UIN or Blocked UIN
UIN is either de-activated or blocked
IDR-VID-005
Failed to retrieve uin data using Identity Service
Error while retrieving UIN details from Identity Service
IDR-IDC-001
Missing Input Parameter - %s
Input Parameter Missing
IDR-IDC-002
Invalid Input Parameter - %s
Invalid Input Parameter
IDR-IDC-003
Invalid Request
Invalid Request attribute
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-005
Input Data Validation Failed
Validation on input fails
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
This service will retrieve associated decrypted UIN for a given VID, once VID is successfully validated.
https://mosip.io/idrepository/v1/vid/{vid}
Response format
JSON
Requires Authentication
Yes
Success Response
Response Code : 200 (OK)
IDR-VID-001
VID is
Here status could be REVOKED, EXPIRED, USED, INVALIDATED or DEACTIVATED
IDR-VID-004
UIN
Here, uin-status could be either de-activated or blocked
IDR-VID-005
Failed to retrieve uin data using Identity Service
Error while retrieving UIN details from Identity Service
IDR-VID-006
Uin hash does not match
Error while matching hash of UIN against decrypted UIN
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-007
No Record(s) found
Input VID does not exist in DB
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
This service will update status associated with a given VID, if the current status of VID is 'ACTIVE'.
https://mosip.io/idrepository/v1/vid/{vid}
Response format
JSON
Requires Authentication
Yes
id
yes
Id of the API
mosip.vid.update
version
yes
version of the API
v1
requesttime
yes
timestamp of the request
2019-04-30T06:12:25.288Z
request
yes
Request Body attributes
request: vidStatus
yes
status of VID
USED or REVOKED or EXPIRED
Success Response
Response Code : 200 (OK)
IDR-VID-001
VID is DEACTIVATED or VID is REVOKED
VID is REVOKED,EXPIRED,USED,INVALIDATED or DEACTIVATED
IDR-VID-004
Deactivate UIN or Blocked UIN
UIN is either de-activated or blocked
IDR-VID-005
Failed to retrieve uin data using Identity Service
Error while retrieving UIN details from Identity Service
IDR-VID-006
Uin hash does not match
Error while matching hash of UIN against decrypted UIN
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-007
No Record(s) found
Input VID does not exist in DB
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
This service will re-generate VID for a given VID, only if the current status of VID is 'ACTIVE', 'USED', or 'EXPIRED'.
https://mosip.io/idrepository/v1/vid/{vid}/regenerate
Response format
JSON
Requires Authentication
Yes
Success Response
Response Code : 200 (OK)
IDR-VID-002
Failed to generate VID
Error while generating VID
IDR-VID-003
Could not generate/regenerate VID as per policy
Error while generating VID based on policy
IDR-VID-004
Deactivate UIN or Blocked UIN
UIN is either de-activated or blocked
IDR-VID-005
Failed to retrieve uin data using Identity Service
Error while retrieving UIN details from Identity Service
IDR-VID-006
Uin hash does not match
Error while matching hash of UIN against decrypted UIN
IDR-IDC-001
Missing Input Parameter - %s
Input Parameter Missing
IDR-IDC-002
Invalid Input Parameter - %s
Invalid Input Parameter
IDR-IDC-003
Invalid Request
Invalid Request attribute
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-005
Input Data Validation Failed
Validation on input fails
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
This service will de-activate VIDs mapped against the provided UIN, only if the current status of VID is 'ACTIVE'.
https://mosip.io/idrepository/v2/vid/deactivate
Response format
JSON
Requires Authentication
Yes
id
yes
Id of the API
mosip.vid.deactivate
version
yes
version of the API
v2
requesttime
yes
timestamp of the request
2019-04-30T06:12:25.288Z
request
yes
Request Body attributes
request: UIN
yes
Individual's UIN
981576026435
Success Response
Response Code : 200 (OK)
IDR-VID-001
VID is
Here status could be REVOKED, EXPIRED, USED, INVALIDATED or DEACTIVATED
IDR-VID-004
Deactivate UIN or Blocked UIN
UIN is either de-activated or blocked
IDR-VID-006
Uin hash does not match
Error while matching hash of UIN against decrypted UIN
IDR-VID-005
Failed to retrieve uin data using Identity Service
Error while retrieving UIN details from Identity Service
IDR-IDC-001
Missing Input Parameter - %s
Input Parameter Missing
IDR-IDC-002
Invalid Input Parameter - %s
Invalid Input Parameter
IDR-IDC-003
Invalid Request
Invalid Request attribute
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-005
Input Data Validation Failed
Validation on input fails
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-007
No Record(s) found
No VID records found
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
This service will re-activate VIDs mapped against the provided UIN, only if the current status of VID is 'DEACTIVATED', 'INACTIVE' and not 'EXPIRED'.
https://mosip.io/idrepository/v2/vid/reactivate
Response format
JSON
Requires Authentication
Yes
id
yes
Id of the API
mosip.vid.reactivate
version
yes
version of the API
v2
requesttime
yes
timestamp of the request
2019-04-30T06:12:25.288Z
request
yes
Request Body attributes
request: UIN
yes
Individual's UIN
981576026435
Success Response
Response Code : 200 (OK)
IDR-VID-001
VID is
Here status could be REVOKED, EXPIRED, USED.
IDR-VID-004
Deactivate UIN or Blocked UIN
UIN is either de-activated or blocked
IDR-VID-006
Uin hash does not match
Error while matching hash of UIN against decrypted UIN
IDR-VID-005
Failed to retrieve uin data using Identity Service
Error while retrieving UIN details from Identity Service
IDR-IDC-001
Missing Input Parameter - %s
Input Parameter Missing
IDR-IDC-002
Invalid Input Parameter - %s
Invalid Input Parameter
IDR-IDC-003
Invalid Request
Invalid Request attribute
IDR-IDC-004
Unknown error occurred
An unknown error occurred
IDR-IDC-005
Input Data Validation Failed
Validation on input fails
IDR-IDC-006
Error occurred while performing DB operations
DB connectivity error
IDR-IDC-007
No Record(s) found
No VID records found
IDR-IDC-008
4XX - Client Error occurred
4XX error from Kernel APIs
IDR-IDC-009
5XX - Server Error occurred
5XX error from Kernel APIs
IDR-IDC-010
Connection timed out
Connection timed out while invoking REST APIs
IDR-IDC-011
Authorization Failed
Input role is not authorized to access the service
Authentication Types Status Service can be used by Resident Services to retrieve or update status (locked or unlocked) of Auth Types of an Individual using VID/UIN.
Resident Services - Individual can request to lock or unlock one or more authentication types using Resident Services, which in turn calls this service to store or retrieve the auth type status.
This request will retrieve status (locked or unlocked) of Auth Types of an Individual using VID/UIN.
https://{base_url}/idauthentication/v1/internal/authtypes/status/individualIdType/:IDType/individualId/:ID
Response format
JSON
Requires Authentication
Yes
ID Type
The page number to start
This is a mandatory parameter
Default Value: VID
ID
The value of IDType - UIN or VID
This is a mandatory parameter
Success Response
Response Code : 200 (OK)
Failed Response
Response Code : 200 (OK)
IDA-MLC-001
Request to be received at MOSIP within<x> hrs/min
Invalid Time stamp
Please send the request within <x> hrs/min
IDA-MLC-002
Invalid UIN
Invalid UIN
Please retry with the correct UIN.
IDA-MLC-003
UIN has been deactivated
UIN Deactivated
Your UIN status is not active.
IDA-MLC-007
Request could not be processed. Please try again
Could not process request/Unknown error; Invalid Auth Request
IDA-MLC-009
Invalid Input parameter- attribute
Invalid Input parameter- attribute
IDA-MLC-015
Identity Type - <Identity Type> not configured for the country
ID Type (UIN/USERID) not supported for a country
IDA-MLC-018
%s not available in database
UIN, VID not available in database
This request will lock or unlock one or more authenticate types for an Individual using VID/UIN.
https://{base_url}/idauthentication/v1/internal/authtypes/status
Response format
JSON
Requires Authentication
Yes
consentObtained
Y
Individual's consent
id
Y
API Id
mosip.identity.otp
version
Y
API version
1.0
requestTime
Y
Time when Request was captured
2019-02-15T10:01:57.086+05:30
individualId
Y
VID
9830872690593682
individualIdType
Y
Allowed Type of Individual ID - VID, UIN
VID
request
Y
Auth type status attributes to be applied for the Individual
request: authTypes
Y
List of auth type status attributes to be applied for the Individual
request: authTypes: authType
Y
Auth type to lock - otp, demo, bio
bio
request: authTypes: authSubType
N
Auth sub type to lock (if applicable for the selected autType)
Finger
request: authTypes: isLocked
Y
Boolean value (true
or false
) whether to lock or unlock the selected authType (and authSubType)
true
Success Response
Response Code : 200 (OK)
Failed Response
Response Code : 200 (OK)
IDA-MLC-001
Request to be received at MOSIP within<x> hrs/min
Invalid Time stamp
Please send the request within <x> hrs/min
IDA-MLC-002
Invalid UIN
Invalid UIN
Please retry with the correct UIN.
IDA-MLC-003
UIN has been deactivated
UIN Deactivated
Your UIN status is not active.
IDA-MLC-006
Missing Input parameter- <attribute> Example: Missing Input parameter- version
Missing Input parameter- attribute - all the mandatory attributes
IDA-MLC-007
Request could not be processed. Please try again
Could not process request/Unknown error; Invalid Auth Request
IDA-MLC-009
Invalid Input parameter- attribute
Invalid Input parameter- attribute
IDA-MLC-012
Individual's Consent is not available
Invalid resident consent for eKYC/Auth
IDA-MLC-015
Identity Type - <Identity Type> not configured for the country
ID Type (UIN/USERID) not supported for a country
IDA-MLC-018
%s not available in database
UIN, VID not available in database