{"info":{"_postman_id":"d2a163f6-70dc-4588-a01b-a6b517efd3d7","name":"Apollo Finvest: Loan Update API (PL/ML/EDI)","description":"<html><head></head><body><h2 id=\"overview\"><strong>Overview</strong></h2>\n<p>Loan Update API is used to update the loan that is created on Apollo's Loan Management System: Sonic. This API allows the fintech partners to allow edit a few fields/attributes of the loans that created already up to a certain stage of the loan process.</p>\n<h2 id=\"authenticationauthorisation\">Authentication/Authorisation:</h2>\n<hr>\n<p><code>x-API-key</code> and access token should be sent in request headers for authenticating the request. Apollo will provide <code>x-API-key</code>. Access tokens should be generated by the partners. Therefore please generate a new access token using the below code piece. The token will expire in 5 minutes.</p>\n<p>Please refer to the API collection to understand more...</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-python\">import requests\nimport base64\nurl = \"will be shared by apollo\"\nclient_id = \"will be shared by apollo\"\nclient_secret_id = \"will be shared by apollo\"\nbasic = base64.b64encode((client_id+':'+client_secret_id).encode())\npayload = 'grant_type=client_credentials&amp;scope='\nheaders = {\n    'Authorization': 'Basic '+basic.decode(),\n    'Content-Type': 'application/x-www-form-urlencoded',\n}\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\nprint(response.json())\n\n</code></pre>\n<hr>\n<h2 id=\"required-query-parameters\"><strong>Required Query Parameters:</strong></h2>\n<hr>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Params</strong></th>\n<th><strong>Values</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>loan_id</td>\n<td>The Loan Id was created by the partner at the time of loan creation. Eg: \"Tesst001\"</td>\n<td><strong><code>Required.</code></strong> <strong><code>String.</code></strong> This is the unique value created and maintained by the partner at the time of pushing the loan to Apollo's system</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"required-request-body\"><strong>Required Request Body:</strong></h2>\n<hr>\n<p>We allow the partners only a few fields/attributes of the loan and that should be available in the request body. Also, these updates/changes can be made only within <strong><code>3 days</code></strong> of the loan creation. If there are no updates and required documents (loan agreement, sanction letter, KFS) are not received within 3 days the loan will be moved rejected stage. Below mentioned are the fields/attributes that can be updated.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Request</strong></th>\n<th><strong>Values</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>partner_tag</td>\n<td>Unique Partner Tag provided by Apollo. Eg: \"ABC\"</td>\n<td><strong><code>Required.</code></strong> <strong><code>String.</code></strong> This is a unique value assigned by Apollo to its partners to identify and allow them to create and store loans in Apollo's system</td>\n</tr>\n<tr>\n<td>loan_type</td>\n<td>PL/ML/CL/CL_2/EDI</td>\n<td><strong><code>Required.</code></strong> <strong><code>String.</code></strong> This is the type of loan mentioned at the time of loan creation for that particular loan. <strong>PL</strong>- Personal Loan, <strong>ML</strong>- Micro Loan, <strong>CL</strong>- Consumer Loan, <strong>EDI</strong> - Daily Installments</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"allowed-changes-and-loan-stages\"><strong>Allowed Changes and Loan Stages</strong></h2>\n<p>The below fields can be updated by the partner using the Loan Update API. The update can be done only to the loans in <strong>Document Check Pending Stage</strong>. This action won't be allowed to perform if the loan is in any other stage.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Request</strong></th>\n<th><strong>Values</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>disbursement_date</td>\n<td>The new disbursement date needs to be updated. DD/MM/YYYY, Eg: \"12/03/2023\"</td>\n<td><strong><code>Required.</code></strong> <strong><code>String.</code></strong> The disbursement date is when the actual transaction will take place.</td>\n</tr>\n<tr>\n<td>first_emi_date/first_installment_date</td>\n<td>This will be the new First EMI/Installment Date that needs to be updated and based on the disbursement date. DD/MM/YYYY, Eg: \"12/03/2023\"</td>\n<td><strong><code>Required.</code></strong> <strong><code>String.</code></strong> The First EMI/Installment Date is when the first repayment date is due. If its a PL/ML loan type then There should be a minimum of 25-30 days difference between the Disbursement Date and the First EMI Date and the Loan Tenure should match this new tenure.</td>\n</tr>\n<tr>\n<td>loan_tenure_in_days</td>\n<td>Loan tenure in the number of days. Eg: \"90\"</td>\n<td><strong><code>Optional.</code></strong> <strong><code>String.</code></strong> This would be <strong>applicable only when Loan Type is ML</strong></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-for-pl-loan-type\"><strong>Request body for PL loan type:</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"partner_tag\": \"apollo assigned partner tag\",\n    \"loan_type\": \"loan type\",\n    \"loan_information\": {\n        \"disbursement_date\": \"Updated disbursement date\",\n        \"first_emi_date\": \"first_emi_date will be same as pushed earlier\"\n    }\n}\n\n</code></pre>\n<h3 id=\"request-body-for-ml-loan-type\"><strong>Request body for ML loan type:</strong></h3>\n<h4 id=\"if-there-is-no-change-in-loan-tenure-in-days\">If there is no change in loan tenure in days:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"partner_tag\": \"apollo assigned partner tag\",\n    \"loan_type\": \"loan type\",\n    \"loan_information\": {\n        \"disbursement_date\": \"Updated disbursement date\",\n        \"first_emi_date\": \"first_emi_date will be revised as per DOD + no. of days of tenure\",\n        \"loan_tenure_in_days\": \"Loan tenure in days\"\n    }}\n\n</code></pre>\n<h4 id=\"if-there-is-a-change-in-loan-tenure-in-days\">If there is a change in loan tenure in days:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"partner_tag\": \"apollo assigned partner tag\",\n    \"loan_type\": \"loan type\",\n    \"loan_information\": {\n        \"disbursement_date\": \"Updated disbursement date\",\n        \"first_emi_date\": \"first_emi_date will be revised as per DOD + no. of days of tenure\",\n        \"loan_tenure_in_days\": \"Loan tenure in days\",\n        \"partner_computed_emi_amount\": \"Updated Emi amount\",\n        \"partner_computed_interest_amount\": \"Updated Interest amount\"    \n     }\n}\n\n</code></pre>\n<h3 id=\"request-body-for-edi-loan-type\"><strong>Request body for EDI loan type:</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"partner_tag\": \"apollo assigned partner tag\",\n    \"loan_type\": \"loan type\",\n    \"loan_information\": {\n        \"disbursement_date\": \"Updated disbursement date\",\n        \"first_installment_date\": \"first_installment_date will be same as pushed earlier\"\n    }\n}\n\n</code></pre>\n<h2 id=\"sample-response\"><strong>Sample Response:</strong></h2>\n<p><strong>If a loan was successfully updated in Apollo's system, the following response will be provided;</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \n  \"message\": \"loan updated successfully\" \n} \n\n</code></pre>\n<p><strong>If the loan is not updated in Apollo's system;</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \n  \"message\": \"loan cannot be updated after xyz date and time\"\n}\n\n</code></pre>\n<p><strong>If the newly updated first_emi_date doesn't match the loan tenure;</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"message\": \"first_emi_date &amp; loan_tenure_in_days do not match\"\n\n</code></pre>\n<p>*<em>If the newly updated disbursement_date, first_emi_date, and tenure is not given in days;__*</em></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"message\": \"provide disbursement_date, first_emi_date and loan_tenure_in_days\"\n\n</code></pre>\n<h2 id=\"response-status-codes\"><strong>Response Status Codes:</strong></h2>\n<hr>\n<p>These are the common error codes pushed by the API in case of any errors</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Error code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>200</strong></td>\n<td>Successful Request</td>\n</tr>\n<tr>\n<td><strong>400</strong></td>\n<td>Invalid Request</td>\n</tr>\n<tr>\n<td><strong>401</strong></td>\n<td>Unauthorized (The incoming token has expired)</td>\n</tr>\n<tr>\n<td><strong>403</strong></td>\n<td>Forbidden (x-API-key is wrong or partner is not allowed to use this API)</td>\n</tr>\n<tr>\n<td><strong>404</strong></td>\n<td>Not Found (No such loan exists)</td>\n</tr>\n<tr>\n<td><strong>500</strong></td>\n<td>Internal Server Error (Rare)</td>\n</tr>\n<tr>\n<td><strong>504 bad gateway</strong></td>\n<td>The server is down. Please inform immediately to tech POC. You can retry within a few seconds.</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"rate-limit\"><strong>Rate Limit</strong></h1>\n<hr>\n<h3 id=\"throttling\"><strong>Throttling</strong></h3>\n<p>:10000 requests per second.</p>\n<h3 id=\"quota\"><strong>Quota</strong></h3>\n<p>: Unlimited total number of API calls</p>\n<h1 id=\"sla-breakdown\"><strong>SLA breakdown</strong></h1>\n<hr>\n<ul>\n<li><strong>Standard Support</strong></li>\n</ul>\n<p>Apollo will provide standard technical support twenty-four (24) hours per day, five (5) days per week, excluding weekends and national Indian holidays. Standard Support will be offered via email.</p>\n<ul>\n<li><strong>Uptime Commitment</strong></li>\n</ul>\n<p>Uptime is the percentage of total possible minutes API was available during a fiscal year. Our commitment is to maintain at least 99.99% uptime</p>\n<ul>\n<li><strong>Scheduled Downtime</strong></li>\n</ul>\n<p>Sometimes we need to perform maintenance to keep API working smoothly. If scheduled downtime is necessary, we’ll give you at least 48 hours advance notice. In a year, scheduled downtime won’t exceed 12 hours.</p>\n<h1 id=\"updates\"><strong>Updates</strong></h1>\n<p>As our business evolves, we may change our service level agreement. Customers can review the most current version of the service level agreement at any time by visiting this page.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Rate Limit","slug":"rate-limit"},{"content":"SLA breakdown","slug":"sla-breakdown"},{"content":"Updates","slug":"updates"}],"owner":"16291369","collectionId":"d2a163f6-70dc-4588-a01b-a6b517efd3d7","publishedId":"UVsLR6bW","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-03-15T10:50:01.000Z"},"item":[{"name":"Loan Update API","id":"51b76469-523c-40bd-ac2c-bbb8c4b1b423","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PATCH","header":[{"key":"Authorization","value":"*********","type":"text"},{"warning":"This is a duplicate header and will be overridden by the x-api-key header generated by Postman.","key":"x-api-key","value":"*********","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"partner_tag\": \"apollo assigned partner tag\",\n    \"loan_type\": \"loan type\",\n    \"loan_information\": {\n        \"disbursement_date\": \"Updated disbursement date\",\n        \"first_emi_date\": \"first_emi_date will be revised as per DOD + no. of days of tenure\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://{servername.com}/{env}/{version}/loan/{id}","urlObject":{"protocol":"https","path":["{env}","{version}","loan","{id}"],"host":["{servername","com}"],"query":[],"variable":[]}},"response":[],"_postman_id":"51b76469-523c-40bd-ac2c-bbb8c4b1b423"},{"name":"Access token ","id":"0ffda34a-4be2-42f4-bce6-96b470dd9a75","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Basic *************","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"client_credentials","type":"text"},{"key":"scope","value":"","type":"text"}]},"url":"https://{name-api-app.auth.ap-server-name-2.{servercognito}.com/{auth2}/token","description":"<h2 id=\"this-api-is-for-generating-access-tokens-for-using-update-api\">This API is for generating access tokens for using Update API</h2>\n<ul>\n<li>The Token will expire in 5 minutes.</li>\n</ul>\n<p>Access Token can be generated by the below Python code.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>import requests\nimport base64\n \n \nurl = \"will be shared by apollo\"\n \nclient_id = \"will be shared by apollo\"\nclient_secret_id = \"will be shared by apollo\"\n \nbasic = base64.b64encode((client_id+':'+client_secret_id).encode())\n \npayload = 'grant_type=client_credentials&amp;scope='\nheaders = {\n    'Authorization': 'Basic '+basic.decode(),\n    'Content-Type': 'application/x-www-form-urlencoded',\n \n}\n \nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n \nprint(response.json())\n</code></pre>","urlObject":{"protocol":"https","path":["{auth2}","token"],"host":["{name-api-app","auth","ap-server-name-2","{servercognito}","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0ffda34a-4be2-42f4-bce6-96b470dd9a75"}]}