/api/external/v2/deals/{deal_id}/index/factsUpdate a single canonical deal fact value
Use this to change the canonical value behind a fact returned by Search Index. Provide exactly one of:
value— a direct, user-supplied replacement. Strips document provenance.observation_id— promote an existing observation returned by Index Observations. Preferred when the user is choosing among extracted values, because the new canonical value keeps its source document, page range, and confidence.
Editability is enforced server-side. Some facts (for example most property-canonical fields and certain sponsor financials) cannot be changed through this endpoint and will return a 422 — even if a prior search result hinted otherwise. There is no version history: the last write wins.
Path parameters
deal_idintegerrequiredThe deal ID
Request body
sot_idstringrequiredPrefixed SOT id from a search result (e.g. d:5362, a:123:property:690). Identifies the fact to update.
valuestringFree-text replacement value. Provide exactly one of value or observation_id.
observation_idintegerObservation id (> 0) to promote as the new canonical value. Returned by /index/observations.
curl -X PATCH "https://api.lev.com/api/external/v2/deals/101/index/facts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sot_id": "d:5362",
"observation_id": 9012
}'Response (200):
{
"request_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"timestamp": "2026-05-12T17:50:12Z",
"data": {
"id": "5362",
"sot_id": 5362,
"metric_key": "deal_financials.in_place_noi",
"metric_id": 42,
"value_text": "$1,250,000",
"value_type": "currency",
"period_type": "point_in_time",
"period_value": null,
"entity_type": "deal",
"entity_id": null,
"entity_ref": "deal:101",
"group_ref": null,
"category_id": 5,
"source_type": "document",
"source_id": "99",
"observation_id": 9012,
"weight": 10,
"origin": "promoted_observation",
"editable": true
}
}422
validation_errorProvide exactly one of value or observation_id— The request body omits both, or sends both, of value and observation_id
422
validation_errorMetric is not editable— The fact targets a metric flagged as non-editable upstream
401
unauthorizedAuthentication required— Missing or invalid Authorization header
404
not_foundDeal not found— The deal_id doesn't exist or isn't accessible to the authenticated user
503
service_unavailableDeal fact update is temporarily unavailable. Please try again shortly.— The indexed-data service is unavailable or returned a malformed payload