# Get bank countries

The GET /banks/countries endpoint retrieves the list of countries that have connected banks which match the parameters specified.

Endpoint: GET /bank/countries
Security: Bearer, BasicAuth

## Query parameters:

  - `ids` (array)
    Filters for banks with bank ids that are represented in this list of ids (case-insensitive), up to a maximum of 1000.
    Example: ["goldbank","opalbank","platinumbank"]

  - `search` (string)
    Filters for banks with names or identifiers that contain this search string (case sensitive).
    Example: "banca"

  - `tppId` (string)
    Filters for banks to which the TPP with this tppId has access.
    Example: "9fk3m361-f12r-04b9-p39f-rio2m3pw9v8s"

  - `bankCode` (string)
    Filters for banks with a BIC (or BLZ, if German) that matches this bankCode. The BIC must have a string length of 8 or 11. The BLZ must have a string length of 8.
    Example: "NBAGDE3E"

  - `countries` (array)
    Filters for banks that are located in the countries specified by this list of two-letter country code in upper case (ISO 3166-1 alpha-2).
    Example: ["GB, RO, AT"]

  - `providers` (array)
    Filters for banks that are accessed through any of this list of providers.
    Example: "Token.io"

  - `bank_features.supports_send_payment.value` (boolean)
    Filters for banks that support payment initiation.

  - `bank_features.supports_receive_payment.value` (boolean)
    Filters for banks that support the receipt of payments.

  - `bank_features.supports_balance.value` (boolean)
    Filters for the banks that support retrieving account balances.

  - `bank_features.supports_scheduled_payment.value` (boolean)
    Filters for banks that support future dated scheduled payments.

  - `bank_features.supports_standing_order.value` (boolean)
    Filters for banks that support standing orders/recurring payments.

  - `bank_features.requires_one_step_payment.value` (boolean)
    Filters for banks that only support immediate redemption of transfer tokens.

  - `bank_features.supports_funds_confirmation.value` (boolean)
    Filters for banks that support confirmation of available funds.

  - `bank_features.supports_return_refund_account.value` (boolean)
    Filters for banks that support the request of refund account.

  - `bank_features.supports_transactions_date_filter.value` (boolean)
    Filters for banks that support retrieving transactions by date filter.

  - `bank_features.supports_account_information.value` (boolean)
    Filters for banks that support retrieving account information using Account Information Services (AIS).

  - `bank_features.supports_single_payment.value` (boolean)
    Filters for banks that support single immediate payments.

  - `bank_features.supports_variable_recurring_payment.value` (boolean)
    Filters for banks that support variable recurring payments.

  - `memberId` (string)
    The Token.io-assigned member id of the TPP.
    Example: "m:nP4w3u5y8ddrxDJkjimgSX9e4fZ:5zKtXEAq"

  - `supportedPaymentNetworks` (array)
    Filters for banks that support any of the listed payment networks.
    Example: ["SEPA"]

## Response 200 fields (application/json):

  - `countries` (array)
    Two-letter country codes in upper case (ISO 3166-1 alpha-2).
    Example: ["RO, AT, DE, FR"]

## Response 400 fields (application/json):

  - `error` (object)
    The request does not have valid authentication credentials needed to perform the operation.

  - `error.message` (string)
    A description of the error.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 401 fields (application/json):

  - `error` (object)
    The request does not have valid authentication credentials needed to perform the operation.

  - `error.message` (string)
    A description of the error.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 403 fields (application/json):

  - `error` (object, required)
    The error returned when the member is not authorized to perform the given operation: PermissionDenied. This error message will be accompanied by the reason from the bank. Typically this means the access token has expired and the user must re-authenticate with the bank.

  - `error.errorCode` (string, required)
    A textual error code categorising the error.
    Example: "InternalServerError"

  - `error.message` (string, required)
    A description of the error that occurred and a possible way to fix it.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 404 fields (application/json):

  - `error` (object, required)
    The error object returned when given payment cannot be found: ResourceNotFound.

  - `error.errorCode` (string, required)
    A textual error code categorising the error.
    Example: "InternalServerError"

  - `error.paymentId` (string, required)
    The requested entity, the paymentID, was not found.
    Example: "pm2:12345abcd:abcde"

  - `error.message` (string, required)
    A description of the error that occurred and a possible way to fix it.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 429 fields (application/json):

  - `error` (object, required)
    Resource exhausted. Too many requests.

  - `error.errorCode` (string, required)
    A textual error code categorising the error.
    Example: "InternalServerError"

  - `error.paymentId` (string, required)
    The maximum number of requests has been reached.
    Example: "Resource exhausted. Check quota."

  - `error.message` (string, required)
    A description of the error that occurred and a possible way to fix it.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 500 fields (application/json):

  - `error` (object)
    This could refer to either an error by the payment service provider or the bank. When the bank reports a 5xx error, "token-external-error": "true" is set as a header in the HTTP response, indicating that the "internal" error originates from the bank. When one of the payment service providers internal services fails or when the bank reports a 4xx error, this header is not populated. The absence of this response header should be interpreted as "token-external-error": "false".

  - `error.errorCode` (string, required)
    This is a textual error code categorising the error.
    Example: "InternalServerError"

  - `error.message` (string, required)
    A description of the error.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 501 fields (application/json):

  - `error` (object, required)
    The operation was not implemented, supported or enabled by the bank.

  - `error.errorCode` (string, required)
    A textual error code categorising the error.
    Example: "InternalServerError"

  - `error.paymentId` (string, required)
    The operation was not implemented,supported or enabled by the bank.
    Example: "Not implemented."

  - `error.message` (string, required)
    A description of the error that occurred and a possible way to fix it.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 503 fields (application/json):

  - `error` (object, required)
    Service is unavailable, likely due to a transient condition; this is usually corrected with a retry.

  - `error.errorCode` (string, required)
    A textual error code categorising the error.
    Example: "InternalServerError"

  - `error.paymentId` (string, required)
    The service is unavailable, likely due to a transient condition; this is usually corrected with a retry.
    Example: "Unavailable"

  - `error.message` (string, required)
    A description of the error that occurred and a possible way to fix it.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"

## Response 504 fields (application/json):

  - `error` (object, required)
    The deadline expired before the operation could complete.

  - `error.errorCode` (string, required)
    A textual error code categorising the error.
    Example: "InternalServerError"

  - `error.paymentId` (string, required)
    The deadline expired before the operation could complete.
    Example: "Deadline exceeded."

  - `error.message` (string, required)
    A description of the error that occurred and a possible way to fix it.
    Example: "This is a description of the error."

  - `error.tokenTraceId` (string)
    The trace identifier for the given call.
    Example: "5678912345"


