Developer Center

On-The-Fly Filtering API

Last Updated: Oct 04, 2018 08:42AM CEST

URL

POST /api/clients/search
POST /api/groups/search
POST /api/loans/search
POST /api/loans/transactions/search
POST /api/savings/search
POST /api/savings/transactions/search
POST /api/notifications/messages/search
POST /api/gljournalentries/search
POST /api/linesofcredit/search

Description

Allows to retrieve information using dynamic custom filters.

Methods

POST

Parameters

Search parameters
Parameter Value
filterConstraints A JSON array of constraints.
Filter Constraint object possible values:
Parameter Value
filterSelection The field on which the constraint will be applied. For custom fields the custom field encoded key must be provided.
filterElement The constraint operator. Available filter elements can be found below.
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. Possible values:
  • CLIENT - can be used for client/loans/savings/transactions endpoints
  • GROUP - can be used for group/loans/savings/transactions endpoints
  • LOANS - can be used for loans/transactions endpoints
  • TRANCHE - can be used for loans endpoint
  • DISBURSEMENT_DETAILS - can be used for loans/transactions endpoints
  • SAVINGS - can be used savings/transactions endpoints
  • TRANSACTION - cab be used for transactions/gljournalentries endpoint
  • JOURNAL_ENTRY - cab be used for gljournalentries endpoint
  • NOTIFICATION_MESSAGE - can be used only for notification messages
dataFieldType NATIVE(default)/CUSTOM for custom field searches
Ordering parameters (section "sortDetails")
Parameter Value
sortingColumn The name of the column on which the order is going to take place
sortingOrder ASCENDING or DESCENDING
The list of possible entity filter selections:

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 NUMBER
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

CLIENT

Filter Selection Parameter Data Type
CREDIT_OFFICER_KEY KEY
CLIENT_ROLE_KEY KEY
BRANCH_KEY KEY
CENTRE_KEY KEY
GROUP_KEY KEY
ENCODED_KEY KEY
FULL_NAME STRING
FIRST_NAME STRING
MIDDLE_NAME STRING
LAST_NAME STRING
CREATION_DATE DATE_UTC
LAST_MODIFIED_DATE DATE_UTC
ID STRING
DEPOSITS_BALANCE MONEY
LOANS_BALANCE MONEY
PENDING_LOAN_AMOUNT MONEY
APPROVED_LOAN_AMOUNT MONEY
TOTAL_BALANCE MONEY
TOTAL_DUE MONEY
HOME_PHONE_NUMBER STRING
MOBILE_PHONE_NUMBER STRING
EMAIL_ADDRESS STRING
CLIENT_ADDRESS STRING
BIRTHDATE DATE
GENDER ENUM
LOAN_CYCLE NUMBER
GROUP_LOAN_CYCLE NUMBER
CLIENT_STATE ENUM
PORTAL_STATE ENUM
PREFERRED_LANGUAGE ENUM
GROUP_ID STRING

GROUP

Filter Selection Parameter Data Type
CLIENT_ROLE_KEY KEY
BRANCH_KEY KEY
CENTRE_KEY KEY
CREDIT_OFFICER_KEY KEY
ENCODED_KEY KEY
GROUP_NAME STRING
CREATION_DATE DATE_UTC
LAST_MODIFIED_DATE DATE_UTC
ID STRING
PREFERRED_LANGUAGE ENUM
DEPOSITS_BALANCE MONEY
LOANS_BALANCE MONEY
TOTAL_BALANCE MONEY
NUMBER_OF_MEMBERS NUMBER
LOAN_CYCLE NUMBER

LOAN

Filter Selection Parameter Data Type
ACCOUNT_HOLDER_KEY KEY
PRODUCT_KEY KEY
LOAN_RISK_LEVEL_KEY KEY
ENCODED_KEY KEY
LOAN_NAME STRING
ACCOUNT_ID STRING
ACCOUNT_HOLDER_ID STRING
RECIPIENT STRING
CREATION_DATE DATE_UTC
APPROVAL_DATE DATE
LAST_MODIFIED_DATE DATE_UTC
LAST_SET_TO_ARREARS_DATE DATE
LAST_LOCKED_DATE DATE
CLOSED_DATE DATE
DAYS_IN_ARREARS NUMBER
DAYS_LATE NUMBER
ACCOUNT_SUB_STATE ENUM
ACCOUNT_STATE ENUM
LOAN_AMOUNT MONEY
DISBURSED_TRANCHES_AMOUNT MONEY
NUM_INSTALLMENTS NUMBER
PRINCIPAL_DUE MONEY
PRINCIPAL_PAID MONEY
PRINCIPAL_BALANCE MONEY
INTEREST_DUE MONEY
INTEREST_PAID MONEY
INTEREST_BALANCE MONEY
INTEREST_ACCRUED MONEY
FEES_DUE MONEY
FEES_BALANCE MONEY
FEES_PAID MONEY
PENALTY_CALCULATION_METHOD ENUM
PENALTY_DUE MONEY
PENALTY_PAID MONEY
PENALTY_BALANCE MONEY
PENALTY_ACCRUED MONEY
PENALTY_RATE BIG_DECIMAL
ARREARS_TOLERANCE_PERIOD NUMBER
INTEREST_RATE BIG_DECIMAL
INTEREST_SPREAD BIG_DECIMAL
TOTAL_PAID MONEY
TOTAL_BALANCE MONEY
TOTAL_DUE MONEY
FIRST_REPAYMENT_DATE DATE
LAST_PAYMENT_DATE DATE
LAST_PAYMENT_AMOUNT MONEY
EXPECTED_MATURITY_DATE DATE
RESCHEDULED_ACCOUNT_ID STRING
REFINANCED_ACCOUNT_ID STRING
ORIGINAL_ACCOUNT_ID STRING
TAX_RATE BIG_DECIMAL
TAX_PAID MONEY
TAX_DUE MONEY
HAS_SETTLEMENT_ACCOUNT BOOLEAN
INTEREST_COMMISSION BIG_DECIMAL
FUNDS_AMOUNT MONEY
FUNDING_PERCENTAGE BIG_DECIMAL
NUMBER_OF_FUNDS NUMBER
FUNDS_ENABLED BOOLEAN
AVAILABLE_AMOUNT MONEY
WAS_RESCHEDULED BOOLEAN
WAS_REFINANCED BOOLEAN
PREPAYMENTS_RECALCULATION ENUM
APPLY_INTEREST_ON_PREPAYMENT_METHOD ENUM
LATE_PAYMENT_RECALCULATION_METHOD ENUM
REDRAW_BALANCE MONEY
EXPECTED_PRINCIPAL_REDRAW MONEY

TRANCHE

Filter Selection Parameter Data Type
ENCODED_KEY KEY
PARENT_ACCOUNT_KEY KEY
DISBURSEMENT_TRANSACTION_KEY KEY
AMOUNT MONEY
EXPECTED_DISRBUSEMENT_DATE DATE

DISBURSEMENT DETAILS

Filter Selection Parameter Data Type
EXPECTED_DISBURSEMENT_DATE DATE
DISBURSEMENT_DATE DATE

SAVINGS

Filter Selection Parameter Data Type
ACCOUNT_HOLDER_KEY KEY
PRODUCT_KEY KEY
CURRENCY_CODE KEY
OVERDRAFT_RISK_LEVEL_KEY KEY
ENCODED_KEY KEY
ACCOUNT_ID STRING
ACCOUNT_HOLDER_ID STRING
RECIPIENT STRING
CREATION_DATE DATE_UTC
APPROVAL_DATE DATE
ACTIVATION_DATE DATE
LAST_MODIFIED_DATE DATE_UTC
MATURITY_DATE DATE
CLOSED_DATE DATE
ACCOUNT_STATE ENUM
ACCOUNT_NAME STRING
RECOMENDED_DEPOSIT_AMOUNT MONEY
DEPOSIT_AMOUNT MONEY
MAX_WITHDRAWAL_AMOUNT MONEY
TARGET_AMOUNT MONEY
BALANCE MONEY
MAX_BALANCE MONEY
ACCRUED_INTEREST MONEY
INTEREST_RATE BIG_DECIMAL
OVERDRAFT_INTEREST_ACCRUED MONEY
OVERDRAFT_AMOUNT MONEY
OVERDRAFT_EXPIRY_DATE DATE
LAST_SET_TO_ARREARS_DATE DATE
OVERDRAFT_INTEREST_RATE BIG_DECIMAL
OVERDRAFT_INTEREST_SPREAD BIG_DECIMAL
OVERDRAFT_LIMIT MONEY
OVERDRAFT_AVAILABLE_LIMIT MONEY
OVERDRAFT_IN_ARREARS MONEY
OVERDRAFT_DAYS_IN_ARREARS NUMBER
INTEREST_DUE MONEY
FEES_DUE MONEY
LENGTH_IN_DAYS NUMBER
ACCOUNT_TYPE ENUM
CURRENT_INTEREST_TIER_INDEX NUMBER
CURRENT_INTEREST_TIER_STARTING_BALANCE MONEY
CURRENT_INTEREST_TIER_ENDING_BALANCE MONEY
CURRENT_INTEREST_TIER_RATE BIG_DECIMAL
CURRENT_OVERDRAFT_INTEREST_TIER_INDEX NUMBER
CURRENT_OVERDRAFT_INTEREST_TIER_STARTING_BALANCE MONEY
CURRENT_OVERDRAFT_INTEREST_TIER_ENDING_BALANCE MONEY
CURRENT_OVERDRAFT_INTEREST_TIER_RATE BIG_DECIMAL
TAX_APPLIED MONEY
TAX_RATE BIG_DECIMAL

TRANSACTION

Filter Selection Parameter Data Type
PARENT_ACCOUNT_KEY KEY
PRODUCT_TYPE_KEY KEY
USER_KEY KEY
BRANCH_KEY KEY
CENTRE_KEY KEY
PARENT_ACCOUNT_HOLDER_KEY KEY
CURRENCY_CODE KEY
PRODUCT_ID STRING
WAS_REVERSED BOOLEAN
TYPE_IS_REVERSAL BOOLEAN
INTERNAL_TRANSFER BOOLEAN
TRANSACTION_CHANNEL_KEY KEY
ENCODED_KEY KEY
TRANSACTION_ID LONG
TILL_ID STRING
ENTRY_DATE DATE
TRANSACTION_DATE DATE_UTC
EVENT ENUM
AMOUNT MONEY
ADVANCE_POSITION MONEY
ARREARS_POSITION MONEY
EXPECTED_PRINCIPAL_REDRAW MONEY
ORIGINAL_AMOUNT MONEY
ORIGINAL_AMOUNT_CURRENCY_CODE STRING
BALANCE (Deprecated. Use TOTAL_BALANCE) MONEY
TOTAL_BALANCE MONEY
PRINCIPAL_BALANCE MONEY
REDRAW_BALANCE MONEY
PRINCIPAL_PAID MONEY
INTEREST_PAID MONEY
DEFERRED_INTEREST MONEY
FEES_PAID MONEY
FEE_KEY KEY
FEE_TYPE ENUM
PENALTY_PAID MONEY
BRANCH STRING
CENTRE STRING
PARENT_ACCOUNT STRING
PARENT_ACCOUNT_ID STRING
PARENT_ACCOUNT_HOLDER STRING
PARENT_ACCOUNT_HOLDER_ID STRING
TAX_RATE BIG_DECIMAL
TAX_AMOUNT MONEY
INTEREST_RATE BIG_DECIMAL
PRINCIPAL_PAYMENT_FLAT_AMOUNT MONEY
PRINCIPAL_PAYMENT_PERCENTAGE BIG_DECIMAL
OVERDRAFT_INTEREST_RATE BIG_DECIMAL
OVERDRAFT_LIMIT MONEY

NOTIFICATIONMESSAGE

Filter Selection Parameter Data Type
SENDER_KEY KEY
RECIPIENT_CLIENT_KEY KEY
RECIPIENT_GROUP_KEY KEY
RECIPIENT_USER_KEY KEY
ENCODED_KEY KEY
CREATION_DATE DATE_UTC
SENT_DATE DATE_UTC
STATE ENUM
FAILURE_REASON ENUM
DESTINATION STRING
TYPE ENUM
EVENT ENUM

GLJOURNALENTRIES

Filter Selection Parameter Data Type
PRODUCT_TYPE ENUM
GL_ACCOUNT_KEY KEY
USER_KEY KEY
ENCODED_KEY STRING
ENTRY_ID NUMBER
DATE DATE
CREATION_DATE DATE
TRANSACTION_ID STRING
GL_ACCOUNT_ID STRING
GL_ACCOUNT_TYPE ENUM
SOURCE ENUM
DEBIT MONEY
CREDIT MONEY

LINES OF CREDIT

Filter Selection Parameter Data Type
ID STRING
START_DATE DATE
EXPIRY_DATE DATE
APPROVAL_DATE DATE
STATE ENUM
SUBSTATE ENUM
EXPOSURE_LIMIT_TYPE ENUM

Usage examples

// get all loans that are in two different products
POST {
   "filterConstraints":[
      {
         "filterSelection":"PRODUCT_KEY",
         "filterElement":"IN",
         "values":[
            "ff8080814eaa832d014eaa88e24d034c",
            "ad8080814eaa832d014eaa88e252034e"
         ]
      }
   ]
} /api/loans/search

// get all ACTIVE and APPROVED deposit accounts
POST {
   "filterConstraints":[
      {
         "filterSelection":"ACCOUNT_STATE",
         "filterElement":"IN",
         "values":[
            "PENDING_APPROVAL",
            "APPROVED"
         ]
      }
   ]
} /api/savings/search

// get all loan transactions for a specific client
POST {
   "filterConstraints":[
      {
         "filterSelection":"ID",
         "filterElement":"EQUALS",
         "dataItemType":"CLIENT",
         "value":"197495342"
      }
   ],
   "sortDetails":{
      "sortingColumn":"ID",
      "sortingOrder":"DESCENDING"
   }
} /api/clients/search

// get all groups created in specific date range
POST {
   "filterConstraints":[
      {
         "filterSelection":"CREATION_DATE",
         "filterElement":"BETWEEN",
         "value":"2015-01-01",
         "secondValue":"2015-06-20"
      }
   ]
} /api/groups/search

// get the repayments transactions for loans that are more than 10 days in arrears
POST{
   "filterConstraints":[
      {
         "dataFieldValue":"DAYS_IN_ARREARS",
         "filterElement":"MORE_THAN",
         "dataItemType":"LOANS",
         "value":"10"
      },
      {
         "dataFieldValue":"EVENT",
         "filterElement":"EQUALS",
         "dataItemType":"LOAN_TRANSACTION",
         "value":"REPAYMENT"
      }
   ]
} /api/loans/transactions/search

// get all loan accounts created between a range
POST {
   "filterConstraints":[
      {
         "filterSelection":"CREATION_DATE",
         "filterElement":"BETWEEN",
         "value":"2015-06-15",
         "secondValue":"2015-06-20"
      }
   ]
} /api/loans/search

// get all loan accounts that have the custom field value equal with "test". This custom field is of type string and it belongs to loan entity
POST {
   "filterConstraints":[
      {
         "filterSelection":"8a808085507f02b901507f02f59700ea",
         "filterElement":"EQUALS",
         "value":"test"
      },
      {
         "filterSelection":"CREATION_DATE",
         "dataItemType":"CLIENT",
         "filterElement":"ON",
         "value":"2015-10-19"
      }
   ]
} /api/loans/search

// get all loan accounts that are having loan disbursement tranches defined but not disbursed yet
POST {
   "filterConstraints":[
      {
         "filterSelection":"DISBURSEMENT_TRANSACTION_KEY",
         "dataItemType":"TRANCHE",
         "filterElement":"EMPTY"
      }
   ]
} /api/loans/search

// get all loan accounts that are having loan disbursement tranche with 100 amount
POST {
   "filterConstraints":[
      {
         "filterSelection":"AMOUNT",
         "dataItemType":"TRANCHE",
         "filterElement":"EQUALS",
         "value":"100"
      }
   ]
} /api/loans/search

// get all notification messages for LOAN_CREATED notifications
POST {
   "filterConstraints":[
      {
         "filterSelection":"EVENT",
         "filterElement":"EQUALS",
         "value":"LOAN_CREATED"
      }
   ]
} /api/loans/search

// get all groups that have the custom field identified by encoded key 8afac14a34d69cd00134d70c0abe00d3 and value "test"
POST{
   "filterConstraints":[
      {
         "filterSelection":"8afac14a34d69cd00134d70c0abe00d3",
         "filterElement":"EQUALS",
         "value":"test",
         "dataFieldType":"CUSTOM"
      }
   ]
} /api/groups/search

// get the journal entry with entry id 1, posted by the user with the encoded key 8a8080a254a9659b0154a965a69a0004
POST {
     "filterConstraints":[
        {
           "filterSelection":"USER_KEY",
           "filterElement":"EQUALS",
           "value":"8a8080a254a9659b0154a965a69a0004"
        },
        {
           "filterSelection":"ENTRY_ID",
           "filterElement":"EQUALS",
           "value":"1"
        }
    ]
} /api/gljournalentries/search

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

// get all lines of credit identified by exposure limit types "APPROVED_AMOUNT" and "OUTSTANDING_AMOUNT"
POST {
   "filterConstraints":[
      {
         "filterSelection":"EXPOSURE_LIMIT_TYPE",
         "filterElement":"IN",
         "values":[
            "APPROVED_AMOUNT","OUTSTANDING_AMOUNT"
         ]
      }
   ]
} /api/linesofcredit/search

Note

More examples can be found on each entity(client/group/etc..) documentation pages.
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