> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcarbon.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Customers

> Retrieve a list of customers with pagination and filtering support.

## Overview

This endpoint retrieves a list of customers with pagination and optional filtering by `gender`, `email`, `bvn`, or `phone`.

### Request

**Method:** `GET`
**URL:** `/v1/customers`

#### Parameters

| Name           | In     | Type      | Required | Description                               |
| -------------- | ------ | --------- | -------- | ----------------------------------------- |
| `x-carbon-key` | Header | `string`  | Yes      | API key for authentication.               |
| `page`         | Query  | `integer` | No       | Page number for pagination.               |
| `limit`        | Query  | `integer` | No       | Number of customers per page.             |
| `gender`       | Query  | `string`  | No       | Filter by gender (e.g. `MALE`, `FEMALE`). |
| `email`        | Query  | `string`  | No       | Filter by customer email address.         |
| `bvn`          | Query  | `string`  | No       | Filter by Bank Verification Number.       |
| `phone`        | Query  | `string`  | No       | Filter by phone number.                   |

### Response

**Status Code:** `200 OK`
**Content-Type:** `application/json`

#### Example Response

```json theme={null}
{
  "status": "success",
  "message": "Customers fetched successfully",
  "data": [
    {
      "id": "1732ca47-42b2-4990-a65d-c369e934eed3",
      "first_name": "adisa",
      "last_name": "cooker",
      "email": "adisa@yahoo.com",
      "phone": "08071000030",
      "gender": "MALE",
      "dob": "1989-12-31T23:00:00.000Z",
      "address": {
        "street": "NO 1 LAGOS ROAD",
        "city": "IKEJA",
        "state": "LAGOS STATE",
        "country": "NIGERIA"
      },
      "nin": "11111111111",
      "bvn": "11111011116",
      "is_business": false,
      "business_name": "",
      "mode": "sandbox",
      "created_at": "2025-08-19T13:24:12+01:00",
      "updated_at": "2025-08-19T13:24:12+01:00"
    }
  ],
  "total": 6,
  "page": 1,
  "limit": 10,
  "filters_applied": {
    "bvn": "11111011116"
  }
}
```

#### Response Fields

| Field             | Type    | Description                        |
| ----------------- | ------- | ---------------------------------- |
| `status`          | string  | Request status (`success`)         |
| `message`         | string  | Human-readable result message      |
| `data`            | array   | List of customer objects           |
| `data[].gender`   | string  | Customer gender (`MALE`, `FEMALE`) |
| `data[].dob`      | string  | Date of birth (ISO 8601)           |
| `data[].address`  | object  | Customer address details           |
| `total`           | integer | Total number of matching customers |
| `page`            | integer | Current page number                |
| `limit`           | integer | Number of results per page         |
| `filters_applied` | object  | Active filters used in the query   |


## OpenAPI

````yaml GET /v1/customers
openapi: 3.0.0
info:
  title: Carbon Business API
  description: >-
    ## Welcome to our API Developer Documentation


    Carbon aims to unlock the full potential of your business with a
    feature-rich account designed for growth.


    ## Integrations


    We aim to provide our APIs for developers and businesses to offer financial
    services to their existing customer base through REST APIs without doing the
    heavy lifting. Our API has predictable resource-oriented URLs, accepts
    form-encoded request bodies, returns JSON-encoded responses, and uses
    standard HTTP response codes, authentication, and verbs.


    ### Authentication


    `Authorization : API Key`


    Header  

    `x-carbon-key : value`


    `x-carbon-key` can be generated via developer page on Carbon Business


    | Environment | URL |

    | --- | --- |

    | Live |  |

    | Sandbox |
    [https://carbonapistagingsecure.getcarbon.co/baas/api](https://carbonapistagingsecure.getcarbon.co/baas/api)
    |


    ### **Handling Errors**


    We use the conventional HTTP response codes to indicate the success or
    failure of an API request.  

    Codes in the 2xx range indicate success. Codes in the 4xx range indicate an
    error that failed given the information provided (e.g., a required parameter
    was omitted, etc.). Codes in the 5xx range indicate an error with our
    servers.


    | Error | Description |

    | --- | --- |

    | 400 - Bad Request | The request was unacceptable, often due to missing a
    required parameter. |

    | 401 - Unauthorized | Not a valid API key was provided. |

    | 402 - Request Failed | The parameters were valid but the request failed. |

    | 403 - Forbidden | The API key doesn't have permission to perform the
    request. |

    | 404 - Not Found | The requested resource doesn't exist. |

    | 429 - Too Many Requests | Too many requests hit the API |

    | 500, 502, 503, 504 - Server Errors | System Error |
  version: 1.0.0
servers:
  - url: https://carbonapistagingsecure.getcarbon.co/baas/api
    description: >-
      Replace {{base_url}} with your API base URL (e.g.,
      https://api.example.com)
security:
  - apikeyAuth: []
tags:
  - name: Accounts
    description: >-
      Virtual accounts are generated account details (account number and bank)
      that allow Carbon Business merchants to receive payments from customers
      via NGN bank transfer. This is currently only available in naira (NGN).


      Virtual accounts are either dynamic (temporary) or static (permanent). A
      dynamic account number expires after handling a transaction, while a
      static account number doesn't expire.


      **Static Account**


      Creating static accounts can be useful when receiving recurring payments
      through bank transfers. The process involves generating a static virtual
      account with customer information. Once payment is made, we will send you
      a webhook notification, which you can then manage.


      **Dynamic Account**


      Creating dynamic accounts can be useful when receiving one-time payments
      through bank transfers. The process involves generating a dynamic virtual
      account with a set amount for the customer during checkout. Once payment
      is made, we will send you a webhook notification, which you can then
      manage.


      Key things you can do with these endpoints:


      - Create an account

      - Retreive an account

      - Verify Transaction

      - Retreive a list of transactions
  - name: Accounts > Transactions
  - name: Banks
    description: |-
      - Get a list of banks and financial institutions
      - Verify/resolve account details
  - name: Customers
    description: >-
      This collection contains a set of API endpoints to manage customer-related
      operations for an application. The endpoints allow for creating a new
      customer, retrieving a list of all customers, and fetching details of a
      single customer.


      - Create Customer
          
      - Fetch Customer/Customers
  - name: Payout
    description: |-
      - Make Transfer
      - Verify Transfer
  - name: Status
    description: '- Service Health check'
  - name: Verification
  - name: Webhook
    description: |-
      ## EVENTS

      `account.incoming-transaction`

      ``` json
      {
          "event": "account.incoming-transaction",
          "data": {
              "id": "string",
              "amount": "float",
              "currency": "string",
              "transactionType": "string",
              "entryDate": "datetime",
              "uniqueRef": "string",
              "account": {
                  "id": "string",
                  "bankAccount": {
                      "accountName": "string",
                      "accountNumber": "string",
                      "bank": {
                          "code": "string",
                          "name": "string"
                      }
                  },
                  "static": boolean,
                  "currency": "string",
                  "clientId": "string"
              }
            }
      }

       ```

      `account.outgoing-transaction`

      ``` json
      {
          "event": "account.outgoing-transaction",
          "data": {
              "id": "string",
              "amount": "float",
              "currency": "string",
              "transactionType": "string",
              "entryDate": "datetime",
              "uniqueRef": "string",
              "account": {
                  "id": "string",
                  "bankAccount": {
                      "accountName": "string",
                      "accountNumber": "string",
                      "bank": {
                          "code": "string",
                          "name": "string"
                      }
                  },
                  "static": boolean,
                  "currency": "string",
                  "clientId": "string"
              }
          }
      }

       ```
  - name: Loans
    description: >-
      Partner lending API. Enables fintech partners to originate business loans
      for their end-customers.


      - Enroll customers for lending and trigger KYC

      - Submit loan applications and supporting documents

      - Manage offer acceptance, disbursement account, and post-offer steps

      - Charge repayments and retrieve repayment schedules
paths:
  /v1/customers:
    get:
      tags:
        - Customers
      summary: Customers
      description: >-
        This endpoint makes an HTTP GET request to retrieve a list of customers
        with pagination support. It fetches a specified page of customer data
        with a limit on the number of results per page.


        ### Request Parameters


        - `page` (integer): Specifies the page number to retrieve.

        - `limit` (integer): Specifies the maximum number of customers to be
        included in the response.
            

        ### Response


        Upon a successful request, the server responds with a status code of 200
        and a JSON object containing the following fields:


        - `status` (string): Indicates the status of the response.

        - `message` (string): Provides additional information about the
        response.

        - `data` (array): Contains customer information including their unique
        identifier, first name, last name, email, phone number, National
        Identification Number (NIN), Bank Verification Number (BVN), business
        status, business name, creation and update timestamps.

        - `total` (string): Represents the total number of customers available.
            

        Example Response:


        ``` json

        {
            "status": "",
            "message": "",
            "data": [
                {
                    "id": "",
                    "first_name": "",
                    "last_name": "",
                    "email": "",
                    "phone": "",
                    "nin": "",
                    "bvn": "",
                    "is_business": true,
                    "business_name": null,
                    "mode": "",
                    "created_at": "",
                    "updated_at": ""
                }
            ],
            "total": ""
        }

         ```
      parameters:
        - name: x-carbon-key
          in: header
          schema:
            type: string
          required: true
          example: '{{access_token}}'
        - name: page
          in: query
          schema:
            type: integer
          example: 1
        - name: limit
          in: query
          schema:
            type: integer
          example: 10
        - name: gender
          in: query
          schema:
            type: string
          required: false
          description: Filter by gender (e.g. MALE, FEMALE)
          example: MALE
        - name: email
          in: query
          schema:
            type: string
          required: false
          description: Filter by customer email address
          example: ola@yahoo.com
        - name: bvn
          in: query
          schema:
            type: string
          required: false
          description: Filter by Bank Verification Number
          example: '11111011116'
        - name: phone
          in: query
          schema:
            type: string
          required: false
          description: Filter by phone number
          example: '08071000030'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                status: success
                message: Customers fetched successfully
                data:
                  - id: 1732ca47-42b2-4990-a65d-c369e934eed3
                    first_name: adisa
                    last_name: cooker
                    email: adisa@yahoo.com
                    phone: '08071000030'
                    gender: MALE
                    dob: '1989-12-31T23:00:00.000Z'
                    address:
                      street: NO 1 LAGOS ROAD
                      city: IKEJA
                      state: LAGOS STATE
                      country: NIGERIA
                    nin: '11111111111'
                    bvn: '11111011116'
                    is_business: false
                    business_name: ''
                    mode: sandbox
                    created_at: '2025-08-19T13:24:12+01:00'
                    updated_at: '2025-08-19T13:24:12+01:00'
                total: 6
                page: 1
                limit: 10
                filters_applied:
                  bvn: '11111011116'
components:
  securitySchemes:
    apikeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Provide your API key in the 'apikey' header.

````