{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"d2a163f6-70dc-4588-a01b-a6b517efd3d7","name":"Apollo Finvest: Loan Update API (PL/ML/EDI)","description":"## **Overview**\n\nLoan 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.\n\n## Authentication/Authorisation:\n\n---\n\n`x-API-key` and access token should be sent in request headers for authenticating the request. Apollo will provide `x-API-key`. 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.\n\nPlease refer to the API collection to understand more...\n\n``` python\nimport 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&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```\n\n---\n\n## **Required Query Parameters:**\n\n---\n\n| **Params** | **Values** | **Description** |\n| --- | --- | --- |\n| loan_id | The Loan Id was created by the partner at the time of loan creation. Eg: \"Tesst001\" | **`Required.`** **`String.`** This is the unique value created and maintained by the partner at the time of pushing the loan to Apollo's system |\n\n## **Required Request Body:**\n\n---\n\nWe 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 **`3 days`** 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.\n\n| **Request** | **Values** | **Description** |\n| --- | --- | --- |\n| partner_tag | Unique Partner Tag provided by Apollo. Eg: \"ABC\" | **`Required.`** **`String.`** 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 |\n| loan_type | PL/ML/CL/CL_2/EDI | **`Required.`** **`String.`** This is the type of loan mentioned at the time of loan creation for that particular loan. **PL**\\- Personal Loan, **ML**\\- Micro Loan, **CL**\\- Consumer Loan, **EDI** - Daily Installments |\n\n## **Allowed Changes and Loan Stages**\n\nThe below fields can be updated by the partner using the Loan Update API. The update can be done only to the loans in **Document Check Pending Stage**. This action won't be allowed to perform if the loan is in any other stage.\n\n| **Request** | **Values** | **Description** |\n| --- | --- | --- |\n| disbursement_date | The new disbursement date needs to be updated. DD/MM/YYYY, Eg: \"12/03/2023\" | **`Required.`** **`String.`** The disbursement date is when the actual transaction will take place. |\n| first_emi_date/first_installment_date | 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\" | **`Required.`** **`String.`** 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. |\n| loan_tenure_in_days | Loan tenure in the number of days. Eg: \"90\" | **`Optional.`** **`String.`** This would be **applicable only when Loan Type is ML** |\n\n### **Request body for PL loan type:**\n\n``` json\n{\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```\n\n### **Request body for ML loan type:**\n\n#### If there is no change in loan tenure in days:\n\n``` json\n{\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```\n\n#### If there is a change in loan tenure in days:\n\n``` json\n{\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```\n\n### **Request body for EDI loan type:**\n\n``` json\n{\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```\n\n## **Sample Response:**\n\n**If a loan was successfully updated in Apollo's system, the following response will be provided;**\n\n``` json\n{ \n  \"message\": \"loan updated successfully\" \n} \n\n```\n\n**If the loan is not updated in Apollo's system;**\n\n``` json\n{ \n  \"message\": \"loan cannot be updated after xyz date and time\"\n}\n\n```\n\n**If the newly updated first_emi_date doesn't match the loan tenure;**\n\n``` json\n\"message\": \"first_emi_date & loan_tenure_in_days do not match\"\n\n```\n\n\\*_If the newly updated disbursement_date, first_emi_date, and tenure is not given in days;__\\*_\n\n``` json\n\"message\": \"provide disbursement_date, first_emi_date and loan_tenure_in_days\"\n\n```\n\n## **Response Status Codes:**\n\n---\n\nThese are the common error codes pushed by the API in case of any errors\n\n| **Error code** | **Description** |\n| --- | --- |\n| **200** | Successful Request |\n| **400** | Invalid Request |\n| **401** | Unauthorized (The incoming token has expired) |\n| **403** | Forbidden (x-API-key is wrong or partner is not allowed to use this API) |\n| **404** | Not Found (No such loan exists) |\n| **500** | Internal Server Error (Rare) |\n| **504 bad gateway** | The server is down. Please inform immediately to tech POC. You can retry within a few seconds. |\n\n# **Rate Limit**\n\n---\n\n### **Throttling**\n\n:10000 requests per second.\n\n### **Quota**\n\n: Unlimited total number of API calls\n\n# **SLA breakdown**\n\n---\n\n- **Standard Support**\n    \n\nApollo 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.\n\n- **Uptime Commitment**\n    \n\nUptime is the percentage of total possible minutes API was available during a fiscal year. Our commitment is to maintain at least 99.99% uptime\n\n- **Scheduled Downtime**\n    \n\nSometimes 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.\n\n# **Updates**\n\nAs 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.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"16291369","team":1156724,"collectionId":"d2a163f6-70dc-4588-a01b-a6b517efd3d7","publishedId":"UVsLR6bW","public":true,"publicUrl":"https://documenter-api.postman.tech/view/16291369/UVsLR6bW","privateUrl":"https://go.postman.co/documentation/16291369-d2a163f6-70dc-4588-a01b-a6b517efd3d7","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.6","publishDate":"2022-03-15T10:50:01.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/87e241c84e614759761cb3ee48d6e0fc0a0562472ca2ed15e13f486c3b809bf6","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/UVsLR6bW"}