---
title: "The contract workbook as a grid"
method: GET
path: "/v1/price-baseline/models/{id}/sheets"
tags: ["Contract Pricing"]
---

# The contract workbook as a grid

`GET /v1/price-baseline/models/{id}/sheets`

## Request

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

The contract workbook for the model and its versions: sheets of cells (inputs, external values, live formulas with cached values), the source rows, the open inputs and the amount the customer should be billed. Without `from`, the period is that of the invoice check named by `comparison_id`, else of the contract's newest invoice check (the newest of `year` when `year` is given); with no check it is the calendar year `year` (default: the last full year). With `from`, the period is `from`..`to` (`to` defaults to December of `year`). Prices and the check are recomputed from the stored index values at request time. Labels follow the contract's language, not the caller's.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `comparison_id` string, uuid
- `from` string
- `to` string
- `year` integer

## Response `200`

The workbook grid.

- PriceBaselineContractSheets: The contract workbook as a grid.
  - `title` string
  - `lang` 'de' | 'en': Language of the labels; follows the contract.
  - `contract_key` string, nullable
  - `currency` string, nullable
  - `sheets` object[]
    - `name` string
    - `widths` number[]
    - `rows` array[]
      - object[]
        - `v` union: Computed value.
          - string
          - number
        - `role` 'head' | 'section' | 'label' | 'text' | 'input' | 'external' | 'assumed' | 'calc' | 'output' | 'display' | 'problem'
        - `f` string: Excel formula without the leading `=`; `v` holds its computed value.
        - `fmt` string: Excel number format.
        - `src` integer: 1-based row on the sources sheet backing this value.
        - `note` string
  - `sources` object[]
    - `what` string
    - `document_id` string, uuid, nullable
    - `document` string, nullable
    - `url` string, nullable
    - `quote` string, nullable
    - `verified` boolean
    - `problem` string, nullable
  - `gaps` string[]: What keeps a cell from being filled, one line per cell.
  - `open` PriceBaselineOpenInput[]
    - `key` string: Stable across recomputes: `value:<document>:<name>`, `index:<series>` or `invoice`.
    - `kind` 'contract_value' | 'index_value' | 'quantity' | 'profile' | 'invoice'
    - `model_id` string, uuid
    - `variable` string, nullable
    - `symbol` string, nullable
    - `label` string
    - `series` string, nullable
    - `unit` string, nullable
    - `periods` string[]
    - `question` string
    - `options` string[]
    - `decision` object, nullable
      - `choice` 'from_invoice' | 'request'
      - `note` string, nullable
      - `decided_at` string, date-time
    - `assumption` PriceBaselineAssumptionUse, nullable: Where a number rests on an assumption.
      - `id` string, uuid
      - `scope` 'contract' | 'workspace'
      - `target_kind` 'series' | 'variable' | 'quantity' | 'profile'
      - `target` string
      - `rule` 'value' | 'carry_forward' | 'proxy'
      - `value` number, nullable
      - `note` string, nullable
    - `optional` boolean: Answering improves the result but nothing is missing without it.
    - `assume_target` object, nullable
      - `target_kind` 'series' | 'variable' | 'quantity' | 'profile'
      - `target` string
    - `category` 'contract_value' | 'quantity' | 'grid_fee' | 'official_index' | 'wage_index' | 'supplier_price' | 'market_price' | 'invoice' | 'profile'
  - `period` object
    - `from` string
    - `to` string
  - `expected` PriceBaselineExpected: What the customer should be billed for the period.
    - `basis` 'invoice' | 'plan': `invoice` from the checked invoice's own quantities, `plan` from the contract's agreed quantities.
    - `net` number
    - `vat` number, nullable
    - `gross` number, nullable
    - `complete` boolean: False when a billed price or quantity was unavailable; the totals then cover only what could be computed.
    - `currency` string, nullable
    - `assumed_net` number
    - `lines` PriceBaselinePlanLine[]
      - `component` string
      - `basis` 'energy' | 'capacity' | 'fixed'
      - `label` string
      - `unit` string
      - `qty` number, nullable
      - `qty_unit` string, nullable
      - `net` number, nullable: Null when any period could not be priced or the line is held out.
      - `assumed` boolean
      - `prices` object[]
        - `from` string
        - `to` string
        - `price` number, nullable
        - `unit` string
      - `implausible` string: Why the line is held out of `net` and the totals; absent when it counts.
      - `held_net` number: The amount the line would add when it is held out.
    - `check` object: Present with an invoice check: whether every invoice line matches the contract.
      - `invoice_number` string, nullable
      - `billed_net` number
      - `matched` integer
      - `mismatched` integer
      - `not_checkable` integer
      - `unbilled` object
        - `count` integer
        - `amount` number
    - `held_net` number
  - `assumptions` PriceBaselineAssumptionUse[]
    - `id` string, uuid
    - `scope` 'contract' | 'workspace'
    - `target_kind` 'series' | 'variable' | 'quantity' | 'profile'
    - `target` string
    - `rule` 'value' | 'carry_forward' | 'proxy'
    - `value` number, nullable
    - `note` string, nullable
  - `cost_units` string[]: Cost units the contract register holds for the contract's documents.

## Other responses

- `400`: The request is invalid.
- `404`: The requested resource was not found.
- `422`: The request is well-formed but violates the declared task contract.

## Changes

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

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/price-baseline/models/:id/sheets/get.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)
