API Reference

Run Policy API

After you have pulled the report from the first API, then use this API to run policies against the report.

POST /api/v1/client/credit_report/<credit_report_uuid>/policy/

Sample payload is given below.
The API takes an array of policies and variables which have to be evaluated.
The policy format is a JSON based representation of your policy, against which the policy has to run. It can take variables which are provided for by us from the credit report, and any additional variables which you have to pass.

[{
  "policy": [
    "OR",
    [
      "AND",
      ["GTE", "credit_score", 750],
      ["EQ", "loan_cycle", 1]
    ],
    [
      "AND", 
      ["GTE", "credit_score", 700],
      ["GT", "loan_cycle", 1]
    ]
  ],
  "variables": {"loan_cycle": "<Loan cycle of the customer>"}
}]

The above sample policy is a representation of this policy in terms of JSON: If the customer is taking the first loan from you, then the cut off credit score is 750, else if this is the customer's second loan from you, the cutoff credit score is 700. You can also pass your own variables if your policy requires them. Otherwise only the variables present in the Supported Credit Report Policy Parameters are supported.

Policy JSON has the format of [operator, operand1, operand2, operand3]. The first entry of the list is always the operator, and subsequent arguments are operands. The operand may itself be a list, whose first element will be an operator then. All supported operators are described in the Supported Operators table.

Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!