Retrieve Document Categories for Common Document Management
Description
This web service returns the document categories associated with an application or account. The document categories are returned in a tree structure and can be used to redraw the hierarchy on an external user interface.
Note: With the Oxygen release, this web service is enhanced to retrieve the document categories irrespective of the status of the CommonDocManagement flag.
Definition
GET https://<domain>/services/apexrest/genesis/v1/applicationDocumentCategories/getTreeStucture?applicationId=a1d15000002mzxd
Request Parameters
The following table provides details of the request parameters used by this web service:
Field | Type | Description |
---|---|---|
applicationId |
String |
|
borrowerId |
String |
|
Scenario 1: Get Document Tree Structure of Application
Sample Response
{
"status": "SUCCESS",
"rowNumber": null,
"response": [
{
"data": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/clcommon__Document_Category__c/ a1K3k000006taAAEAY"
},
"Id": "a1K3k000006taAAEAY",
"Name": "DOC-012521",
"OwnerId": "0053k00000B7T8WAAV",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:30.000+0000",
"CreatedById": "0053k00000B7T8WAAV",
"LastModifiedDate": "2021-02-08T18:33:30.000+0000",
"LastModifiedById": "0053k00000B7T8WAAV",
"SystemModstamp": "2021-02-08T18:33:30.000+0000",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "Application Documents",
"clcommon__Required__c": false,
"clcommon__Reuse_Document__c": false,
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0"
},
"orderKey": "#Application Documents",
"name": "Application Documents",
"id": "a1K3k000006taAAEAY",
"children": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Document_Category__c/a1K3k000006taABEAY"
},
"Id": "a1K3k000006taABEAY",
"Name": "DOC-012522",
"OwnerId": "0053k00000B7T8WAAV",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:30.000+0000",
"CreatedById": "0053k00000B7T8WAAV",
"LastModifiedDate": "2021-02-08T18:33:30.000+0000",
"LastModifiedById": "0053k00000B7T8WAAV",
"SystemModstamp": "2021-02-08T18:33:30.000+0000",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "ID Verification",
"clcommon__Description__c": "Upload ID Docs",
"clcommon__Document_Definition__c": "a1L3k000005o3YNEAY",
"clcommon__Parent_Document_Category__c": "a1K3k000006taAAEAY",
"clcommon__Priority__c": "High",
"clcommon__Required__c": true,
"clcommon__Reuse_Document__c": true,
"clcommon__Show_In_Portal__c": "UPLOAD_VIA_PORTAL",
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0"
},
"orderKey": "#ID Verification",
"name": "ID Verification",
"id": "a1K3k000006taABEAY",
"children": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Document_Category__c/a1K3k000006taADEAY"
},
"Id": "a1K3k000006taADEAY",
"Name": "DOC-012524",
"OwnerId": "0053k00000B7T8WAAV",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:30.000+0000",
"CreatedById": "0053k00000B7T8WAAV",
"LastModifiedDate": "2021-02-08T18:33:30.000+0000",
"LastModifiedById": "0053k00000B7T8WAAV",
"SystemModstamp": "2021-02-08T18:33:30.000+0000",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "Aadhar Card",
"clcommon__Document_Definition__c": "a1L3k000005o3YSEAY",
"clcommon__Parent_Document_Category__c": "a1K3k000006taABEAY",
"clcommon__Priority__c": "High",
"clcommon__Required__c": true,
"clcommon__Reuse_Document__c": true,
"clcommon__Show_In_Portal__c": "UPLOAD_VIA_PORTAL",
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0"
},
"orderKey": "#Aadhar Card",
"name": "Aadhar Card",
"id": "a1K3k000006taADEAY",
"children": [],
"attachments": [],
"atchParentId": null
}
],
"attachments": [],
"atchParentId": null
}
],
"attachments": [],
"atchParentId": null
},
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/clcommon__Document_Category__c/ a1K3k000006taAEEAY"
},
"Id": "a1K3k000006taAEEAY",
"Name": "DOC-012525",
"OwnerId": "0053k00000AcxJjAAJ",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:36.000+0000",
"CreatedById": "0053k00000AcxJjAAJ",
"LastModifiedDate": "2021-02-08T18:33:36.000+0000",
"LastModifiedById": "0053k00000AcxJjAAJ",
"SystemModstamp": "2021-02-08T18:33:36.000+0000",
"clcommon__Account__c": "0013k00002vYoS3AAK",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "John Smith",
"clcommon__Required__c": false,
"clcommon__Reuse_Document__c": false,
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0",
"clcommon__Account__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/0013k00002vYoS3AAK"
},
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma"
}
},
"orderKey": "Rajat SharmaJohn Smith",
"name": "John Smith",
"id": "a1K3k000006taAEEAY",
"children": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Document_Category__c/a1K3k000006taAFEAY"
},
"Id": "a1K3k000006taAFEAY",
"Name": "DOC-012526",
"OwnerId": "0053k00000AcxJjAAJ",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:37.000+0000",
"CreatedById": "0053k00000AcxJjAAJ",
"LastModifiedDate": "2021-02-08T18:33:37.000+0000",
"LastModifiedById": "0053k00000AcxJjAAJ",
"SystemModstamp": "2021-02-08T18:33:37.000+0000",
"clcommon__Account__c": "0013k00002vYoS3AAK",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "Tax Statements Party",
"clcommon__Description__c": "Tax Statements Party",
"clcommon__Document_Definition__c": "a1L3k000005o3YXEAY",
"clcommon__Parent_Document_Category__c": "a1K3k000006taAEEAY",
"clcommon__Priority__c": "High",
"clcommon__Required__c": true,
"clcommon__Reuse_Document__c": true,
"clcommon__Show_In_Portal__c": "UPLOAD_VIA_PORTAL",
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0",
"clcommon__Account__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/ 0013k00002vYoS3AAK"
},
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma"
}
},
"orderKey": "Rajat SharmaTax Statements Party",
"name": "Tax Statements Party",
"id": "a1K3k000006taAFEAY",
"children": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Document_Category__c/a1K3k000006taAGEAY"
},
"Id": "a1K3k000006taAGEAY",
"Name": "DOC-012527",
"OwnerId": "0053k00000AcxJjAAJ",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:37.000+0000",
"CreatedById": "0053k00000AcxJjAAJ",
"LastModifiedDate": "2021-02-08T18:33:37.000+0000",
"LastModifiedById": "0053k00000AcxJjAAJ",
"SystemModstamp": "2021-02-08T18:33:37.000+0000",
"clcommon__Account__c": "0013k00002vYoS3AAK",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "Form 16",
"clcommon__Description__c": "Form 16",
"clcommon__Document_Definition__c": "a1L3k000005o3YcEAI",
"clcommon__Parent_Document_Category__c": "a1K3k000006taAFEAY",
"clcommon__Priority__c": "High",
"clcommon__Required__c": false,
"clcommon__Reuse_Document__c": true,
"clcommon__Show_In_Portal__c": "UPLOAD_VIA_PORTAL",
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0",
"clcommon__DocCat_Attachment_Associations__r": {
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "clcommon__Category_Attachment_Association__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Category_Attachment_Association__c/a0g3k00000Cm0cuAAB"
},
"clcommon__Document_Category__c": "a1K3k000006taAGEAY",
"Id": "a0g3k00000Cm0cuAAB",
"Name": "RentReceipt.doc",
"clcommon__Attachment_Id__c": "06A3k00000DQJxsEAH"
}
]
},
"clcommon__Account__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/ 0013k00002vYoS3AAK"
},
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma"
}
},
"orderKey": "Rajat SharmaForm 16",
"name": "Form 16",
"id": "a1K3k000006taAGEAY",
"children": [],
"attachments": [
{
"name": "Form16.doc",
"id": "a0g3k00000Cm0cuAAB",
"association": {
"attributes": {
"type": "clcommon__Category_Attachment_Association__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Category_Attachment_Association__c/a0g3k00000Cm0cuAAB"
},
"clcommon__Document_Category__c": "a1K3k000006taAGEAY",
"Id": "a0g3k00000Cm0cuAAB",
"Name": "Form16.doc",
"clcommon__Attachment_Id__c": "06A3k00000DQJxsEAH"
}
}
],
"atchParentId": null
}
],
"attachments": [],
"atchParentId": null
}
],
"attachments": [],
"atchParentId": null
}
]
}
],
"errorNumber": null,
"errorMessage": null,
"errorCode": "NO_ERROR",
"content": []
}
Scenario 2: Get Document Tree Structure of Account
Sample Response
{
"status": "SUCCESS",
"rowNumber": null,
"response": [
{
"data": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/clcommon__Document_Category__c/ a1K3k000006taAEEAY"
},
"Id": "a1K3k000006taAEEAY",
"Name": "DOC-012525",
"OwnerId": "0053k00000AcxJjAAJ",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:36.000+0000",
"CreatedById": "0053k00000AcxJjAAJ",
"LastModifiedDate": "2021-02-08T18:33:36.000+0000",
"LastModifiedById": "0053k00000AcxJjAAJ",
"SystemModstamp": "2021-02-08T18:33:36.000+0000",
"clcommon__Account__c": "0013k00002vYoS3AAK",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "John Smith",
"clcommon__Required__c": false,
"clcommon__Reuse_Document__c": false,
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0",
"clcommon__Account__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/0013k00002vYoS3AAK"
},
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma"
}
},
"orderKey": "Rajat SharmaJohn Smith",
"name": "APP-0000002925",
"id": "a1K3k000006taAEEAY",
"children": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Document_Category__c/a1K3k000006taAFEAY"
},
"Id": "a1K3k000006taAFEAY",
"Name": "DOC-012526",
"OwnerId": "0053k00000AcxJjAAJ",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:37.000+0000",
"CreatedById": "0053k00000AcxJjAAJ",
"LastModifiedDate": "2021-02-08T18:33:37.000+0000",
"LastModifiedById": "0053k00000AcxJjAAJ",
"SystemModstamp": "2021-02-08T18:33:37.000+0000",
"clcommon__Account__c": "0013k00002vYoS3AAK",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "Tax Statements Party",
"clcommon__Description__c": "Tax Statements Party",
"clcommon__Document_Definition__c": "a1L3k000005o3YXEAY",
"clcommon__Parent_Document_Category__c": "a1K3k000006taAEEAY",
"clcommon__Priority__c": "High",
"clcommon__Required__c": true,
"clcommon__Reuse_Document__c": true,
"clcommon__Show_In_Portal__c": "UPLOAD_VIA_PORTAL",
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0",
"clcommon__Account__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/ 0013k00002vYoS3AAK"
},
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma"
}
},
"orderKey": "Rajat SharmaTax Statements Party",
"name": "Tax Statements Party",
"id": "a1K3k000006taAFEAY",
"children": [
{
"parent": {
"attributes": {
"type": "clcommon__Document_Category__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Document_Category__c/a1K3k000006taAGEAY"
},
"Id": "a1K3k000006taAGEAY",
"Name": "DOC-012527",
"OwnerId": "0053k00000AcxJjAAJ",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:37.000+0000",
"CreatedById": "0053k00000AcxJjAAJ",
"LastModifiedDate": "2021-02-08T18:33:37.000+0000",
"LastModifiedById": "0053k00000AcxJjAAJ",
"SystemModstamp": "2021-02-08T18:33:37.000+0000",
"clcommon__Account__c": "0013k00002vYoS3AAK",
"clcommon__Active__c": true,
"clcommon__Category_Name__c": "Form 16",
"clcommon__Description__c": "Form 16",
"clcommon__Document_Definition__c": "a1L3k000005o3YcEAI",
"clcommon__Parent_Document_Category__c": "a1K3k000006taAFEAY",
"clcommon__Priority__c": "High",
"clcommon__Required__c": false,
"clcommon__Reuse_Document__c": true,
"clcommon__Show_In_Portal__c": "UPLOAD_VIA_PORTAL",
"clcommon__Status__c": "OPEN",
"genesis__Application__c": "a6k3k000001U2YIAA0",
"clcommon__DocCat_Attachment_Associations__r": {
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "clcommon__Category_Attachment_Association__c",
"url": "/services/data/v34.0/sobjects/clcommon__Category_Attachment_Association__c/a0g3k00000Cm0cuAAB"
},
"clcommon__Document_Category__c": "a1K3k000006taAGEAY",
"Id": "a0g3k00000Cm0cuAAB",
"Name": "Form16.doc",
"clcommon__Attachment_Id__c": "06A3k00000DQJxsEAH"
}
]
},
"clcommon__Account__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/ 0013k00002vYoS3AAK"
},
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma"
}
},
"orderKey": "Rajat SharmaForm 16",
"name": "Form 16",
"id": "a1K3k000006taAGEAY",
"children": [],
"attachments": [
{
"name": "RentReceipt.doc",
"id": "a0g3k00000Cm0cuAAB",
"association": {
"attributes": {
"type": "clcommon__Category_Attachment_Association__c",
"url": "/services/data/v34.0/sobjects/ clcommon__Category_Attachment_Association__c/a0g3k00000Cm0cuAAB"
},
"clcommon__Document_Category__c": "a1K3k000006taAGEAY",
"Id": "a0g3k00000Cm0cuAAB",
"Name": "Form16.doc",
"clcommon__Attachment_Id__c": "06A3k00000DQJxsEAH"
}
}
],
"atchParentId": null
}
],
"attachments": [],
"atchParentId": null
}
],
"attachments": [],
"atchParentId": null
}
]
}
],
"errorNumber": null,
"errorMessage": null,
"errorCode": "NO_ERROR",
"content": []
}