# Pobieranie listy submerchantów

Endpoint: GET /flow/{flowServiceId}/submerchants
Version: 1.0.0
Security: bearerAuth

## Security:

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

## Path parameters:

  - `flowServiceId` (string, required)
    ID usługi Flow

## Query parameters:

  - `page` (integer)
    Numer strony (30 rekordów na stronę)

## Response 200 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `data` (array, required)

  - `data.id` (string, required)
    ID submerchanta
    Example: flsm_aaaabbbb

  - `data.customId` (string, required)
    Własne ID submerchanta nadane przez usługę Flow
    Example: user-123

  - `data.status` (string, required)
    Status submerchanta:
- `flow_submerchant_pending`
 - oczekuje na onboarding,
- `flow_submerchant_in_verification`
 - w trakcie weryfikacji przez SimPay,
- `flow_submerchant_active`
 - aktywny,
- `flow_submerchant_inactive`
 - nieaktywny.
    Enum: "flow_submerchant_pending", "flow_submerchant_in_verification", "flow_submerchant_active", "flow_submerchant_inactive"

  - `pagination` (object, required)

  - `pagination.total` (integer, required)
    Liczba wszystkich rekordów
    Example: 1

  - `pagination.count` (integer, required)
    Liczba rekordów na danej stronie
    Example: 1

  - `pagination.per_page` (integer, required)
    Maksymalna ilość rekordów na strone
    Example: 15

  - `pagination.current_page` (integer, required)
    Aktualna strona
    Example: 1

  - `pagination.total_pages` (integer, required)
    Ilość stron
    Example: 1

  - `pagination.links` (object, required)
    Adresy URL do stron

  - `pagination.links.next_page` (string, required)
    Adres URL do następnej strony
    Example: null

  - `pagination.links.prev_page` (string, required)
    Adres URL do poprzedniej strony
    Example: null

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `feedbackUrl` (string)
    Adres do zgłaszania problemów z API (`POST /feedback`). Zwracany dla uwierzytelnionych kluczy API.
    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)
    Adres do zgłaszania problemów z API (`POST /feedback`). Zwracany dla uwierzytelnionych kluczy API.
    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)
    NotFound

## Response 404 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "SERVICE_NOT_FOUND", "TRANSACTION_NOT_FOUND", "ROUTE_NOT_FOUND"

