Skip to main content

Override

Manually override the N-Shot selected value for a specific document-field pair. Requires write scope.

Manually override the selected value for a specific document-field comparison by choosing a specific shot number. The override is recorded with an audit trail including the actor, timestamp, original value, and new value. Use this when the majority value is incorrect and you want to select a different shot's extraction.

The selected_shot must be a valid shot number from the comparison's values array. The override records actor_id as "api" for all API-initiated overrides.
POST/v1/jobs/runs/{runId}/nshot/override

Response

Response fields

idstringComparison UUID.
run_idstringJob run UUID.
document_idstringDocument UUID.
field_namestringField name.
statusstringAgreement status.
majority_valueanyOriginal majority value.
valuesarrayPer-shot values.
overrideobjectOverride record with selected_shot, actor_id, overridden_at, from_value, to_value, and reason.
override.selected_shotintegerThe shot number that was selected.
override.actor_idstringAlways "api" when overridden via the API.
override.overridden_atstringISO 8601 timestamp of the override.
override.from_valueanyThe previous majority value.
override.to_valueanyThe new overridden value.
override.reasonstring | nullReason provided for the override.

Response

{
  "id": "cmp-uuid-1",
  "run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "document_id": "doc-uuid-1",
  "field_name": "total_amount",
  "status": "yellow",
  "agreement_score": 0.6667,
  "majority_value": "12450.00",
  "comparison_method": "exact",
  "values": [
    { "shot_number": 1, "value": "12450.00" },
    { "shot_number": 2, "value": "12450.00" },
    { "shot_number": 3, "value": "12,450.00" }
  ],
  "override": {
    "selected_shot": 1,
    "actor_id": "api",
    "overridden_at": "2024-09-14T11:00:00.000Z",
    "from_value": "12450.00",
    "to_value": "12450.00",
    "reason": "Canonical decimal format preferred"
  },
  "judgement": null,
  "created_at": "2024-09-14T10:32:00.000Z",
  "links": {
    "self": "/v1/jobs/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/nshot/comparison?document_id=doc-uuid-1&field_name=total_amount"
  }
}

Use this when the majority value from the shots is incorrect and a different shot produced the right extraction. The override record captures a full audit trail including from_value, to_value, and overridden_at. Pair with the judge decision endpoint when you want to accept LLM recommendations programmatically instead of selecting shots manually.

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundNo job run with this ID exists for your organization, or no comparison found for the given document_id and field_name.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.