Overview
The deals endpoints support full CRUD operations with filtering, sorting, pagination, sparse fieldsets, and optional sub-resource includes.
| Endpoint | Description |
|---|---|
GET /build/deals | List deals with filtering and pagination |
GET /deals/{id} | Get a single deal |
POST /build/deals | Create a new deal |
PATCH /deals/{id} | Update a deal |
DELETE /deals/{id} | Archive (soft-delete) a deal |
List Deals
/api/external/v2/build/dealsList deals with pagination, filtering, and sorting
curl -X GET "https://api.levcapital.com/api/external/v2/build/deals?limit=10&include=financials&sort=-created_at" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200):
{
"request_id": "...",
"timestamp": "2026-03-20T15:30:45Z",
"data": [
{
"id": 101,
"title": "123 Main St Acquisition",
"loan_amount": 5000000.0,
"loan_type": "acquisition",
"transaction_type": "purchase",
"business_plan": "value_add",
"description": "Mixed-use acquisition in downtown",
"estimated_close_date": "2026-06-01",
"close_date": null,
"owner_account_id": 56,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-03-10T14:30:00Z",
"financials": {
"id": 201,
"noi": 450000.0,
"purchase_price": 6500000.0,
"appraised_value": 7000000.0,
"ltv": 0.714,
"dscr": 1.25
}
}
],
"pagination": {
"total": 42,
"limit": 10,
"offset": 0,
"has_more": true
}
}unauthorizedAuthentication required— Missing or invalid Authorization header
bad_requestcursor and sort cannot be combined; use offset pagination when sorting— Both cursor and sort query parameters are provided
Get Deal
/api/external/v2/deals/{deal_id}Get a single deal by ID
Response (200):
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"timestamp": "2026-03-20T15:30:45Z",
"data": {
"id": 101,
"title": "123 Main St Acquisition",
"loan_amount": 5000000.0,
"loan_type": "acquisition",
"transaction_type": "purchase",
"business_plan": "value_add",
"description": "Mixed-use acquisition in downtown Chicago",
"estimated_close_date": "2026-06-01",
"close_date": null,
"owner_account_id": 56,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-03-10T14:30:00Z"
}
}unauthorizedAuthentication required— Missing or invalid Authorization header
not_foundDeal not found— The deal_id doesn't exist or isn't accessible to the authenticated user
Create Deal
/api/external/v2/build/dealsCreate a new deal
Supports the Idempotency-Key header to prevent duplicate creation.
curl -X POST "https://api.levcapital.com/api/external/v2/build/deals" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
-d '{
"title": "456 Oak Ave Refinance",
"loan_amount": 3500000,
"loan_type": "refinance",
"transaction_type": "refinance"
}'Response (201):
{
"request_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"timestamp": "2026-03-20T15:30:45Z",
"data": {
"id": 205,
"title": "456 Oak Ave Refinance",
"loan_amount": 3500000.0,
"loan_type": "refinance",
"transaction_type": "refinance",
"business_plan": null,
"description": null,
"estimated_close_date": null,
"close_date": null,
"owner_account_id": 56,
"created_at": "2026-03-20T15:30:45Z",
"updated_at": "2026-03-20T15:30:45Z"
}
}unauthorizedAuthentication required— Missing or invalid Authorization header
validation_errortitle is required— Missing the required title field in the request body
Update Deal
/api/external/v2/deals/{deal_id}Update a deal (partial update)
All request body fields are optional. Only provided fields are updated.
Response (200):
{
"request_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"timestamp": "2026-03-20T15:30:45Z",
"data": {
"id": 101,
"title": "123 Main St Acquisition",
"loan_amount": 7500000.0,
"loan_type": "acquisition",
"transaction_type": "purchase",
"business_plan": "value_add",
"description": "Mixed-use acquisition in downtown Chicago — updated loan amount",
"estimated_close_date": "2026-07-15",
"close_date": null,
"owner_account_id": 56,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-03-20T15:30:45Z"
}
}unauthorizedAuthentication required— Missing or invalid Authorization header
not_foundDeal not found— The deal_id doesn't exist or isn't accessible to the authenticated user
Delete Deal
/api/external/v2/deals/{deal_id}Archive (soft-delete) a deal
Response (200):
{
"request_id": "...",
"timestamp": "2026-03-20T15:30:45Z",
"data": {
"deleted": true
}
}unauthorizedAuthentication required— Missing or invalid Authorization header
not_foundDeal not found— The deal_id doesn't exist or isn't accessible to the authenticated user
Deal Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique deal identifier |
title | string|null | Deal title |
loan_amount | number|null | Requested loan amount |
loan_type | string|null | Loan type (acquisition, refinance, construction, etc.) |
transaction_type | string|null | Transaction type |
business_plan | string|null | Business plan |
description | string|null | Deal description |
estimated_close_date | string|null | Estimated close date (ISO 8601) |
close_date | string|null | Actual close date (ISO 8601) |
owner_account_id | integer|null | Owning account ID |
created_at | string|null | Creation timestamp (ISO 8601) |
updated_at | string|null | Last update timestamp (ISO 8601) |
financials | object|null | Included when ?include=financials (see Deal Financials) |
properties | array|null | Included when ?include=properties (see Deal Properties) |
team | array|null | Included when ?include=team (see Deal Team) |