---
title: "Fill Template"
method: POST
path: "/api/businesses/{business_id}/workbook/fill-template"
tags: ["Data Cleaning"]
---

# Fill Template

`POST /api/businesses/{business_id}/workbook/fill-template`

## Request

- Base URL: `https://api.flagpost.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flagpost.ai/api/businesses/{business_id}/workbook/fill-template`
- Auth: HTTP bearer

Start data cleaning. Existing query-param API for period override.

Also accepts company_names / fiscal_year_end. Prefer POST /run with a
JSON body for full inputs (entities list).

## Path parameters

- `business_id` string, required

## Query parameters

- `start_year` integer, nullable
- `end_year` integer, nullable
- `start_month` integer, nullable
- `end_month` integer, nullable
- `company_names` string[], nullable
- `fiscal_year_end` integer, nullable
- `fiscal_year_label_offset` integer

## Request body `multipart/form-data`

- BodyFillTemplateApiBusinessesBusinessIdWorkbookFillTemplatePost
  - `template` string, binary, nullable

## Response `200`

Successful Response

- DataCleaningStatusResponse: Status response for data cleaning operations.
  - `success` boolean, required
  - `message` string, required
  - `status` string
  - `download_url` string, nullable
  - `assumptions_count` integer
  - `assumptions_summary` string, nullable
  - `source_documents` string[]
  - `temporal_mismatch` string, nullable
  - `job_id` string, nullable
  - `data_cleaning_job_id` string, nullable

## Other responses

- `422`: Validation Error

---

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