---
title: "Fill open contract values and plan quantities from every document of the contract"
method: POST
path: "/v1/price-baseline/models/{id}/enrich-documents"
tags: ["Contract Pricing"]
---

# Fill open contract values and plan quantities from every document of the contract

`POST /v1/price-baseline/models/{id}/enrich-documents`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/price-baseline/models/{id}/enrich-documents`
- Auth: HTTP bearer

Asks once, across the documents of the contract (its versions, the documents the Contracts app files under it, and offers or data sheets naming its number), for exactly the open contract values and the missing plan quantities of the workbook. A value counts only when its quote occurs in the document the answer names and prints it, and never replaces a verified value. With `dry_run` the report lists what would be filled and nothing is saved. When nothing is open the report has `wanted` 0 and no documents.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `dry_run` boolean: Report what would be filled without saving.
  - `use_opus` boolean: Use the stronger model for long documents the default model finds nothing in.
  - `year` integer: Year whose open inputs are asked for. Default: the last full year.

## Response `201`

The enrichment report.

- object
  - `data` PriceBaselineEnrichReport
    - `contract_key` string, nullable
    - `dry_run` boolean
    - `wanted` integer: Number of open values asked for.
    - `documents` object[]
      - `id` string: Label of the document (`D1`, `D2`, ...).
      - `filename` string
    - `values` object[]
      - `item` string: Label of the open value (`I1`, ...).
      - `kind` 'contract_value' | 'quantity'
      - `label` string
      - `target` string, nullable: The variable name, or the symbol of the quantity.
      - `value` number, nullable
      - `unit` string, nullable
      - `base_period` object, nullable
        - `from` string
        - `to` string
      - `document` string: Filename of the document the answer names.
      - `document_id` string, uuid
      - `quote` string, nullable
      - `verified` boolean
      - `problem` string, nullable
      - `applied` boolean
    - `applied` integer

## Other responses

- `400`: The request is invalid.
- `404`: The requested resource was not found.
- `502`: The extraction model is unavailable. The error is retryable.

## Changes

- **2026-10-28** `0a485a46163e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/price-baseline/models/:id/enrich-documents/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
