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

# List all customers

> Retrieve customers for your business. Supports optional exact-match filters on `email`, `id_number`, `registration_number`, `verification_status`, and `type`, and opt-in pagination via `paginate=true`. Filters and pagination compose.

When `paginate` is omitted or not truthy, the response shape is unchanged (`{message, data: [...]}`). When `paginate=true`, the response is a paginated envelope (`{message, data: [...], links: {...}, meta: {...}}`) with 15 items per page. Use the `?page=N` query string (in addition to `paginate=true`) to fetch subsequent pages.

**Ordering:** the paginated path returns results newest-first (by `created_at` descending). The default unpaginated path preserves the legacy database-order semantics for backwards compatibility — if you need a guaranteed order, opt in to `paginate=true`.

Required scope: `customer:read`.



## OpenAPI

````yaml /api-reference/customer/list-openapi.json get /api/external/customer
openapi: 3.1.0
info:
  title: Blaaiz Platform API - List Customers
  version: 1.0.0
  description: >-
    Retrieve customers for your business with optional exact-match filters and
    opt-in pagination. By default the response shape is unchanged (`{message,
    data: [...]}`); pass `paginate=true` to receive a paginated envelope with
    `data`, `links`, and `meta`.
servers:
  - url: https://api-prod.blaaiz.com
  - url: https://api-dev.blaaiz.com
security: []
tags:
  - name: Customer
paths:
  /api/external/customer:
    get:
      tags:
        - Customer
      summary: List all customers
      description: >-
        Retrieve customers for your business. Supports optional exact-match
        filters on `email`, `id_number`, `registration_number`,
        `verification_status`, and `type`, and opt-in pagination via
        `paginate=true`. Filters and pagination compose.


        When `paginate` is omitted or not truthy, the response shape is
        unchanged (`{message, data: [...]}`). When `paginate=true`, the response
        is a paginated envelope (`{message, data: [...], links: {...}, meta:
        {...}}`) with 15 items per page. Use the `?page=N` query string (in
        addition to `paginate=true`) to fetch subsequent pages.


        **Ordering:** the paginated path returns results newest-first (by
        `created_at` descending). The default unpaginated path preserves the
        legacy database-order semantics for backwards compatibility — if you
        need a guaranteed order, opt in to `paginate=true`.


        Required scope: `customer:read`.
      parameters:
        - name: email
          in: query
          required: false
          description: >-
            Exact-match filter on customer email. Validated as a plain string
            (not the `email` rule) so any value you successfully created the
            customer with is recoverable.
          schema:
            type: string
        - name: id_number
          in: query
          required: false
          description: Exact-match filter on the customer's government-issued ID number.
          schema:
            type: string
        - name: registration_number
          in: query
          required: false
          description: >-
            Exact-match filter on the business customer's registration /
            incorporation number.
          schema:
            type: string
        - name: verification_status
          in: query
          required: false
          description: >-
            Filter by verification status. Lowercase input is normalized to
            upper-case.
          schema:
            type: string
            enum:
              - PENDING
              - PROCESSING
              - VERIFIED
              - REJECTED
        - name: type
          in: query
          required: false
          description: >-
            Filter by customer type. Upper-case input is normalized to
            lower-case.
          schema:
            type: string
            enum:
              - individual
              - business
        - name: paginate
          in: query
          required: false
          description: >-
            Opt in to the paginated response shape. Pass `true` (or any truthy
            value, e.g. `1`) to receive `{message, data, links, meta}` with 15
            items per page. Any other value — or omitting the parameter —
            returns the legacy `{message, data}` shape unchanged.
          schema:
            type: boolean
          example: true
        - name: page
          in: query
          required: false
          description: >-
            Page number to fetch when `paginate=true`. Defaults to `1`. Ignored
            when pagination is not enabled.
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: >-
            Customers retrieved successfully. The response body is the legacy
            `CustomerListResponse` shape by default, and the
            `PaginatedCustomerListResponse` shape when `paginate=true` was sent.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CustomerListResponse'
                  - $ref: '#/components/schemas/PaginatedCustomerListResponse'
              examples:
                default_unpaginated:
                  summary: Default response (no `paginate` query param)
                  value:
                    message: Customers retrieved successfully.
                    data:
                      - id: customer_123
                        type: individual
                        first_name: John
                        last_name: Doe
                        business_name: null
                        registration_number: null
                        id_number: A01234567
                        email: john@example.com
                        phone: '+2348012345678'
                        verification_status: VERIFIED
                        created_at: '2026-01-15T10:30:00Z'
                      - id: customer_456
                        type: business
                        first_name: null
                        last_name: null
                        business_name: Acme Corp
                        registration_number: RC1234567
                        id_number: null
                        email: contact@acme.com
                        phone: '+2348012345679'
                        verification_status: VERIFIED
                        created_at: '2026-01-14T09:20:00Z'
                filtered_by_id_number:
                  summary: Filtered by `id_number` (default shape)
                  value:
                    message: Customers retrieved successfully.
                    data:
                      - id: customer_123
                        type: individual
                        first_name: John
                        last_name: Doe
                        business_name: null
                        registration_number: null
                        id_number: A01234567
                        email: john@example.com
                        phone: '+2348012345678'
                        verification_status: VERIFIED
                        created_at: '2026-01-15T10:30:00Z'
                paginated:
                  summary: Paginated response (`paginate=true`)
                  value:
                    message: Customers retrieved successfully.
                    data:
                      - id: customer_123
                        type: individual
                        first_name: John
                        last_name: Doe
                        business_name: null
                        registration_number: null
                        id_number: A01234567
                        email: john@example.com
                        phone: '+2348012345678'
                        verification_status: VERIFIED
                        created_at: '2026-01-15T10:30:00Z'
                    links:
                      first: https://api-prod.blaaiz.com/api/external/customer?page=1
                      last: https://api-prod.blaaiz.com/api/external/customer?page=4
                      prev: null
                      next: https://api-prod.blaaiz.com/api/external/customer?page=2
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 4
                      path: https://api-prod.blaaiz.com/api/external/customer
                      per_page: 15
                      to: 15
                      total: 53
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status: false
                message: Invalid or missing access token
        '422':
          description: >-
            Validation failed. Returned when `verification_status` or `type` is
            set to a value outside the allowed enum.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              example:
                message: The given data was invalid.
                errors:
                  verification_status:
                    - The selected verification status is invalid.
                  type:
                    - The selected type is invalid.
      security:
        - oauth2ClientCredentials:
            - customer:read
components:
  schemas:
    CustomerListResponse:
      type: object
      description: >-
        Default (unpaginated) response shape returned when `paginate` is omitted
        or not truthy.
      properties:
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerSummary'
      required:
        - message
        - data
    PaginatedCustomerListResponse:
      type: object
      description: >-
        Paginated response shape returned when `paginate=true` is sent. Page
        size is fixed at 15.
      properties:
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerSummary'
        links:
          $ref: '#/components/schemas/PaginationLinks'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - message
        - data
        - links
        - meta
    Error:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
      required:
        - status
        - message
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
    CustomerSummary:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - individual
            - business
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        business_name:
          type: string
          nullable: true
        registration_number:
          type: string
          nullable: true
          description: >-
            Business registration / incorporation number. Always null for
            individuals.
        id_number:
          type: string
          nullable: true
          description: >-
            Government-issued ID number on file. Set for individual customers;
            typically null for business customers, which identify via
            `registration_number` + `incorporation_country`.
        email:
          type: string
        phone:
          type: string
          nullable: true
        verification_status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - VERIFIED
            - REJECTED
        created_at:
          type: string
          format: date-time
      required:
        - id
        - type
        - email
        - verification_status
        - created_at
    PaginationLinks:
      type: object
      properties:
        first:
          type:
            - string
            - 'null'
        last:
          type:
            - string
            - 'null'
        prev:
          type:
            - string
            - 'null'
        next:
          type:
            - string
            - 'null'
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
        from:
          type:
            - integer
            - 'null'
        last_page:
          type: integer
        path:
          type: string
        per_page:
          type: integer
          description: Page size. Fixed at 15.
        to:
          type:
            - integer
            - 'null'
        total:
          type: integer
  securitySchemes:
    oauth2ClientCredentials:
      type: oauth2
      description: >-
        Use your OAuth client credentials to obtain a short-lived Bearer token
        from POST /oauth/token.
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            customer:read: Read customers.

````