Comment on page
Document APIs
This section contains detail about the service APIs for Document Master data.
- Documents Categories APIs These APIs include create, update, fetch, search and filter which are used by the administrator portal. Create and update APIs are used for the create and updating document category functionality. Search API is used by the portal to fetch the list of document categories based on a filter criterion to display the list of document categories on the UI and filter API is used to populate document category filter drop-downs on the portal UI. Fetch API of document category are used by Pre-Registration UI to display the list of document categories for the applicant to view and by the ID Object validator to validate the document category received in the packet in Registration processor.
- Documents Types APIs These APIs include create, update, fetch, search and filter which are used by the administrator portal. Create and update APIs are used for the create and update document type functionality. Search API is used by the portal to fetch the list of document types based on a filter criterion to display the list of document types on the UI and filter API is used to populate document types filter drop-downs on the portal UI. Fetch API of document type is used by Pre-Registration UI to display the list of document types for the applicant to view and select and by the ID Object validator to validate the document type received in the packet in Registration processor.
- Valid Documents API These APIs includes the map, unmap, search and filter which are used by the administrator portal. Map and un-map APIs are used by the portal to create and remove mapping of document category and document type. Search API is used by the portal to fetch the mappings of document categories and document types based on a filter criterion to display the list of mappings on the UI. Filter API is used to populate document mappings filter drop-downs on the portal UI.
This service will create the list of Documents Category which are used in the MOSIP platform.
POST /documentcategories
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
code | Yes | Document category code | | |
description | optional | document description | | |
isActive | Yes | is active or not | | |
langCode | Yes | language code | | |
name | Yes | Document category name | | |
{
"id": "string",
"version": "string",
"metadata": {},
"requesttime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"request": {
"code": "string",
"description": "string",
"isActive": true,
"langCode": "string",
"name": "string"
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"code": "string",
"langCode": "string"
}
}
Response code: 200 Ok
This service will create the list of Documents Category which are used in the MOSIP platform.
PUT /documentcategories
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
code | Yes | Document category code | | |
description | optional | document description | | |
isActive | Yes | is active or not | | |
langCode | Yes | language code | | |
name | Yes | Document category name | | |
{
"id": "string",
"version": "string",
"metadata": {},
"requesttime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"request": {
"code": "string",
"description": "string",
"isActive": true,
"langCode": "string",
"name": "string"
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"code": "string",
"langCode": "string"
}
}
Response code: 200 Ok
This service will provides the service for the List of documents categories.
GET /documentcategories
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- | | | | |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"documentcategories": [
{
"code": "string",
"description": "string",
"isActive": true,
"langCode": "string",
"name": "string"
}
]
}
}
Response code: 200 Ok
This service will provides the service for the List of documents categories.
GET /documentcategories/{code}/{langcode}
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- | | | | |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"documentcategories": [
{
"code": "string",
"description": "string",
"isActive": true,
"langCode": "string",
"name": "string"
}
]
}
}
Response code: 200 Ok
This service will provides the service for the List of documents categories based on the passed langcode.
GET /documentcategories/{langcode}
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- | | | | |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"documentcategories": [
{
"code": "string",
"description": "string",
"isActive": true,
"langCode": "string",
"name": "string"
}
]
}
}
Response code: 200 Ok
This service will provides the service to delete documents categories based on the passed given code.
DELETE /documentcategories/{code}
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- | | | | |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"code": "string"
}
}
Response code: 200 Ok
This service is for the registration centers search functionality. All the filter parameters are passed and the Documents Category are searched and the matching results are returned.
POST /documentcategories/search
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
filters | No | Array of the filter applied. In case of "list" screen, this array will be empty | -NA- | |
columnName | No | The column name in the JSON response | -NA- | |
type | No | The value have to be in ["contains","equals","startsWith","between"] | -NA- | |
value | No | Value or id selected in the filter by the end user | -NA- | |
fromValue | No | If the type is "between", this field is the value of the startRange | -NA- | |
toValue | No | If the type is "between", this field is the value of the endRange | -NA- | |
languagecode | Yes | Language code in Language code in ISO 639-2 format | | |
sort | No | This is an array of the sort field and type | | |
sortfield | The field on which the sort is applied | | modifiedDate | |
sorttype | This should be either of ['ASC','DESC'] | | ASC | |
pagination | The pagination parameter object | | | |
pageStart | This is the start index | 0 | 10 | |
pageFetch | This is the amount of records to be fetched | 10 | 10 | |
Please find the filter columns used in search
- 1.Name
- 2.Status
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string",
"request": {
"filters" : [
{
"columnName": "",
"type": "in",
"value": "",
"fromValue": "",
"toValue": ""
}
],
"sort":[
{
"sortfield":"string",
"sorttype":"ASC"
}
],
"pagination":{
"pageStart":"number",
"pageFetch":"number"
},
"languageCode":""
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"data": [
{
"code": "string",
"description": "string",
"isActive": true,
"langCode": "string",
"name": "string"
}
],
"fromRecord" : "number",
"toRecord":"number",
"totalRecord":"number"
}
}
Response code: 200 Ok
This service returns the filter values which are required in the dropdown entries of the filter screen.
POST /documentcategories/filtervalues
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
filters | No | Array of the filter applied. In case of "list" screen, this array will be empty | -NA- | |
columnName | No | The column name in the JSON response | -NA- | |
type | No | The value have to be in ["unique","all"] | unique | unique |
languagecode | Yes | Language code in Language code in ISO 639-2 format | | |
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
"request": {
"filters" : [
{
"columnName": ""
"type": "unique"
}
],
"languageCode": "string",
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"filters": [
{
"fieldID": "string",
"fieldValue": "string"
}
]
}
}
Response code: 200 Ok
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [{
"errorCode": "string",
"message": "string"
}],
"response": null
}
Response code: 200 Ok
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-013 | Error occurred while fetching Document Category details | Fetch Issue |
KER-MSD-051 | Error occurred while inserting Document Category details | Insertion Issue |
KER-MSD-014 | Document Category not found | Data Not Found |
KER-MSD-089 | Error occurred while updating Document Category details | Update Issue |
KER-MSD-090 | Error occurred while deleting Document Category details | Deletion Issue |
KER-MSD-123 | Cannot delete dependency found | Deletion Issue because of dependency |
This service will create the list of Documents types which are used in the MOSIP platform. There is another service to map the document category and document type. Please find the steps to create primary/secondary languages in this link.
POST /documenttype
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
code | Yes | Code of document type | | |
name | Yes | Name of the document type | | |
description | Yes | Description of the document type | | |
langCode | Yes | Language code of the document type | | |
isActive | Yes | Active field of the document type | | |
{
"id": "string",
"metadata": {},
"request": {
"code": "",
"description": "test desc",
"isActive": true,
"langCode": "eng",
"name": "test1"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
{
"id": "string",
"version": "string",
"responsetime": "2019-12-26T11:41:18.276Z",
"metadata": null,
"response": {
"code": "c05d4d28-f00d-414c-b23a-e29a6c93f108",
"langCode": "eng",
"name": "test1",
"description": "test desc",
"isActive": true,
"createdBy": "110006",
"createdDateTime": "2019-12-26T11:41:18.297Z",
"updatedBy": null,
"updatedDateTime": null,
"isDeleted": null,
"deletedDateTime": null
},
"errors": null
}
Response code: 200 Ok
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"response": null
}
Response code: 200 Ok
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-500 | Internal Server Error | If system error occurs |
KER-ATH-403 | Forbidden | If unauthorized role detected |
KER-ATH-401 | Authentication Failed | If no role/invalid token is detected |
KER-MSD-101 | Error occurred while inserting application details | |
This service will update the list of Documents types which are used in the MOSIP platform.
PUT /documenttype
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
code | Yes | Code of document type | | |
name | Yes | Name of the document type | | |
description | Yes | Description of the document type | | |
langCode | Yes | Language code of the document type | | |
isActive | Yes | Active field of the document type | | |
{
"id": "string",
"metadata": {},
"request": {
"code": "c05d4d28-f00d-414c-b23a-e29a6c93f108",
"description": "test desc",
"isActive": true,
"langCode": "eng",
"name": "test"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
{
"id": "string",
"version": "string",
"responsetime": "2019-12-26T11:41:18.276Z",
"metadata": null,
"response": {
"code": "c05d4d28-f00d-414c-b23a-e29a6c93f108",
"langCode": "eng",
"name": "test1",
"description": "test desc",
"isActive": true,
"createdBy": "110006",
"createdDateTime": "2019-12-26T11:41:18.297Z",
"updatedBy": "110006",
"updatedDateTime": "2019-12-26T11:41:18.297Z",
"isDeleted": null,
"deletedDateTime": null
},
"errors": null
}
Response code: 200 Ok
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"response": null
}
Response code: 200 Ok