From d39047e36e33cfd6b079d399b6977410c8c7a655 Mon Sep 17 00:00:00 2001 From: Vishwas Babu AJ Date: Sun, 31 Mar 2013 00:44:05 +0530 Subject: [PATCH] api documentation for loan collaterals --- api-docs/apiLive.htm | 326 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 326 insertions(+) diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index dac8e30e2..7102c41b4 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -488,6 +488,24 @@ Update a Guarantor Delete a Guarantor + + Loan Collateral + loans/{loanId}/collaterals + Create a Collateral + + List collaterals + + + + + + + loans/{loanId}/collaterals/{collateralId} + + Retrieve a Collateral + Update a Collateral + Delete a Collateral + @@ -4807,6 +4825,296 @@ No Request Body: + +   +
+
+

Loan Collateral

+

In lending agreements, collateral is a borrower's pledge of specific property to a lender, + to secure repayment of a loan. The collateral serves as protection for a lender against a + borrower's default - that is, any borrower failing to pay the principal and interest under + the terms of a loan obligation. If a borrower does default on a loan (due to insolvency + or other event), that borrower forfeits (gives up) the property pledged as collateral + - and the lender then becomes the owner of the collateral +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Descriptions
type
Identifies the type of a collateral
+ Ex: Gold, property etc (permitted types can be configured using + Code Values for + the Code LoanCollateral)
+ Refer Retrieve + Collateral Details Template for complete + details +
value
The market value of a Collateral. +
description
Description for the collateral +
currency
Details of the currency used + to estimate the value of a Collateral. + The currency defaults to the currency of the + Loan for which this Collateral serves as a + guarantee +
+
+
+ +   +
+
+

List Loan Collaterals

+

Example Requests:

+
loans/1/collaterals
+
+
+
loans/1/collaterals?fields=value,description
+
+
+ +GET https://DomainName/api/v1/loans/{loanId}/collaterals + + +[ + { + "id": 12, + "type": { + "id": 8, + "name": "Gold" + }, + "value": 50000, + "description": "24 Carat Gold chain weighing 12 grams", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } +] + +
+
+ +   +
+
+

Retrieve Collateral Details Template

+

This is a convenience resource. It can be useful when + building maintenance user interface screens for client + applications. The template data returned consists of any or all + of: +

    +
  • Field Defaults
  • +
  • Allowed Value Lists
  • +
+

+

Example Request:

+
loans/1/collaterals/template
+
+
+ +GET https://DomainName/api/v1/loans/{loanId}/collaterals/template + + +{ + "allowedCollateralTypes": [ + { + "id": 9, + "name": "Silver", + "position": 0 + }, + { + "id": 8, + "name": "Gold", + "position": 0 + }, + { + "id": 10, + "name": "Property", + "position": 0 + } + ] +} + +
+
+ +   +
+
+

Retrieve a Collateral

+

Example Requests:

+
/loans/1/collaterals/1
+
+
+
/loans/1/collaterals/1?fields=value,description
+
+
+ +GET https://DomainName/api/v1/loans/{loanId}/collaterals/{guarantorId} + + +{ + "id": 12, + "type": { + "id": 8, + "name": "Gold" + }, + "value": 50000, + "description": "24 Carat Gold chain weighing 12 grams", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } +} +
+
+ +   +
+
+

Create a Collateral

+

+ Note: Currently, Collaterals may be added only before a Loan + is approved
+

+ + + + + + + +
Mandatory Fields + for "internal" collaterals
collateralTypeId
+
+
+ +POST https://DomainName/api/v1//loans/{loanId}/collaterals + + +POST /loans/1/collaterals +Content-Type: application/json +Request Body: +{ + collateralTypeId:9, +} + + +{ + "loanId": 1, + "resourceId": 12 +} + + +POST /loans/1/collaterals +Content-Type: application/json +Request Body: +{ + "collateralTypeId":"8", + "value": "50000", + "dateFormat":"dd MMMM yyyy", + "locale": "en", + "description": "24 Carat Gold chain weighing 12 grams" +} + + +{ + "loanId": 1, + "resourceId": 13 +} + +
+
+ +   +
+
+

Update a Collateral

+
+
+ +PUT https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId} + + +PUT loans/1/collaterals/12 +Content-Type: application/json +Request Body: +{ +"description": "22 Carat Gold chain weighing 12 grams" +} + + +{ + "loanId": 1, + "resourceId": 12, + "changes": { + "description": "22 Carat Gold chain weighing 12 grams" + } +} + +
+
+ +   +
+
+

Remove a Collateral

+

+ Note: A collateral can only be removed from Loans that are not yet approved. +

+
+
+ +DELETE https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId} + + +DELETE loans/1/collaterals/13 +Content-Type: application/json +No Request Body: + + +{ + "loanId": 1, + "resourceId": 13 +} + +
+
  @@ -11443,6 +11751,24 @@ Content-Type: application/json Update a Guarantor Delete a Guarantor + + Loan Collateral + loans/{loanId}/collaterals + Create a Collateral + + List collaterals + + + + + + + loans/{loanId}/collaterals/{collateralId} + + Retrieve a Collateral + Update a Collateral + Delete a Collateral + Savings Product savingsproducts