# Generate wallet operations CSV report

Generates a CSV report (`;` separator) of wallet operations for the given period (`date`) or for the given withdrawal (`withdraw`).
For a withdrawal, the report covers operations from the previous (non-rejected) withdrawal up to the given withdrawal.
`date` and `withdraw` are mutually exclusive; in the `withdraw` object pass either `id` or `shortId`.
Column headers are in Polish: `ID transakcji` (operation ID), `Typ` (type), `Operacja` (operation), `Czy przeliczona do portfela` (settled to wallet), `Kwota` (amount), `Kwota przed` (balance before), `Kwota po` (balance after), `Data operacji` (operation date),
`ID transakcji płatności` (payment transaction ID), `ID transakcji płatności zwrócone kupującemu` (payment transaction ID shown to the buyer), `Opis transakcji płatności` (payment transaction description), `Control transakcji płatności` (payment transaction control),
`ID wypłaty` (withdrawal ID), `Krótkie ID wypłaty` (withdrawal short ID), `ID zwrotu` (refund ID), `ID zwrotu zwrócone kupującemu` (refund ID shown to the buyer).

Endpoint: POST /flow/{flowServiceId}/submerchants/{submerchantId}/finances/{walletId}/raport
Version: 1.0.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer scopes: flow.submerchants.finances, flow.submerchants.finances.reports

## Path parameters:

  - `flowServiceId` (string, required)
    Flow service ID

  - `submerchantId` (string, required)
    Submerchant ID (`flsm_...`) or its `customId`

  - `walletId` (string, required)
    Wallet ID

## Request fields (application/json):

  - `date` (object)
    Date range

  - `date.from` (string, required)
    Example: 2026-09-01

  - `date.to` (string, required)
    Example: 2026-09-30

  - `withdraw` (object)
    Withdrawal for which the report is generated

  - `withdraw.id` (string)
    Withdrawal ID
    Example: 0199a5f0-2b8c-7c1e-9e3a-1f2b3c4d5e6f

  - `withdraw.shortId` (string)
    Withdrawal short ID
    Example: 1f2b3c4d

## Request examples:

  - `Report for a period` (unknown)

  - `Report for a withdrawal` (unknown)

## Response 200:

  - `200` (unknown)
    CSV report

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `feedbackUrl` (string)
    URL for reporting API problems (`POST /feedback`). Returned for authenticated API keys.
    Example: https://api.simpay.pl/feedback

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "UNAUTHORIZED"

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `feedbackUrl` (string)
    URL for reporting API problems (`POST /feedback`). Returned for authenticated API keys.
    Example: https://api.simpay.pl/feedback

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "INVALID_ABILITY_PROVIDED", "IP_ADDRESS_NOT_WHITELISTED"

## Response 404:

  - `404` (unknown)
    Submerchant, wallet or withdrawal not found

## Response 404 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `message` (string)
    Error description

  - `errorCode` (string, required)
    Error code

## Response 422:

  - `422` (unknown)
    Unprocessable Content

## Response 422 fields (application/json):

  - `feedbackUrl` (string)
    URL for reporting API problems (`POST /feedback`). Returned for authenticated API keys.
    Example: https://api.simpay.pl/feedback

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "VALIDATION_ERROR"

  - `errors` (object, required)

  - `errors.amount` (array)

