Developer Center

Lines of Credit API

Last Updated: Oct 24, 2017 06:13PM CEST

URL

GET /api/linesofcredit
GET /api/clients/{ID}/linesofcredit
GET /api/groups/{ID}/linesofcredit
GET /api/linesofcredit/{ID}/accounts
GET /api/linesofcredit/{ID}
POST /api/linesofcredit/{LOC IN JSON FORMAT}
POST /api/linesofcredit/{LOC_ID}/loans/{ACCOUNT_ID}
POST /api/linesofcredit/{LOC_ID}/savings/{ACCOUNT_ID}
POST /api/linesofcredit/{LOC_ID}/loans/{ACCOUNT_ID}
PATCH /api/linesofcredit/{LOC_ID}
DELETE /api/linesofcredit/{LOC_ID}/savings/{ACCOUNT_ID}

Description

Retrieve the lines of credit by a specific client or group, add and remove accounts from lines of credit

Methods

GET LinesOfCredit

Retrieve the associated lines of credit.

Usage examples

// get all lines of credit
GET /api/linesofcredit

// get all lines of credit, including custom fields
GET /api/linesofcredit?fullDetails=true

// get the lines of credit of the client 7759322
GET /api/clients/7759322/linesofcredit

// get the full detailed lines of credit of the client 7759322
GET /api/clients/7759322/linesofcredit?fullDetails=true

// get the lines of credit of the group 87345693
GET /api/groups/87345693/linesofcredit

// get the full detailed lines of credit of the group 87345693
GET /api/groups/87345693/linesofcredit?fullDetails=true

// get all the accounts of the line of credit 97322213
GET /api/linesofcredit/97322213/accounts

// get information about a specific line of credit
GET /api/linesofcredit/LOC99832

Samples responses:

// get all lines of credit [
   {
      "encodedKey":"8a8080c84c2d590b014c2d59e9e80001",
      "id":"WTF118",
      "groupKey":"8a8080c84c085ddf014c085e27a7032f",
      "startDate":"2016-03-18T00:00:00+0000",
      "expireDate":"2017-03-22T00:00:00+0000",
      "creationDate":"2015-03-18T14:46:49+0000",
      "lastModifiedDate":"2015-03-18T14:46:49+0000",
      "amount":"11111",
      "availableCreditAmount":"5000",
      "notes":""
   },
   {
      "encodedKey":"40288a7d4c2d441f014c2d45d2e70003",
      "id":"CAO277",
      "clientKey":"8a8080c84c085ddf014c085e1ecb00dd",
      "startDate":"2015-03-31T00:00:00+0000",
      "expireDate":"2015-04-02T00:00:00+0000",
      "creationDate":"2015-03-18T14:24:52+0000",
      "lastModifiedDate":"2015-03-18T14:24:52+0000",
      "amount":"1111",
      "availableCreditAmount":"200",
      "notes":""
   },
   {
      "encodedKey":"40288a7d4c2d441f014c2d4581fe0001",
      "id":"EPG351",
      "clientKey":"8a8080c84c085ddf014c085e1e9200d7",
      "startDate":"2015-03-23T00:00:00+0000",
      "expireDate":"2015-03-30T00:00:00+0000",
      "creationDate":"2015-03-18T14:24:32+0000",
      "lastModifiedDate":"2015-03-18T14:24:32+0000",
      "amount":"1111",
      "availableCreditAmount":"400",
      "notes":""
   }
]

// get all lines of credit including custom fields [  
   {  
      "encodedKey":"402880b858d95c8e0158d95f0379048a",
      "id":"QCE677",
      "clientKey":"402880b858d95c8e0158d95ce07b00f3",
      "startDate":"2016-12-01T00:00:00+0000",
      "expireDate":"2016-12-30T00:00:00+0000",
      "creationDate":"2016-12-07T13:01:36+0000",
      "lastModifiedDate":"2016-12-07T13:01:36+0000",
      "state":"ACTIVE",
      "amount":"1000",
      "notes":"",
      "availableCreditAmount":"1000",
      "customInformation":[  
         {  
            "encodedKey":"402880b858d95c8e0158d95f0379048b",
            "parentKey":"402880b858d95c8e0158d95f0379048a",
            "customFieldKey":"402880b858d95c8e0158d95dd4a40484",
            "customField":{  
               "encodedKey":"402880b858d95c8e0158d95dd4a40484",
               "id":"loccf2",
               "creationDate":"2016-12-07T13:00:01+0000",
               "lastModifiedDate":"2016-12-07T13:00:01+0000",
               "name":"LoC CF Req",
               "type":"LINE_OF_CREDIT",
               "dataType":"STRING",
               "valueLength":"SHORT",
               "isDefault":true,
               "isRequired":true,
               "description":"",
               "customFieldSet":{  
                  "encodedKey":"402880b858d95c8e0158d95cfe4b0480",
                  "name":"LoC CF Set",
                  "notes":"",
                  "createdDate":"2016-12-07T12:58:39+0000",
                  "indexInList":0,
                  "type":"LINE_OF_CREDIT",
                  "usage":"SINGLE"
               },
               "indexInList":1,
               "state":"NORMAL",
               "customFieldSelectionOptions":[  

               ],
               "viewRights":{  
                  "encodedKey":"402880b858d95c8e0158d95dd4a40485",
                  "isAccessibleByAllUsers":false,
                  "roles":[  

                  ]
               },
               "editRights":{  
                  "encodedKey":"402880b858d95c8e0158d95dd4a40486",
                  "isAccessibleByAllUsers":false,
                  "roles":[  

                  ]
               },
               "unique":false,
               "values":[  

               ],
               "amounts":{  

               }
            },
            "value":"asd",
            "indexInList":-1,
            "customFieldID":"loccf2",
            "customFieldSetGroupIndex":-1
         },
         {  
            "encodedKey":"402880b858d95c8e0158d95f0379048c",
            "parentKey":"402880b858d95c8e0158d95f0379048a",
            "customFieldKey":"402880b858d95c8e0158d95cfe4b0481",
            "customField":{  
               "encodedKey":"402880b858d95c8e0158d95cfe4b0481",
               "id":"loccf1",
               "creationDate":"2016-12-07T12:59:15+0000",
               "lastModifiedDate":"2016-12-07T14:48:17+0000",
               "name":"LoC CF",
               "type":"LINE_OF_CREDIT",
               "dataType":"STRING",
               "valueLength":"SHORT",
               "isDefault":false,
               "isRequired":false,
               "description":"",
               "customFieldSet":{  
                  "encodedKey":"402880b858d95c8e0158d95cfe4b0480",
                  "name":"LoC CF Set",
                  "notes":"",
                  "createdDate":"2016-12-07T12:58:39+0000",
                  "indexInList":0,
                  "type":"LINE_OF_CREDIT",
                  "usage":"SINGLE"
               },
               "indexInList":0,
               "state":"NORMAL",
               "customFieldSelectionOptions":[  

               ],
               "viewRights":{  
                  "encodedKey":"402880b858d95c8e0158d95cfe4b0482",
                  "isAccessibleByAllUsers":true,
                  "roles":[  

                  ]
               },
               "editRights":{  
                  "encodedKey":"402880b858d95c8e0158d95dd4a40483",
                  "isAccessibleByAllUsers":true,
                  "roles":[  

                  ]
               },
               "unique":false,
               "values":[  

               ],
               "amounts":{  

               }
            },
            "value":"123",
            "indexInList":-1,
            "customFieldID":"loccf1",
            "customFieldSetGroupIndex":-1
         },
         {  
            "encodedKey":"402880b858d95c8e0158d95ffb37048d",
            "parentKey":"402880b858d95c8e0158d95f0379048a",
            "customFieldKey":"402880b858d95c8e0158d95dd4a40487",
            "customField":{  
               "encodedKey":"402880b858d95c8e0158d95dd4a40487",
               "id":"loccf3",
               "creationDate":"2016-12-07T13:00:33+0000",
               "lastModifiedDate":"2016-12-07T14:50:51+0000",
               "name":"LoC CF Role View",
               "type":"LINE_OF_CREDIT",
               "dataType":"STRING",
               "valueLength":"SHORT",
               "isDefault":true,
               "isRequired":false,
               "description":"",
               "customFieldSet":{  
                  "encodedKey":"402880b858d95c8e0158d95cfe4b0480",
                  "name":"LoC CF Set",
                  "notes":"",
                  "createdDate":"2016-12-07T12:58:39+0000",
                  "indexInList":0,
                  "type":"LINE_OF_CREDIT",
                  "usage":"SINGLE"
               },
               "indexInList":2,
               "state":"NORMAL",
               "customFieldSelectionOptions":[  

               ],
               "viewRights":{  
                  "encodedKey":"402880b858d95c8e0158d95f03790488",
                  "isAccessibleByAllUsers":true,
                  "roles":[  

                  ]
               },
               "editRights":{  
                  "encodedKey":"402880b858d95c8e0158d95f03790489",
                  "isAccessibleByAllUsers":false,
                  "roles":[  

                  ]
               },
               "unique":false,
               "values":[  

               ],
               "amounts":{  

               }
            },
            "value":"role",
            "indexInList":-1,
            "customFieldID":"loccf3",
            "customFieldSetGroupIndex":-1
         }
      ]
   }
]

// get all account in the Line of Credit KKC015
    {
   "loanAccounts":[
      {
         "encodedKey":"8a848e414c915815014c9331a6a00790",
         "id":"TBLJ925",
         "accountHolderKey":"8a0a9ce64b8fd2dc014b91a984ee0537",
         "accountHolderType":"CLIENT",
         "creationDate":"2015-04-07T09:24:07+0000",
         "approvedDate":"2015-04-07T09:26:06+0000",
         "lastModifiedDate":"2015-07-07T00:01:41+0000",
         "disbursementDate":"2015-04-07T00:00:00+0000",
         "activationTransactionKey":"8a848e414c915815014c9334fac207c3",
         "expectedDisbursementDate":"2015-04-07T00:00:00+0000",
         "lastSetToArrearsDate":"2015-05-08T00:00:00+0000",
         "lastAccountAppraisalDate":"2015-07-28T00:01:59+0000",
         "accountState":"ACTIVE_IN_ARREARS",
         "productTypeKey":"8a6c1f544b5c4853014b5f27174207b4",
         "lineOfCreditKey":"8a848e414c915815014c9330d60e078e",
         "loanName":"30 e 360",
         "loanAmount":"2000",
         "periodicPayment":"0",
         "tranches":[

         ],
         "principalDue":"500.01",
         "principalPaid":"0",
         "principalBalance":"2000",
         "interestDue":"1800",
         "interestPaid":"0",
         "interestBalance":"1800",
         "feesDue":"0",
         "feesPaid":"0",
         "feesBalance":"0",
         "penaltyDue":"0",
         "penaltyPaid":"0",
         "penaltyBalance":"0",
         "scheduleDueDatesMethod":"INTERVAL",
         "hasCustomSchedule":false,
         "repaymentPeriodCount":1,
         "repaymentPeriodUnit":"MONTHS",
         "repaymentInstallments":12,
         "gracePeriod":0,
         "gracePeriodType":"NONE",
         "interestRate":"1",
         "interestChargeFrequency":"EVERY_DAY",
         "interestCalculationMethod":"DECLINING_BALANCE",
         "repaymentScheduleMethod":"DYNAMIC",
         "paymentMethod":"HORIZONTAL",
         "interestApplicationMethod":"ON_REPAYMENT",
         "assignedBranchKey":"8a6c03af4402350f0144038d126101e1",
         "notes":"",
         "principalRepaymentInterval":1,
         "interestRateSource":"FIXED_INTEREST_RATE",
         "accruedInterest":"420",
         "lastInterestAppliedDate":"2015-07-07T00:00:00+0000",
         "accruedPenalty":"0",
         "loanPenaltyCalculationMethod":"NONE"
      }
   ],
   "savingsAccounts":[

   ]
}

POST LinesOfCredit

Creates a line of credit

Usage examples

// create a line of credit for a client
POST {
    "lineOfCredit":{
        "clientKey": "8a808082559720d001559721415400ee",
        "startDate": "2016-06-01T00:00:00+0000",
        "expireDate": "2016-06-30T00:00:00+0000",
        "amount": "10000",
        "notes": "some line of credit notes"
        }
} /api/linesofcredit

// create a line of credit for a group
POST {  
   "lineOfCredit":{  
      "groupKey":"8a808082559720d001559721415411aa",
      "startDate":"2016-06-01T00:00:00+0000",
      "expireDate":"2016-06-30T00:00:00+0000",
      "amount":"10000",
      "notes":"some line of credit notes"
   }
} /api/linesofcredit

// create a line of credit with custom information
POST {  
   "lineOfCredit":{  
      "id":"FEP015",
      "clientKey":"4028808a58d348710158d3490d0500f1",
      "startDate":"2016-06-01T00:00:00+0000",
      "expireDate":"2016-06-30T00:00:00+0000",
      "amount":"10000",
      "notes":"some line of credit notes",
      "customInformation":[  
         {  
            "value":"Pending",
            "customFieldID":"cf1"
         },
         {  
            "value":"3",
            "customFieldID":"cf2"
         }
      ]
   }
} /api/linesofcredit
Associates an account with a line of credit.

Usage examples


// assign a loan account to a line of credit
POST /api/linesofcredit/LINR836/loans/LOAN019

// assign a savings account to a line of credit
POST /api/linesofcredit/LINR999/savings/SAV019

POST Search

Allows to retrieve lines of credit using dynamic custom filters.

Parameters

Parameter Value
filterConstraints A JSON array of constraints.
filterSelection The field on which the constraint will be applied. Available loan account filter selections can be found bellow.
filterElement The constraint operator. Available filter elements can be found bellow.
value The constraint value. Required for filter elements with one or two values.
secondValue The constraint second value. Required for filter elements with two values.
dataItemType The entity where the field on which to apply the constraint is located. If the field is located in the same entity with the entity being searched, this field is optional.

Available lines of credit filter values

Filter Selection Parameter Data Type
ENCODED_KEY STRING
ID STRING
START_DATE DATE
END_DATE DATE
APPROVAL_DATE DATE
STATE ENUM
SUBSTATE ENUM

Available filter elements

Filter Element Number Of affected values Available for
EQUALS ONE_VALUE BIG_DECIMAL,BOOLEAN,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY
MORE_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
LESS_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
BETWEEN TWO_VALUES BIG_DECIMAL,NUMBER,MONEY,DATE,DATE_UTC
ON ONE_VALUE DATE,DATE_UTC
AFTER ONE_VALUE DATE,DATE_UTC
BEFORE ONE_VALUE DATE,DATE_UTC
STARTS_WITH ONE_VALUE STRING
IN LIST ENUM,KEY
TODAY NO_VALUE DATE,DATE_UTC
THIS_WEEK NO_VALUE DATE,DATE_UTC
THIS_MONTH NO_VALUE DATE,DATE_UTC
THIS_YEAR NO_VALUE DATE,DATE_UTC
LAST_DAYS ONE_VALUE DATE,DATE_UTC
EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC
NOT_EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC

Usage examples

// get all closed lines of credit
POST /api/linesofcredit/search
{
   "filterConstraints":[
      {
         "filterSelection":"STATE",
         "filterElement":"IN",
         "values":[
            "CLOSED"
         ]
      }
   ]
}

// get all lines of credit that are in a specific sub state
POST /api/linesofcredit/search
{
   "filterConstraints":[
      {
         "filterSelection":"SUBSTATE",
         "filterElement":"IN",
         "values":[
            "WITHDRAWN",
            "REJECTED"
         ]
      }
   ]
}

// get all lines of credit approved this month 
POST /api/linesofcredit/search
{
   "filterConstraints":[
      {
         "filterSelection":"APPROVAL_DATE",
         "filterElement":"THIS_MONTH"
      }
   ]
}

Response

The lines of credit that match the search will be returned

PATCH LinesOfCredit

Edit a line of credit

Usage examples

// edit a line of credit
PATCH {
    "lineOfCredit":{
        "amount": "100",
        "id": "AB23",
        "startDate": "2013-06-01T00:00:00+0000",
        "expireDate": "2016-06-30T00:00:00+0000", 
        "notes": "some line of credit notes"
        }
} /api/linesofcredit/LOC45

Remove accounts from LinesOfCredit

Removes the association of an account with a line of credit.

Usage examples

// remove a loan account from a line of credit
DELETE /api/linesofcredit/LINR836/loans/LOAN019

// remove a savings account from a line of credit
DELETE /api/linesofcredit/LINR836/savings/SAVINGS019
support@mambu.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete