> ## Documentation Index
> Fetch the complete documentation index at: https://growi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Settlement reconciliation

> Checks orders created in a window against what TikTok actually settled. The orders are the shop's affiliate orders, the same set as Affiliate order lines, so orders with no creator attribution aren't included. Each order gets a `status`: `settled`, `partially_settled` (settled rows plus a later unsettled row, such as an adjustment), `unsettled`, `not_found`, `unknown`, `unchecked` or `error`.

Per order you get `stored` (Growi's synced view: SKU lines, units, `gmv`, settlement statuses, estimated and actual commission), `settled` (TikTok's `settlementAmount`, `revenueAmount`, `feeAndTaxAmount`, `shippingCostAmount`, `affiliateCommission` and `statementIds`) and `unsettled` (TikTok's estimates). For settled orders, `mismatch` compares the affiliate commission TikTok deducted at settlement with the commission reported on the affiliate order; `against` says whether that was the actual or estimated figure, and `delta` (settled minus stored) is flagged when it exceeds `tolerance` (default `0.01`). `summary` counts the page by status. Amounts are exact decimal strings.

`start_date` and `end_date` are order-create days, YYYY-MM-DD, UTC, inclusive, at most 365 days apart. Orders are newest first. `limit` is up to 50 (default 25), and each order costs one TikTok call. Pass `nextCursor` back as `cursor` with the same window. `sweptThrough` shows how fresh the stored side is. When time runs out, `truncated` is true and some orders come back `unchecked` or `unknown`.



## OpenAPI

````yaml api-reference/tik-tok-shop-openapi.json GET /tik_tok_shop/finance/reconciliation
openapi: 3.0.3
info:
  title: 'Growi API: TikTok Shop'
  version: 1.0.0
  description: >-
    Generated by scripts/gen_tik_tok_shop.rb from Growi's TikTok Shop route
    table.
servers:
  - url: https://api.growi.io/api/public/v1
security:
  - bearerAuth: []
paths:
  /tik_tok_shop/finance/reconciliation:
    get:
      summary: Settlement reconciliation
      description: >-
        Checks orders created in a window against what TikTok actually settled.
        The orders are the shop's affiliate orders, the same set as Affiliate
        order lines, so orders with no creator attribution aren't included. Each
        order gets a `status`: `settled`, `partially_settled` (settled rows plus
        a later unsettled row, such as an adjustment), `unsettled`, `not_found`,
        `unknown`, `unchecked` or `error`.


        Per order you get `stored` (Growi's synced view: SKU lines, units,
        `gmv`, settlement statuses, estimated and actual commission), `settled`
        (TikTok's `settlementAmount`, `revenueAmount`, `feeAndTaxAmount`,
        `shippingCostAmount`, `affiliateCommission` and `statementIds`) and
        `unsettled` (TikTok's estimates). For settled orders, `mismatch`
        compares the affiliate commission TikTok deducted at settlement with the
        commission reported on the affiliate order; `against` says whether that
        was the actual or estimated figure, and `delta` (settled minus stored)
        is flagged when it exceeds `tolerance` (default `0.01`). `summary`
        counts the page by status. Amounts are exact decimal strings.


        `start_date` and `end_date` are order-create days, YYYY-MM-DD, UTC,
        inclusive, at most 365 days apart. Orders are newest first. `limit` is
        up to 50 (default 25), and each order costs one TikTok call. Pass
        `nextCursor` back as `cursor` with the same window. `sweptThrough` shows
        how fresh the stored side is. When time runs out, `truncated` is true
        and some orders come back `unchecked` or `unknown`.
      parameters:
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
          description: First order-create day, YYYY-MM-DD, UTC, inclusive.
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
          description: >-
            Last order-create day, YYYY-MM-DD, UTC, inclusive. At most 365 days
            after start_date.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 25
          description: Orders per page. Each order costs one TikTok call.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: nextCursor from the previous page, same window.
        - name: tolerance
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{1,9}(\.\d{1,6})?$
            default: '0.01'
          description: >-
            Absolute commission difference allowed before a settled order is a
            mismatch.
        - name: organization_id
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Use the TikTok Shop of this child brand (organization id) of your
            API key's organization
      responses:
        '200':
          description: >-
            { window, basis: affiliate_orders.order_create_time_utc,
            sweptThrough, tolerance, currency, orders: [{ orderId,
            orderCreateTime, status, stored, settled, unsettled, mismatch, error
            }], summary: { orders, settled: { count, settlementAmount },
            partiallySettled, unsettled: { count, estSettlementAmount },
            notFound, unknown, unchecked, errors, mismatches }, nextCursor,
            truncated, truncatedReasons }
          content:
            application/json:
              example:
                window:
                  startDate: '2026-09-01'
                  endDate: '2026-09-07'
                basis: affiliate_orders.order_create_time_utc
                sweptThrough: '2026-09-29T06:00:00.000Z'
                tolerance: '0.01'
                currency: USD
                orders:
                  - orderId: '576000000000000001'
                    orderCreateTime: '2026-09-06T10:00:00.000000Z'
                    status: settled
                    stored:
                      skuLines: 1
                      units: '2'
                      gmv: '60.00'
                      currency: USD
                      settlementStatuses:
                        - SETTLED
                      fullyReturned: false
                      estimatedCommission: '4.00'
                      actualCommission: '4.00'
                    settled:
                      currency: USD
                      settlementAmount: '40.00'
                      revenueAmount: '50.00'
                      feeAndTaxAmount: '-6.00'
                      shippingCostAmount: '-4.00'
                      affiliateCommission: '-5.50'
                      statementIds:
                        - '7400000000000000001'
                    unsettled: null
                    mismatch:
                      field: affiliate_commission
                      against: actual
                      settled: '5.50'
                      stored: '4.00'
                      delta: '1.50'
                    error: null
                summary:
                  orders: 1
                  settled:
                    count: 1
                    settlementAmount: '40.00'
                  partiallySettled: 0
                  unsettled:
                    count: 0
                    estSettlementAmount: '0'
                  notFound: 0
                  unknown: 0
                  unchecked: 0
                  errors: 0
                  mismatches: 1
                nextCursor: null
                truncated: false
                truncatedReasons: []
        '400':
          description: >-
            Invalid params: missing/malformed dates, a window over 365 days,
            limit out of range, a bad tolerance, or a malformed cursor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '403':
          description: >-
            The shop's TikTok authorization doesn't include this data (`code:
            scope_not_granted`), so the seller has to re-authorize the shop
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '404':
          description: >-
            `organization_id` isn't an active child brand of your organization,
            or the record you asked for doesn't exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '422':
          description: >-
            No TikTok Shop is connected for this organization. A parent
            organization whose shops sit on its child brands has to pass
            `organization_id`. Also returned when the shop isn't connected
            through TikTok's official API (`code: unsupported_on_web_only_shop`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '429':
          description: >-
            Rate limited: one call every 2 seconds and an hourly cap per API
            key. See `Retry-After` and the `X-RateLimit-*` headers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '502':
          description: >-
            TikTok refused or failed. `error` is a fixed message and `code`
            names the failure when there is one
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
components:
  schemas:
    TikTokShopError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: What went wrong
        code:
          type: string
          description: Machine-readable reason, when there is one
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.