# System Integration Information

To support strong end to end security and avoid request tampering and man-in-the-middle attack, it is essential that the requests and responses are encrypted. The usage of HTTPS shall ensure transport layer encryption, while encryption of request and response shall ensure integrity & authenticity of data.

|                  |                                                                          |
| ---------------- | ------------------------------------------------------------------------ |
| UAT URL          | <https://digitalapiuat.camsonline.com/CAMSDigiLocker/CDLHome/HomeScreen> |
| Production URL   | Will be shared over mail after UAT sing-off.                             |
| Method           | Form POST                                                                |
| Content-Type     | multipart/form-data                                                      |
| Protocol         | HTTPS                                                                    |
| Input Parameter  | “param” – \[Mandatory] This parameter contains the input JSON request.   |
| Output Parameter | “param” – \[Mandatory] This parameter contains the output JSON request.  |

## **Sample Data Format:**

Following is the format in which the request or response data should be transferred.

```
{
"Key": 
 "cNJ/WtfFMo87RnYze/eMeKkds90IieAI12GSCW/dZBJaqAqc01ssQD+OSts63DUfjMpcP+V3pj9IrQlK9kz/Lr/1NROnE4NZviDJJw/a/vYPTXFPRCyaUOq+9zOZEjUUDb87/prFbCIm0uc4QAduFwnGg+nD7JpChs53aNUhWrdDIx3ERsMbW+ao0PrL60GFkHSnzkDhGTlIsWGMrnwZ+/powhA49+vJ9fTRYj2EY46pfFQJls1wGx5TgOBSn90LbJPHkgY4van3MNBZOthOTT7zp1TKNHm5biWWdOpXKCjmc1bO6vVodMOjFdJ1TZt4LWBB6wEd8S7ZOGJHs1BH+g==",
"Data": 
 "K8GoXSn4RCux9UMg5Hz5fpDQWO+oRApS5rBIAhep93q+84tV1bk8OtHwy0/jLBvJGx1HXXmCmDrQN34ON28NaUW586P0YUwnsBVrBkM1RqyiZeEDpVXivSsvUiZHrUoN",
"Hash": 
 "JU2BffYn3TG+7MWImgx+M6kXG+U++t5vckeDAuUQRxtF4Yxr4qFhw7smBs06Yzo7IVxUd1MVwB5aXtMhi1SIy+mWesrC2nY9IE0fkLhYFW8="
}
```

**Where:**&#x20;

• "Key" is the AES Initialization vector (128 bits) and AES Key (256 bits) separated by a pipe (|) symbol, encrypted using recipient’s RSA Public Key and then Base64 encoded.&#x20;

• "Data" is the actual data encrypted using the AES IV and AES Key and then Base64 encoded.&#x20;

• "Hash" is the SHA-256 hash of the unencrypted data in Hexa-decimal String Format which is further AES encrypted using the same IV and Key as mentioned above and then Base64 Encoded.

## Sample Script Code for Form POST

Following is the sample code in JavaScript to invoke Form POST.

```
<script type="text/javascript">
   function postForm() {
      var form = $('<form method="post" enctype="multipart/form-data" 
action=https://beta.camsonline.com/CAMSDigiLocker/CDLHome/HomeScreen></form>');
      $(form).hide();
      $(form).append($('<input type="hidden" name="param" 
value="{"ClientID":"XXXXX","ClientSecret":"XXXXX",
"SessionID": "89e8e0b8590345488e8d77f410f733b7",
"ReturnURL":"https://yourdomain.com/getResponse",
"Key":"J0QJWXGYOuMaTdaGpqta6eeCWsK5VCYrzRbkhEJrcftRFpLIRuwguiKGVgNbprymhvqBtjl81Zp/7CobYaqqZ8i5GSrJx+sPMgX/tUEebhBAldomJ1fV6pMfmBriMEsS4Xr56uRupgubz/Y9tWeTSvgglu0kRv41ruPgl5ZqK/x2b+EBBnz6/8Dumw8YpIeTlR4Can41SoKpQ+MC6avsTsOgg1/klRzow5nbJNtN+m5C3oS8yziJM/zmOVVLQOVKRq9yhPRt0r+Aq5Cg617pgdcn+6W6jbJ2ka48o7EDq4+RHdLSe/TxssrONVRMf9jfHsJuEnKD5e724BH5Gg64YQ==",
"Data":"UhYG16WSqifbD3QiTMk0ht046HY8Dc0v7ngBs5gesFL3tyjCDJXok00AkcZa7GMkcgp1yO7e6CKikUIolLEiaOB/XRiqrVTQ8c+qxA/1taL/JuXnIt0w4yV7j1xZhOCkW98FgoWLXxBlrzxCAqXSEqMvXr1To7Ta3Z05hNSX08/iEdTVdSQgJjoPIyclgcS/vm8OgLbLtoEImwPpzI/7sw==",
"Hash":"c8BH1ZL0FXxglD4NhUr5jpR+WMGcGBhy1AozXb3b20cd2MptD26VXs7HP/qYFp6w/oy7G2brUMn98ylURQw436JMIgSthDmEVfbKR58GOSs="}" />'));
       $(form).appendTo("body").submit();
 }
</script>
```
