---
title: List all banks
slug: list-all-banks
docTags: 
createdAt: 2023-11-01T09:07:09.656Z
---

{
  "id": "pdD5RQ7xB_1_DCcu9YO61",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/client/v1/bank",
    "name": "List all banks",
    "description": "<p>The document explains how to retrieve a list of banks. The banks are returned in sorted alphabetical order. The response from the API call includes a message indicating that the banks have been retrieved, along with the details of the banks, such as the bank_name, bank_code, and country.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "X-CLIENT-ID",
          "type": "string",
          "description": "Your client ID"
        },
        {
          "kind": "required",
          "name": "X-SIGNATURE",
          "type": "string",
          "description": "The base64 encoded signature"
        },
        {
          "kind": "required",
          "name": "X-TIMESTAMP",
          "type": "string",
          "description": "The timestamp"
        },
        {
          "kind": "required",
          "name": "X-NONCE",
          "type": "string",
          "description": "The Nonce"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "country_code",
          "description": "<p>A Two-letter ISO country code. Defaults to 'NG'</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "banks retrieved",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "banks retrieved",
            "customType": "clientApi.ListBanksRequestSuccessful",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "modelRef": "#/definitions/clientApi.Bank",
                "customType": "clientApi.Bank[]",
                "schema": [
                  {
                    "name": "bank_name",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "bank_code",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "country",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ]
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "example": "",
                "default": "banks retrieved"
              }
            ],
            "modelRef": "#/definitions/clientApi.ListBanksRequestSuccessful",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "E3OPzuFkVHpkF8kcLU1Eb",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /client/v1/bank \\\n     --header 'accept: application/json' \\\n     --header 'x-client-id: string' \\\n     --header 'x-signature: string' \\\n     --header 'x-timestamp: string' \\\n     --header 'x-nonce: string'"
        },
        {
          "id": "2DBwPwOS2zoAVmjSbzxiU",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-client-id\", \"string\");\nmyHeaders.append(\"x-signature\", \"string\");\nmyHeaders.append(\"x-timestamp\", \"string\");\nmyHeaders.append(\"x-nonce\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/client/v1/bank\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "eiwQ9lJUQeOs8yfn6eu5A",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/client/v1/bank\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-client-id\"] = \"string\"\nrequest[\"x-signature\"] = \"string\"\nrequest[\"x-timestamp\"] = \"string\"\nrequest[\"x-nonce\"] = \"string\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "enlaDOGlMJWqckWFDk4zn",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/client/v1/bank\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-client-id': 'string',\n   'x-signature': 'string',\n   'x-timestamp': 'string',\n   'x-nonce': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "E3OPzuFkVHpkF8kcLU1Eb"
    },
    "results": {
      "languages": [
        {
          "id": "f0deRyHBjVADGsykIXZSl",
          "language": "200",
          "code": "// banks retrieved\n{\n  \"data\": [\n    {\n      \"bank_name\": \"\",\n      \"bank_code\": \"\",\n      \"country\": \"\"\n    }\n  ],\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "f0deRyHBjVADGsykIXZSl"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}