---
title: "Statements checked against their lines and the P&L"
method: POST
path: "/finance/reconciliation"
tags: ["Finance"]
---

# Statements checked against their lines and the P&L

`POST /finance/reconciliation`

For each statement in the window, two checks with their denominators: (1) TikTok against itself — the statement's settlement_amount minus the sum of its own lines, computed only once every line has landed; (2) linkage — which order and adjustment ids on the statement also appear on P&L rows tagged with this statement id, counted per id, never by money. States: incomplete, no_overlap, partial, complete. Read the counts before the state: a no_overlap on a shop whose P&L export has never run means nothing about the statement. Each page costs three reads, so limit is capped at 50.

## Request body

- FinanceReconciliationRequest — POST /finance/reconciliation request body — statements in a window, each checked two ways.
  - `start_date` string, date, nullable — Inclusive statement-date window start (UTC). Defaults to 29 days before ``end_date``.
  - `end_date` string, date, nullable — Inclusive window end (UTC). Defaults to yesterday.
  - `limit` integer — Statements per page (a page is three reads across both stores).
  - `offset` integer — Page offset; narrow the window instead of paging deeper.

## Response `200`

Successful Response

- FinanceReconciliationResponse — Statement-by-statement reconciliation for one shop in a window, newest first.
  - `shop_id` integer, required
  - `tts_shop_id` string, required
  - `start_date` string, required
  - `end_date` string, required
  - `pagination` PublicApiCorePaginationPaginationMeta, required — Pagination metadata returned in responses.
    - `total_count` integer, required
    - `page` integer, required
    - `page_size` integer, required
    - `total_pages` integer, required
  - `states` object, required — How many statements on this page landed in each state.
  - `data` FinanceReconciliationOut[], required
    - `statement_id` string, required
    - `statement_time` string, nullable
    - `currency` string, required
    - `settlement_amount` number, nullable — The statement's own headline figure.
    - `transactions_complete` boolean, required — Every line has landed; only then is a delta computed.
    - `transactions_settlement_sum` number, nullable — Sum of settlement_amount over the statement's lines; null until complete.
    - `internal_delta` number, nullable — settlement_amount minus the line sum, to the cent. Null until complete. Non-zero means TikTok disagrees with itself.
    - `linkage` FinanceReconciliationLinkage, required — Id-level overlap between a statement's lines and the P&L rows tagged with it. Every count is a denominator as well as a result: ``statement_rows_scanned`` and ``pnl_rows_linked`` say how much was looked at, so an empty overlap never reads as clean.
      - `statement_orders` integer, required — Distinct order ids on the statement's lines.
      - `statement_adjustments` integer, required — Distinct adjustment ids on the statement's lines.
      - `statement_reserves` integer, required — RESERVE lines on the statement; they have no P&L counterpart.
      - `statement_rows_scanned` integer, required — Statement lines read from ClickHouse.
      - `pnl_rows_linked` integer, required — P&L order and adjustment rows carrying this statement id.
      - `pnl_orders_linked` integer, required — Distinct order ids among those P&L rows, in the statement's currency.
      - `pnl_adjustments_linked` integer, required
      - `orders_in_both` integer, required
      - `orders_only_in_statement` integer, required — Settled on the statement but absent from the P&L export.
      - `orders_only_in_pnl` integer, required — Tagged with this statement in the P&L but not on its lines.
      - `adjustments_in_both` integer, required
      - `adjustments_only_in_statement` integer — Adjustment ids on the statement absent from the P&L.
      - `adjustments_only_in_pnl` integer — Adjustment ids tagged with this statement in the P&L but not on its lines.
      - `currencies` string[], required — Every currency seen on either side, plus the statement's own.
      - `excluded_rows` integer, required — P&L rows in another currency, or with no currency; never matched.
      - `unlinkable_rows` integer — P&L rows tagged with this statement that carry no order or adjustment id.
      - `rows_scanned` integer, required — statement_rows_scanned + pnl_rows_linked.
      - `statement_rows_expected` integer, nullable — TikTok's own line count for the statement, when it was stored.
    - `state` union, required — incomplete: lines still landing; no_overlap: no P&L row carries this statement id; partial: some ids on one side only, or rows excluded by currency; complete: every id matched.
      - 'incomplete' | 'no_overlap' | 'partial' | 'complete'
      - string
  - `data_status` FinanceDataStatus, required — Freshness and reachability of this shop's finance statements. ``scope_missing`` means the shop's TikTok grant refused the finance scope on the last sync; the fix is to re-authorize, not to retry.
    - `state` union, required — Latest statements-sync status: never_run | ok | empty | partial | scope_missing | unsupported | failed.
      - 'never_run' | 'ok' | 'empty' | 'partial' | 'scope_missing' | 'unsupported' | 'failed'
      - string
    - `last_synced_at` string, nullable — ISO timestamp of the last completed statements window.
    - `covered_from` string, nullable — ISO timestamp where the unbroken run of synced windows begins; nothing before it is known.
    - `covered_until` string, nullable — ISO timestamp up to which data is known to be complete (exclusive); the end of that same unbroken run.
    - `transactions_backlog` integer — Statements whose line items have not fully landed yet.

## Other responses

- `422` — Validation Error

## Changes

> 29 revisions in range; 1 not diffed.

- **2026-09-24** `8640294d0f3d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/reacherapp/apis/reacher-data-api/changes/finance/reconciliation/post.md)

---

[API](https://skmtc.dev/reacherapp/apis/reacher-data-api.md) · [All operations](https://skmtc.dev/reacherapp/apis/reacher-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reacherapp/apis/reacher-data-api/revisions/881910053958?raw)
