Data & Analytics

Decompose why each lender ranked where it did

Runs the same decision scenario as /v1/decisions and decomposes WHY each top lender ranked where it did: per-offer cost breakdown (rate/APR/fees/payment/lifetime interest), the scoring signals, and how much each offer beats the next-ranked one by. Accepts the same request body as /v1/decisions. This route is the single source of truth; the MCP explain_ranking tool calls it.

Authentication required: Pass your API key in the X-API-Key header.

post/v1/explain-ranking

Request

  • Base URL: https://api.rateapi.dev
  • URL: https://api.rateapi.dev/v1/explain-ranking
  • Auth: API key in header X-API-Key

Request body

decision_type'financing' required

Which decision to explain. This route explains financing decisions.

contextobject required

Request context including geo.state. Same shape as /v1/decisions.

borrowerobject

Optional borrower attributes (e.g. credit_score). Same shape as /v1/decisions.

product_requestobject required

Product request (product_type, intent, amount, term_months, details). Same shape as /v1/decisions.

preferencesobject

Optional preferences. max_providers (1-5) caps how many ranked offers are decomposed.

Example request

{
  "decision_type": "financing"
}

Response

Ranking decomposition for the top qualifying offers.

request_idstring

Identifier of the decision that was explained.

product_typestring

Loan or deposit product this applies to.

summarystring

How the ranking was computed and what separated the winner, in plain language.

Changes

No recorded changes to this operation across all 1 revision of this API.