---
title: "Backfill Contract Term Seed"
method: POST
path: "/backfills/backfill-contract-term-seed"
tags: ["internal"]
---

# Backfill Contract Term Seed

`POST /backfills/backfill-contract-term-seed`

Create term 1 for every candidate contract, copying ``effective_date`` →
``start_date``, ``expiration_date`` → ``end_date``, and ``auto_renews``
straight through. Enriching a term with its notice date, notice period and
renewal term from the contract-sourced ``annual_key_dates`` rows is a separate
backfill, since that needs the key-date recurrence math.

**Materializes no reminder rows** (``materialize_reminders=False``): reminders
start flowing at cutover, not at seed time, and a ladder per seeded term would
be a mass email the next morning. Those terms get their ladder the first time
anything touches them.

Each contract is written inside its own savepoint, so one whose stored dates
violate the term CHECK is reported in ``skipped_invalid_dates`` instead of
aborting the run.

## Response `200`

Successful Response

- ContractTermSeedBackfillResponse
  - `created_count` integer, required
  - `open_ended_count` integer, required
  - `end_date_in_past_count` integer, required
  - `notifications_created` integer, required
  - `skipped_invalid_dates` string[]

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/425d5b8a3c17/schema)
