Search AutoPays

This request searchs the AutoPays within the account.

   Click here to learn more about this request

❗️

LoanPro is transitioning from Elasticsearch to OpenSearch.

For more information, including timelines and a guide for ensuring the integrations continue to work as intended, see OpenSearch Migration ↗

It's possible to execute a search for the AutoPays within your account:

  • This request uses Elasticsearch to filter through AutoPay information.
  • We've included query parameters in the URL of this request, but they're not required.
  • There are a lot of search options available, and we don't list all of them here. We recommend taking a look at how AutoPay searches work within the UI for an example of what search parameters can be used.

👆

Pay special attention to the endpoint of this request.

This request does not use OData, so it's not included in the endpoint like most other LMS requests.

Database

For information regarding AutoPay database tables, take a look at the following articles:

{
    "aggs": {  // Like explained below, this object calculates values based on the results.
        "avg_amount": {
            "avg": {
                "field": "amount"
            }
        },
        "sum_amount": {
            "sum": {
                "field": "amount"
            }
        }
    },
    "query": {
        "bool": {
            "filter": {
                "terms": {
                    "loanId": [ // Here, we've selected 10 loans for the system to search. However, you can have the system search for all loans by removing this array.
                        9114,
                        9115,
                        9116,
                        9117,
                        9118,
                        9119,
                        9120,
                        9121,
                        9122,
                        9123
                    ]
                }
            },
            "should": [ // The "should" parameter functions like "OR". In other words, at least one criteria below must be met for an AutoPay to be counted.
                {
                    "match": {
                        "status": "autopay.status.failed"
                    }
                },
                {
                    "match": {
                        "type": "autopay.type.single"
                    }
                },
                {
                    "match": {
                        "paymentMethod": "paymentAccount.type.checking"
                    }
                },
                {
                    "match": {
                        "recurringFrequency": "autopay.recurringFrequency.monthly"
                    }
                },
                {
                    "range": {
                        "processDateTimeLocal": {
                            "gte": "2022-04-01 00:04:00",
                            "lte": "2022-04-27 23:04:59"
                        }
                    }
                }
            ]
        }
    }
}
Language
Authorization
Click Try It! to start a request and see the response here!