---
title: "Save the settings and start a sync"
method: PUT
path: "/v1/contract-check/settings"
tags: ["Contract Check"]
---

# Save the settings and start a sync

`PUT /v1/contract-check/settings`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/contract-check/settings`
- Auth: HTTP bearer

Stores the data product and, when given, the full settings, then starts a sync in the background. Choosing another data product clears the stored settings, so the next sync suggests them again. While a sync runs, or while the app is switched off, no sync starts now: the next one runs once the current one ends or the app is switched on again (`sync_started` false). Needs a person with the `ingest` permission.

## Request body

- object
  - `data_product_id` string, uuid: The data product whose rows are checked.
  - `settings` ContractCheckSettings: Where each tree property sits in the CRM table, the required attributes per type, and the thresholds.
    - `tree` object, required
      - `key` string, required: The CRM record id column.
      - `site` object, required
        - `column` string, required
        - `pattern` string, nullable: A regular expression whose first capture group cuts the site key out of the value.
      - `site_name` string, nullable
      - `role` object, required
        - `column` string, required
        - `values` object: CRM value to role.
      - `type` string, nullable
      - `legacy_type` string, nullable
      - `active` object, nullable
        - `column` string
        - `values` string[]
      - `status` string, nullable
      - `start` string, nullable
      - `end` string, nullable
      - `partner` string[]: Columns; the first non-empty one wins.
      - `name` string, nullable
      - `number` string, nullable
    - `required` object: Required attributes (field keys) per contract type.
    - `varies` string[]: Fields that differ between sibling contracts by nature.
    - `declined` string[]: The CRM's own words for a field left empty on purpose; such a field is no gap.
    - `thresholds` object
      - `start_gap_years` number
      - `similarity` number: How alike two main documents must be to count as sharing a standard text.
      - `end_coverage` boolean
      - `date_rule_types` string[]
      - `purchase_overrun_years` number

## Response `200`

Saved.

- object
  - `saved` true
  - `sync_started` boolean: false while the app is switched off.

## Other responses

- `400`: The body is invalid: a required column is missing (`tree.key`, `tree.site.column`, `tree.role.column`), a role value maps to an unknown role, a threshold is out of range, or the site pattern is longer than 200 characters or not a valid regular expression.
- `401`: Missing or invalid API key.
- `403`: The key lacks the `write` scope, or its person lacks the `ingest` permission.
- `404`: The requested resource was not found.

## Changes

- **2026-11-26** `622d429de7ea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/contract-check/settings/put.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)
