# otapayout.reconcile

Reconcile Airbnb Earnings, Booking.com Reconciliation API v1, and Vrbo payout CSVs with bank deposits. Confirm only completed bank credits from a documented OTA payer with an exact transfer reference and agreeing currency, amount, and date. Maximum 100 distinct reservations per call.

- REST: `POST https://api.kanagu.dev/v1/otapayout/reconcile`
- MCP tool: `otapayout.reconcile` at https://api.kanagu.dev/mcp
- Price: $0.30 USD per 100 reservations, on successful calls only. Trial: 10 calls per IP per UTC day without a key, shared by REST and MCP.
- Auth: `Authorization: Bearer <key>` for billed calls. Retries: reuse `Idempotency-Key`.

## Request body

- `otaReports` (array of object, required): One report per OTA. Include complete payout groups.
- `otaReports[].csv` (string (max 524288 chars), required): English Airbnb Earnings, Booking.com Reconciliation API v1, or Vrbo CSV text. The headers identify the format.
- `otaReports[].slashDateOrder` ("mdy" | "dmy"): Order for slash dates in Airbnb and Vrbo reports.
- `bankCsv` (string (max 524288 chars), required): One account's bank CSV. Use bankColumns to declare its column meanings when they are not covered by a built-in profile.
- `bankColumns` (object)
- `bankColumns.date` (string (max 200 chars), required): Booking date or timestamp column.
- `bankColumns.slashDateOrder` ("mdy" | "dmy")
- `bankColumns.amount` (string (max 200 chars), required): Amount column. Without direction, a positive amount is an incoming credit.
- `bankColumns.currency` (string (max 200 chars), required): Three-letter currency code column.
- `bankColumns.description` (string (max 200 chars), required): Bank transfer description column.
- `bankColumns.reference` (string (max 200 chars)): Transfer reference column, when separate from the description.
- `bankColumns.counterparty` (string (max 200 chars)): Bank-reported sender of an incoming credit.
- `bankColumns.direction` (object): Recognizes standard credit/debit codes and additional incomingValues. Negative amounts are debits. Unknown codes and negative credits require review.
- `bankColumns.direction.column` (string (max 200 chars), required)
- `bankColumns.direction.incomingValues` (array of string (max 100 chars), required)
- `bankColumns.status` (object): Omit only for exports containing booked transactions exclusively.
- `bankColumns.status.column` (string (max 200 chars), required)
- `bankColumns.status.completedValues` (array of string (max 100 chars), required)
- `bankColumns.ignored` (array of string (max 200 chars)): List any other columns whose values do not affect the reconciliation.

## Response

- `reservationCount` (integer (0 to 100), required)
- `reports` (array of object, required)
- `reports[].file` (integer (-9007199254740991 to 9007199254740991), required): One-based index in otaReports.
- `reports[].format` ("airbnb-earnings-en-2025" | "booking-reconciliation-en-v1" | "vrbo-payout-summary-en-2026" | "vrbo-payment-history-en-2026" | "vrbo-bank-deposits-en-2026", required)
- `reports[].source` (string, required)
- `reports[].channel` ("airbnb" | "booking" | "vrbo", required)
- `payouts` (array of object, required)
- `payouts[].key` (string, required): File and payout record number joined by a colon.
- `payouts[].file` (integer (-9007199254740991 to 9007199254740991), required)
- `payouts[].row` (integer (-9007199254740991 to 9007199254740991), required): One-based CSV record number, including the header.
- `payouts[].date` (string (date), required)
- `payouts[].reference` (string)
- `payouts[].reported` (object)
- `payouts[].reported.currency` (string, required)
- `payouts[].reported.amount` (string, required): Exact decimal amount in currency units.
- `payouts[].lineTotal` (object)
- `payouts[].lineTotal.currency` (string, required)
- `payouts[].lineTotal.amount` (string, required): Exact decimal amount in currency units.
- `payouts[].expected` (object): Reported payout total or sum of single-currency detail lines.
- `payouts[].expected.currency` (string, required)
- `payouts[].expected.amount` (string, required): Exact decimal amount in currency units.
- `payouts[].lines` (array of object, required)
- `payouts[].lines[].row` (integer (-9007199254740991 to 9007199254740991), required)
- `payouts[].lines[].type` (string, required)
- `payouts[].lines[].kind` ("reservation" | "adjustment" | "other", required): Normalized transaction category.
- `payouts[].lines[].needs_review` (true): The source transaction type is unrecognized.
- `payouts[].lines[].reservationId` (string)
- `payouts[].lines[].transactionId` (string)
- `payouts[].lines[].transactionDate` (string (date))
- `payouts[].lines[].guest` (string)
- `payouts[].lines[].checkIn` (string (date))
- `payouts[].lines[].checkOut` (string (date))
- `payouts[].lines[].net` (object, required)
- `payouts[].lines[].net.currency` (string, required)
- `payouts[].lines[].net.amount` (string, required): Exact decimal amount in currency units.
- `payouts[].lines[].breakdown` (object, required): Reported amounts preserve the source signs. Absent fields were unavailable.
- `payouts[].lines[].breakdown.currency` (string, required)
- `payouts[].lines[].breakdown.gross` (string)
- `payouts[].lines[].breakdown.hostFee` (string)
- `payouts[].lines[].breakdown.processingFee` (string)
- `payouts[].lines[].breakdown.commissionTax` (string)
- `payouts[].lines[].breakdown.deductions` (string)
- `payouts[].lines[].breakdown.cleaningFee` (string)
- `payouts[].lines[].breakdown.petFee` (string)
- `payouts[].lines[].breakdown.resortFee` (string)
- `payouts[].lines[].breakdown.taxWithheld` (string)
- `payouts[].lines[].breakdown.taxRemittedByOta` (string)
- `payouts[].lines[].breakdown.taxPassedToHost` (string)
- `payouts[].lines[].breakdown.occupancyTax` (string)
- `payouts[].lines[].breakdown.coHostPayout` (string)
- `payouts[].lines[].breakdown.adjustment` (string)
- `payouts[].lines[].breakdown.exchangeRate` (string)
- `payouts[].lines[].breakdown.otherItems` (array of object): Additional monetary columns or transaction types with their original amount signs.
- `payouts[].lines[].breakdown.otherItems[].column` (string, required)
- `payouts[].lines[].breakdown.otherItems[].amount` (string, required)
- `payouts[].lines[].breakdown.calculatedNet` (string): Net reconstructed from the reported monetary breakdown.
- `payouts[].status` ("matched" | "suggested" | "not_received" | "no_deposit_expected" | "needs_review", required)
- `payouts[].match` (object)
- `payouts[].match.deposit` (object, required)
- `payouts[].match.deposit.row` (integer (-9007199254740991 to 9007199254740991), required)
- `payouts[].match.deposit.date` (string (date)): Bank booking date, when available.
- `payouts[].match.deposit.description` (string, required)
- `payouts[].match.deposit.reference` (string)
- `payouts[].match.deposit.amount` (object, required)
- `payouts[].match.deposit.amount.currency` (string, required)
- `payouts[].match.deposit.amount.amount` (string, required): Exact decimal amount in currency units.
- `payouts[].match.method` ("reference" | "amount_date_channel" | "batched_amount_date_channel", required)
- `payouts[].match.amountDifference` (string): Bank deposit minus expected payout in the same currency.
- `payouts[].match.impliedExchangeRate` (string): Bank currency units per payout currency unit based on the two reported amounts.
- `payouts[].issues` (array of string, required)
- `payouts[].candidateDepositRows` (array of integer (-9007199254740991 to 9007199254740991), required)
- `unmatchedDeposits` (array of object, required): Bank deposits without a confirmed link, including suggested allocations and debits that require review.
- `unmatchedDeposits[].row` (integer (-9007199254740991 to 9007199254740991), required)
- `unmatchedDeposits[].date` (string (date)): Bank booking date, when available.
- `unmatchedDeposits[].description` (string, required)
- `unmatchedDeposits[].reference` (string)
- `unmatchedDeposits[].amount` (object, required)
- `unmatchedDeposits[].amount.currency` (string, required)
- `unmatchedDeposits[].amount.amount` (string, required): Exact decimal amount in currency units.
- `unmatchedDeposits[].candidatePayoutKeys` (array of string, required)
- `unmatchedDeposits[].candidatePayoutGroups` (array of array of string): Each exact amount allocation found for this deposit. A singleton is one possible allocation.
- `unmatchedDeposits[].issues` (array of string)
- `unallocatedLines` (array of object, required)
- `unallocatedLines[].row` (integer (-9007199254740991 to 9007199254740991), required)
- `unallocatedLines[].type` (string, required)
- `unallocatedLines[].kind` ("reservation" | "adjustment" | "other", required): Normalized transaction category.
- `unallocatedLines[].needs_review` (true): The source transaction type is unrecognized.
- `unallocatedLines[].reservationId` (string)
- `unallocatedLines[].transactionId` (string)
- `unallocatedLines[].transactionDate` (string (date))
- `unallocatedLines[].guest` (string)
- `unallocatedLines[].checkIn` (string (date))
- `unallocatedLines[].checkOut` (string (date))
- `unallocatedLines[].net` (object, required)
- `unallocatedLines[].net.currency` (string, required)
- `unallocatedLines[].net.amount` (string, required): Exact decimal amount in currency units.
- `unallocatedLines[].breakdown` (object, required): Reported amounts preserve the source signs. Absent fields were unavailable.
- `unallocatedLines[].breakdown.currency` (string, required)
- `unallocatedLines[].breakdown.gross` (string)
- `unallocatedLines[].breakdown.hostFee` (string)
- `unallocatedLines[].breakdown.processingFee` (string)
- `unallocatedLines[].breakdown.commissionTax` (string)
- `unallocatedLines[].breakdown.deductions` (string)
- `unallocatedLines[].breakdown.cleaningFee` (string)
- `unallocatedLines[].breakdown.petFee` (string)
- `unallocatedLines[].breakdown.resortFee` (string)
- `unallocatedLines[].breakdown.taxWithheld` (string)
- `unallocatedLines[].breakdown.taxRemittedByOta` (string)
- `unallocatedLines[].breakdown.taxPassedToHost` (string)
- `unallocatedLines[].breakdown.occupancyTax` (string)
- `unallocatedLines[].breakdown.coHostPayout` (string)
- `unallocatedLines[].breakdown.adjustment` (string)
- `unallocatedLines[].breakdown.exchangeRate` (string)
- `unallocatedLines[].breakdown.otherItems` (array of object): Additional monetary columns or transaction types with their original amount signs.
- `unallocatedLines[].breakdown.otherItems[].column` (string, required)
- `unallocatedLines[].breakdown.otherItems[].amount` (string, required)
- `unallocatedLines[].breakdown.calculatedNet` (string): Net reconstructed from the reported monetary breakdown.
- `unallocatedLines[].file` (integer (-9007199254740991 to 9007199254740991), required)
- `adjustments` (array of object, required)
- `adjustments[].file` (integer (-9007199254740991 to 9007199254740991), required)
- `adjustments[].row` (integer (-9007199254740991 to 9007199254740991), required)
- `adjustments[].reservationId` (string)
- `adjustments[].payoutKey` (string)
- `adjustments[].amount` (object, required)
- `adjustments[].amount.currency` (string, required)
- `adjustments[].amount.amount` (string, required): Exact decimal amount in currency units.
- `adjustments[].priorPayoutCandidates` (array of string, required)
- `adjustments[].needs_review` (boolean, required)
- `needs_review` (boolean, required)

## Example

```sh
curl https://api.kanagu.dev/v1/otapayout/reconcile \
  -H "Authorization: Bearer $KANAGU_KEY" \
  -H "Content-Type: application/json" \
  -d '{"otaReports":[{"csv":"Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"}],"bankCsv":"Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED","bankColumns":{"date":"Date","amount":"Amount","description":"Description","currency":"Currency","reference":"Reference","counterparty":"Sender","status":{"column":"State","completedValues":["COMPLETED"]}}}'
```

```ts
const res = await fetch("https://api.kanagu.dev/v1/otapayout/reconcile", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KANAGU_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "otaReports": [
      {
        "csv": "Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"
      }
    ],
    "bankCsv": "Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED",
    "bankColumns": {
      "date": "Date",
      "amount": "Amount",
      "description": "Description",
      "currency": "Currency",
      "reference": "Reference",
      "counterparty": "Sender",
      "status": {
        "column": "State",
        "completedValues": [
          "COMPLETED"
        ]
      }
    }
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
```

## Errors

JSON `{"error":{"code","message"}}`.

- 400 `invalid_input`: The body does not match the request schema. The message names each field.
- 400 `invalid_json`: The body is missing or is not valid JSON.
- 400 `invalid_idempotency_key`: Idempotency-Key must be 1–128 visible ASCII characters.
- 401 `invalid_api_key`: The Bearer key is missing, malformed, invalid or inactive.
- 402 `free_allowance_exhausted`: This month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left.
- 404 `not_found`: No operation at this path.
- 409 `idempotency_conflict`: The Idempotency-Key was already used with a different body.
- 413 `payload_too_large`: JSON bodies may be at most 64 KiB.
- 429 `trial_limit`: The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.
- 500 `internal_error`: The call failed on our side. It is not billed; retry with the same Idempotency-Key.

## JSON Schema

Request:
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "otaReports": {
      "minItems": 1,
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "csv": {
            "type": "string",
            "minLength": 1,
            "maxLength": 524288,
            "description": "English Airbnb Earnings, Booking.com Reconciliation API v1, or Vrbo CSV text. The headers identify the format."
          },
          "slashDateOrder": {
            "default": "mdy",
            "description": "Order for slash dates in Airbnb and Vrbo reports.",
            "type": "string",
            "enum": [
              "mdy",
              "dmy"
            ]
          }
        },
        "required": [
          "csv"
        ],
        "additionalProperties": false
      },
      "description": "One report per OTA. Include complete payout groups."
    },
    "bankCsv": {
      "type": "string",
      "minLength": 1,
      "maxLength": 524288,
      "description": "One account's bank CSV. Use bankColumns to declare its column meanings when they are not covered by a built-in profile."
    },
    "bankColumns": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Booking date or timestamp column."
        },
        "slashDateOrder": {
          "type": "string",
          "enum": [
            "mdy",
            "dmy"
          ]
        },
        "amount": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Amount column. Without direction, a positive amount is an incoming credit."
        },
        "currency": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Three-letter currency code column."
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Bank transfer description column."
        },
        "reference": {
          "description": "Transfer reference column, when separate from the description.",
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "counterparty": {
          "description": "Bank-reported sender of an incoming credit.",
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "direction": {
          "description": "Recognizes standard credit/debit codes and additional incomingValues. Negative amounts are debits. Unknown codes and negative credits require review.",
          "type": "object",
          "properties": {
            "column": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "incomingValues": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            }
          },
          "required": [
            "column",
            "incomingValues"
          ],
          "additionalProperties": false
        },
        "status": {
          "description": "Omit only for exports containing booked transactions exclusively.",
          "type": "object",
          "properties": {
            "column": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "completedValues": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            }
          },
          "required": [
            "column",
            "completedValues"
          ],
          "additionalProperties": false
        },
        "ignored": {
          "description": "List any other columns whose values do not affect the reconciliation.",
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "required": [
        "date",
        "amount",
        "currency",
        "description"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "otaReports",
    "bankCsv"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "otaReports": [
        {
          "csv": "Date,Type,Confirmation code,Reference code,Currency,Amount,Paid out,Service fee,Cleaning fee,Gross earnings\n11/12/2026,Payout,,G-KANAGU001,USD,,194.00,,,\n11/12/2026,Reservation,HM12345678,,USD,194.00,,6.00,25.00,200.00"
        }
      ],
      "bankCsv": "Date,Amount,Description,Currency,Reference,Sender,State\n2026-11-14,194.00,Payout,USD,G-KANAGU001,\"Airbnb Payments, Inc.\",COMPLETED",
      "bankColumns": {
        "date": "Date",
        "amount": "Amount",
        "description": "Description",
        "currency": "Currency",
        "reference": "Reference",
        "counterparty": "Sender",
        "status": {
          "column": "State",
          "completedValues": [
            "COMPLETED"
          ]
        }
      }
    }
  ]
}
```

Response:
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "reservationCount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "reports": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "One-based index in otaReports."
          },
          "format": {
            "type": "string",
            "enum": [
              "airbnb-earnings-en-2025",
              "booking-reconciliation-en-v1",
              "vrbo-payout-summary-en-2026",
              "vrbo-payment-history-en-2026",
              "vrbo-bank-deposits-en-2026"
            ]
          },
          "source": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "airbnb",
              "booking",
              "vrbo"
            ]
          }
        },
        "required": [
          "file",
          "format",
          "source",
          "channel"
        ],
        "additionalProperties": false
      }
    },
    "payouts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "File and payout record number joined by a colon."
          },
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "One-based CSV record number, including the header."
          },
          "date": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "reference": {
            "type": "string"
          },
          "reported": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "lineTotal": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "expected": {
            "description": "Reported payout total or sum of single-currency detail lines.",
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "row": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "type": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "reservation",
                    "adjustment",
                    "other"
                  ],
                  "description": "Normalized transaction category."
                },
                "needs_review": {
                  "description": "The source transaction type is unrecognized.",
                  "type": "boolean",
                  "const": true
                },
                "reservationId": {
                  "type": "string"
                },
                "transactionId": {
                  "type": "string"
                },
                "transactionDate": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "guest": {
                  "type": "string"
                },
                "checkIn": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "checkOut": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "net": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "amount": {
                      "type": "string",
                      "description": "Exact decimal amount in currency units."
                    }
                  },
                  "required": [
                    "currency",
                    "amount"
                  ],
                  "additionalProperties": false
                },
                "breakdown": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "gross": {
                      "type": "string"
                    },
                    "hostFee": {
                      "type": "string"
                    },
                    "processingFee": {
                      "type": "string"
                    },
                    "commissionTax": {
                      "type": "string"
                    },
                    "deductions": {
                      "type": "string"
                    },
                    "cleaningFee": {
                      "type": "string"
                    },
                    "petFee": {
                      "type": "string"
                    },
                    "resortFee": {
                      "type": "string"
                    },
                    "taxWithheld": {
                      "type": "string"
                    },
                    "taxRemittedByOta": {
                      "type": "string"
                    },
                    "taxPassedToHost": {
                      "type": "string"
                    },
                    "occupancyTax": {
                      "type": "string"
                    },
                    "coHostPayout": {
                      "type": "string"
                    },
                    "adjustment": {
                      "type": "string"
                    },
                    "exchangeRate": {
                      "type": "string"
                    },
                    "otherItems": {
                      "description": "Additional monetary columns or transaction types with their original amount signs.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "column": {
                            "type": "string"
                          },
                          "amount": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "column",
                          "amount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "calculatedNet": {
                      "description": "Net reconstructed from the reported monetary breakdown.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "currency"
                  ],
                  "additionalProperties": false,
                  "description": "Reported amounts preserve the source signs. Absent fields were unavailable."
                }
              },
              "required": [
                "row",
                "type",
                "kind",
                "net",
                "breakdown"
              ],
              "additionalProperties": false
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "matched",
              "suggested",
              "not_received",
              "no_deposit_expected",
              "needs_review"
            ]
          },
          "match": {
            "type": "object",
            "properties": {
              "deposit": {
                "type": "object",
                "properties": {
                  "row": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "date": {
                    "description": "Bank booking date, when available.",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "description": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "object",
                    "properties": {
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      "amount": {
                        "type": "string",
                        "description": "Exact decimal amount in currency units."
                      }
                    },
                    "required": [
                      "currency",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "row",
                  "description",
                  "amount"
                ],
                "additionalProperties": false
              },
              "method": {
                "type": "string",
                "enum": [
                  "reference",
                  "amount_date_channel",
                  "batched_amount_date_channel"
                ]
              },
              "amountDifference": {
                "description": "Bank deposit minus expected payout in the same currency.",
                "type": "string"
              },
              "impliedExchangeRate": {
                "description": "Bank currency units per payout currency unit based on the two reported amounts.",
                "type": "string"
              }
            },
            "required": [
              "deposit",
              "method"
            ],
            "additionalProperties": false
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "candidateDepositRows": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          }
        },
        "required": [
          "key",
          "file",
          "row",
          "date",
          "lines",
          "status",
          "issues",
          "candidateDepositRows"
        ],
        "additionalProperties": false
      }
    },
    "unmatchedDeposits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "date": {
            "description": "Bank booking date, when available.",
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "amount": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "candidatePayoutKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "candidatePayoutGroups": {
            "description": "Each exact amount allocation found for this deposit. A singleton is one possible allocation.",
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "row",
          "description",
          "amount",
          "candidatePayoutKeys"
        ],
        "additionalProperties": false
      },
      "description": "Bank deposits without a confirmed link, including suggested allocations and debits that require review."
    },
    "unallocatedLines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "type": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "reservation",
              "adjustment",
              "other"
            ],
            "description": "Normalized transaction category."
          },
          "needs_review": {
            "description": "The source transaction type is unrecognized.",
            "type": "boolean",
            "const": true
          },
          "reservationId": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          },
          "transactionDate": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "guest": {
            "type": "string"
          },
          "checkIn": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "checkOut": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "net": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "breakdown": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "gross": {
                "type": "string"
              },
              "hostFee": {
                "type": "string"
              },
              "processingFee": {
                "type": "string"
              },
              "commissionTax": {
                "type": "string"
              },
              "deductions": {
                "type": "string"
              },
              "cleaningFee": {
                "type": "string"
              },
              "petFee": {
                "type": "string"
              },
              "resortFee": {
                "type": "string"
              },
              "taxWithheld": {
                "type": "string"
              },
              "taxRemittedByOta": {
                "type": "string"
              },
              "taxPassedToHost": {
                "type": "string"
              },
              "occupancyTax": {
                "type": "string"
              },
              "coHostPayout": {
                "type": "string"
              },
              "adjustment": {
                "type": "string"
              },
              "exchangeRate": {
                "type": "string"
              },
              "otherItems": {
                "description": "Additional monetary columns or transaction types with their original amount signs.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "column": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "column",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "calculatedNet": {
                "description": "Net reconstructed from the reported monetary breakdown.",
                "type": "string"
              }
            },
            "required": [
              "currency"
            ],
            "additionalProperties": false,
            "description": "Reported amounts preserve the source signs. Absent fields were unavailable."
          },
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "row",
          "type",
          "kind",
          "net",
          "breakdown",
          "file"
        ],
        "additionalProperties": false
      }
    },
    "adjustments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "file": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reservationId": {
            "type": "string"
          },
          "payoutKey": {
            "type": "string"
          },
          "amount": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "amount": {
                "type": "string",
                "description": "Exact decimal amount in currency units."
              }
            },
            "required": [
              "currency",
              "amount"
            ],
            "additionalProperties": false
          },
          "priorPayoutCandidates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "needs_review": {
            "type": "boolean"
          }
        },
        "required": [
          "file",
          "row",
          "amount",
          "priorPayoutCandidates",
          "needs_review"
        ],
        "additionalProperties": false
      }
    },
    "needs_review": {
      "type": "boolean"
    }
  },
  "required": [
    "reservationCount",
    "reports",
    "payouts",
    "unmatchedDeposits",
    "unallocatedLines",
    "adjustments",
    "needs_review"
  ],
  "additionalProperties": false
}
```
