Integration Summary
When to use- Trigger and retrieve AI-powered lender search results, then fold them into a broker or analyst workflow.
- Use the read and write examples together so you can validate state before you mutate it.
Required scopes- Access is inherited from the connected user or JWT session.
- Inspect GET /me or the validate-api-key response to confirm the scopes available to the current token.
Headers- Authorization: Bearer <token>
- X-Origin-App: <client-name>
- Content-Type: application/json on write operations
Request schemaUse the path and query parameter tables below or /platform/openapi.json for the machine-readable schema surface.
Response schemaResponses use the standard request_id/timestamp/data envelope documented in the API overview.
Enums & values- Enum-like values and filter operators are documented inline on the page where available.
- When a value set is account- or tier-dependent, validate against live responses before hard-coding assumptions.
IdempotencyUse Idempotency-Key on retried writes when your client cannot guarantee whether a prior attempt succeeded.
Rate limitsTreat search as a high-value AI action. Poll intentionally and back off on 429 responses.
Examplescurl, TypeScript, Python
Starter example: POST /api/external/v2/deals/{deal_id}/actions/search-lenders
bash
curl -X POST "https://api.levcapital.com/api/external/v2/deals/{deal_id}/actions/search-lenders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Origin-App: my-integration"Lender Search
Last updated: March 2026
Lender Search is one of the most AI-native workflows in Lev. It turns deal context into a ranked set of lender candidates that can power analyst workflows, broker copilots, and human review queues.
Connect your API key to explore
Stored in your browser session only. Never sent to our docs server.
GET
/api/external/v2/deals/{deal_id}/lender-searchdeal_id*limithttps://api.levcapital.com/api/external/v2/deals/{deal_id}/lender-search?limit=10Overview
The lender search workflow is two-step:
- Trigger a search (
POST) — initiates the AI matching process for a deal - Get results (
GET) — retrieves the ranked results once the search is complete
If a recent search already exists for the deal, the trigger endpoint returns cached results immediately.
Workflow Shape
Use lender search as a workflow, not just an endpoint:
- Read the deal and any available financial context.
- Trigger or reuse lender search for that deal.
- Summarize the ranked result set with the deal context that likely drove the ranking.
- Hand the shortlist to a human or the next workflow step, such as placement creation or term-sheet review.
Trigger Search
POST
/api/external/v2/deals/{deal_id}/actions/search-lendersTrigger an AI-powered lender search for a deal
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deal_id | integer | Required | The deal ID |
The request body should be an empty JSON object
{}.Response (200):
json
{
"request_id": "...",
"timestamp": "2026-03-20T15:30:45Z",
"data": {
"search_id": "abc123",
"status": "completed",
"deal_id": 101,
"message": "Search completed with 25 results"
}
}| Status | Meaning |
|---|---|
completed | Results are ready |
pending | Search is in progress — poll the GET endpoint |
failed | Search failed |
Error responses
401unauthorized
When: Missing or invalid Authorization header
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"error": {
"status": 401,
"type": "unauthorized",
"message": "Authentication required",
"details": {}
}
}404not_found
When: The deal_id doesn't exist or isn't accessible to the authenticated user
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"error": {
"status": 404,
"type": "not_found",
"message": "Deal not found",
"details": {}
}
}Trigger a lender search
bash
curl -X POST "https://api.levcapital.com/api/external/v2/deals/{deal_id}/actions/search-lenders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Origin-App: my-integration"
-d '{}'Get Results
GET
/api/external/v2/deals/{deal_id}/lender-searchGet lender search results for a deal
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deal_id | integer | Required | The deal ID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | Optional | Results per page (default 50) |
offset | integer | Optional | Offset for pagination |
Response (200):
json
{
"request_id": "...",
"timestamp": "2026-03-20T15:30:45Z",
"data": {
"search_id": "abc123",
"status": "completed",
"deal_id": 101,
"results": [
{
"org_id": 500,
"organization_name": "First National Bank",
"ai_score": 92,
"ai_rank_status": "top_match",
"ai_match_insights": "Strong fit based on asset type and geography",
"is_connected_lender": true,
"programs": [
{
"id": 10,
"title": "CRE Bridge Lending",
"loan_types": ["bridge"],
"capital_source_type": "balance_sheet",
"min_loan_amount": 1000000,
"max_loan_amount": 50000000,
"asset_types": ["multifamily", "office"],
"states": ["NY", "NJ", "CT"]
}
]
}
],
"pagination": {
"total": 25,
"limit": 50,
"offset": 0,
"has_more": false
}
}
}Each result in the
results array contains:| Field | Type | Description |
|---|---|---|
org_id | integer|null | Organization ID |
organization_name | string|null | Lender name |
ai_score | integer|null | AI match score |
ai_rank_status | string|null | AI ranking status |
ai_match_insights | string|null | AI-generated match reasoning |
is_connected_lender | boolean|null | Whether the lender is in your CRM |
programs | array|null | Matching lending programs |
Each program in the
programs array contains:| Field | Type | Description |
|---|---|---|
id | integer | Program ID |
title | string|null | Program name |
loan_types | string[]|null | Supported loan types |
capital_source_type | string|null | Capital source type |
min_loan_amount | number|null | Minimum loan amount |
max_loan_amount | number|null | Maximum loan amount |
asset_types | string[]|null | Supported asset types |
states | string[]|null | Geographic coverage |
Returns
404 if no search has been run for this deal.Error responses
401unauthorized
When: Missing or invalid Authorization header
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"error": {
"status": 401,
"type": "unauthorized",
"message": "Authentication required",
"details": {}
}
}404not_found
When: The deal_id doesn't exist or no search has been run for this deal
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"error": {
"status": 404,
"type": "not_found",
"message": "Deal not found",
"details": {}
}
}Read the latest lender search results
bash
curl -X GET "https://api.levcapital.com/api/external/v2/deals/{deal_id}/lender-search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Origin-App: my-integration"Implementation Notes
- Trigger first, then poll with intention. Do not create aggressive retry loops.
- Cache the latest
search_idand status in your own workflow state when you are orchestrating multiple steps. - Treat lender search as recommendation input. Keep the final outreach and placement decisions reviewable by a human.