Skip to main content

Preview Financial Line Backfill

POST 

/api/faire/instances/:integrationInstance/financial-line-overrides/preview-backfill

Preview how many past Faire-imported FinancialLine rows would be re-keyed if the supplied override map were applied. Does not modify any data.

Request Body:

  • overrides (object, required) - Same shape as the financial_line_type_overrides field on the update endpoint. Each branch is optional; pass null to indicate "no override" for that branch.
    • commission (int|null) - FinancialLineType ID, must be a cost type when supplied.
    • payout_fee (int|null) - FinancialLineType ID, must be a cost type when supplied.
    • payout_protection_fee (int|null) - FinancialLineType ID, must be a cost type when supplied.
    • damaged_and_missing_items (int|null) - FinancialLineType ID, must be a cost type when supplied.
    • covered_shipping (int|null) - FinancialLineType ID, must be a revenue type when supplied.

Validation: Classification mismatch returns 422 with errors.overrides.<branch> — same guard as the update endpoint.

Use case: The Faire settings UI calls this when the user changes any override and presses Save, so the confirmation modal can show "X record(s) will be backfilled" before they decide whether to run the backfill or just save the new override forward.

Response: Returns a { commission, payout_fee, payout_protection_fee, damaged_and_missing_items, covered_shipping, total } object. Each number is the count of past Faire FinancialLine rows that would be re-keyed for that branch under the supplied overrides; total is their sum. Branches not present in the overrides map (or sent as null) report 0.

Request

Responses

Successful response