---
title: "Update Deal Index Fact"
method: PATCH
path: "/api/external/v2/deals/{deal_id}/index/facts"
tags: ["external-v2-deals"]
---

# Update Deal Index Fact

`PATCH /api/external/v2/deals/{deal_id}/index/facts`

Update one editable SOT value on a deal.

Use ``POST /index/facts`` as the default path for setting user-supplied
metric values. This PATCH route is for targeted edits by ``sot_id`` or for
promoting a specific existing ``observation_id``. Editability is enforced
server-side by ``lev-ai-backend`` against ``MetricDefinition.editable``;
non-editable metrics surface as 422.

## Path parameters

- `deal_id` integer, required

## Request body

- UpdateDealIndexFactRequest — PATCH /api/external/v2/deals/<id>/index/facts request body. Updates one editable SOT value. For user-supplied metric values, prefer POST /index/facts even when replacing an existing value. Use PATCH only when targeting a specific sot_id or promoting a specific observation_id.
  - `sot_id` string, required — Prefixed SOT id from index/search results.
  - `value` string, nullable — Direct user-supplied replacement value.
  - `observation_id` integer, nullable — Existing observation to promote as the SOT value.
  - `order` number, nullable — Per-row display order for multi-instance metrics.

## Response `200`

Successful Response

- DealIndexFactObjectResponse — OpenAPI schema for PATCH /api/external/v2/deals/<id>/index/facts.
  - `request_id` string, required
  - `timestamp` string, required
  - `data` DealIndexFactResponse, required — SOT shape returned by deal-index fact write endpoints.
    - `id` string, nullable
    - `sot_id` integer, nullable
    - `metric_key` string, nullable
    - `metric_id` integer, nullable
    - `value_text` string, nullable
    - `value_type` string, nullable
    - `period_type` string, nullable
    - `period_value` string, nullable
    - `entity_type` string, nullable
    - `entity_id` integer, nullable
    - `entity_ref` string, nullable
    - `group_ref` string, nullable
    - `category_id` integer, nullable
    - `source_type` string, nullable
    - `source_id` string, nullable
    - `observation_id` integer, nullable
    - `weight` integer, nullable
    - `origin` string, nullable
    - `editable` boolean, nullable
    - `order` number, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-14** `8490e8546c0a` — 2 info
  - added the new optional request property `order`
  - added the optional property `data/order` to the response with the `200` status

[Change history](https://skmtc.dev/lev/apis/lev-api/changes/api/external/v2/deals/:deal_id/index/facts/patch.md)

---

[API](https://skmtc.dev/lev/apis/lev-api.md) · [All operations](https://skmtc.dev/lev/apis/lev-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lev/lev-api/revisions/78060050da81/schema)
