# Pobieranie operacji portfela

Lista operacji portfela z paginacją kursorową. Kolejną stronę pobierzesz przekazując cursor w parametrze z cursor.queryField.

Endpoint: GET /flow/{flowServiceId}/submerchants/{submerchantId}/finances/{walletId}/transactions
Version: 1.0.0
Security: bearerAuth

## Path parameters:

  - `flowServiceId` (string, required)
    ID usługi Flow
    Example: "flow_aaaabbbb"

  - `submerchantId` (string, required)
    ID submerchanta (flsm_...) lub jego customId
    Example: "flsm_aaaabbbb"

  - `walletId` (string, required)
    ID portfela
    Example: "0199a5f0-2b8c-7c1e-9e3a-1f2b3c4d5e6f"

## Query parameters:

  - `filter[action]` (string)
    Rodzaj operacji
    Enum: "service", "commission", "fraud", "withdraw", "refund", "bank_fee"

  - `cursor` (string)
    Kursor strony (z cursor.next.cursor / cursor.previous.cursor)

  - `perPage` (integer)
    Ile wyników na stronę pokazać
    Example: 15

  - `sort` (string)
    Pokazuj w kolejności od (-created_at = najnowszych, created_at = najstarszych)
    Enum: "-created_at", "created_at"

## Response 200 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `data` (object, required)

  - `data.transactions` (array)

  - `data.transactions.id` (string)
    ID operacji

  - `data.transactions.action` (string)
    Rodzaj operacji
    Enum: "service", "commission", "fraud", "withdraw", "refund", "bank_fee"

  - `data.transactions.type` (string)
    deposit - zasilenie, withdraw - pobranie środków
    Enum: "deposit", "withdraw"

  - `data.transactions.amount` (number)
    Example: 10

  - `data.transactions.amountBefore` (number,null)
    Saldo przed operacją (null, jeśli operacja nie została jeszcze przeliczona do portfela)

  - `data.transactions.amountAfter` (number,null)
    Saldo po operacji
    Example: 10

  - `data.transactions.context` (object)

  - `data.transactions.context.transaction` (object,null)
    Powiązana transakcja płatności

  - `data.transactions.context.transaction.id` (string)
    Id transakcji

  - `data.transactions.context.transaction.friendlyId` (string)
    ID transakcji zwracane kupującemu

  - `data.transactions.context.transaction.description` (string,null)

  - `data.transactions.context.transaction.control` (string,null)

  - `data.transactions.context.withdraw` (object,null)
    Powiązana wypłata (dla withdraw i bank_fee)

  - `data.transactions.context.withdraw.id` (string)

  - `data.transactions.context.withdraw.shortId` (string)

  - `data.transactions.context.refund` (object,null)
    Powiązany zwrot (dla refund)

  - `data.transactions.context.refund.id` (string)
    Id zwrotu

  - `data.transactions.context.refund.friendlyId` (string)

  - `data.transactions.createdAt` (string)
    Data utworzenia w formacie: ISO 8601

  - `data.wallet` (object)

  - `data.wallet.id` (string)
    ID portfela
    Example: "0199a5f0-2b8c-7c1e-9e3a-1f2b3c4d5e6f"

  - `data.wallet.type` (object)

  - `data.wallet.type.id` (string)
    Enum: "mobile", "payment", "referral", "flow"

  - `data.wallet.type.name` (string)
    Example: "Płatności online"

  - `data.wallet.balance` (number)
    Saldo portfela
    Example: 123.45

  - `data.wallet.currency` (object)

  - `data.wallet.currency.isoCode` (string)
    Example: "PLN"

  - `data.wallet.currency.prefix` (string,null)

  - `data.wallet.currency.suffix` (string,null)
    Example: "zł"

  - `data.wallet.currency.currencyRateToPln` (number)
    Example: 1

  - `data.wallet.currency.nbpTable` (string,null)
    Example: "A"

  - `data.wallet.withdrawType` (string)
    Typ wypłat
    Enum: "manual", "workdays", "balance_greater_than", "custom_days"

  - `data.wallet.withdrawBalanceToAutoPayout` (number,null)
    Saldo, po przekroczeniu którego następuje automatyczna wypłata
    Example: 100

  - `data.wallet.minBalanceToWithdraw` (number,null)
    Minimalne saldo do wypłaty
    Example: 10

  - `data.wallet.customDaysToWithdraw` (array,null)
    Dni tygodnia wypłat (1 = poniedziałek, 5 = piątek)
    Example: [1,5]

  - `data.wallet.invoiceLocale` (string)
    Język faktur
    Enum: "pl", "en"

  - `data.wallet.createdAt` (string)
    Data utworzenia w formacie: ISO 8601

  - `data.wallet.updatedAt` (string)
    Data utworzenia w formacie: ISO 8601

  - `data.wallet.withdrawBalanceLeftBalance` (number,null)
    Kwota pozostawiana w portfelu przy wypłacie automatycznej
    Example: 10

  - `cursor` (object, required)

  - `cursor.path` (string)
    Adres URL zasobu

  - `cursor.perPage` (integer)
    Example: 15

  - `cursor.next` (object)

  - `cursor.next.cursor` (string,null)
    Kursor następnej strony

  - `cursor.next.url` (string,null)
    Adres URL następnej strony

  - `cursor.previous` (object)

  - `cursor.previous.cursor` (string,null)
    Kursor poprzedniej strony

  - `cursor.previous.url` (string,null)
    Adres URL poprzedniej strony

  - `cursor.queryField` (string)
    Nazwa parametru query, w którym należy przekazać kursor
    Example: "cursor"

## Response 401 fields (application/json):

  - `success` (boolean, required)
    Request status

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

## Response 403 fields (application/json):

  - `success` (boolean, required)
    Request status

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

## Response 404 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `message` (string)
    Opis błędu

  - `errorCode` (string, required)
    Kod błędu

## Response 422 fields (application/json):

  - `success` (boolean, required)
    Request status

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

  - `errors` (object, required)
    Example: {"amount":["The amount field is required."],"currency":["The selected currency is invalid."]}

  - `errors.amount` (array)
    Example: ["The amount field is required."]


