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

# Get Customers

> Fetches existing customer objects according to query parameters.



## OpenAPI

````yaml openapi.json get /customers
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /customers:
    get:
      summary: Get Customers
      description: Fetches existing customer objects according to query parameters.
      operationId: get-customers
      parameters:
        - name: page
          in: query
          description: Specifies the position the response data should begin from.
          schema:
            type: integer
            format: int32
            default: 0
        - name: limit
          in: query
          description: The number of customers to fetch.
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        '200':
          description: Customers fetched successfully.
          headers:
            X-Powered-By:
              schema:
                type: string
              example: Express
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            X-RateLimit-Limit:
              schema:
                type: integer
              example: '250000'
            X-RateLimit-Remaining:
              schema:
                type: integer
              example: '249999'
            X-RateLimit-Reset:
              schema:
                type: integer
              example: '0'
            Content-Type:
              schema:
                type: string
              example: application/json; charset=utf-8
            ETag:
              schema:
                type: string
              example: W/"2dd-sfRBgLV2BqnKnzwqFCi2UGdBgUQ"
            Connection:
              schema:
                type: string
              example: keep-alive
            Keep-Alive:
              schema:
                type: string
              example: timeout=5
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    type: array
                    description: Array of objects for the requested page.
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: Unique identifier of the object.
                        business:
                          type: string
                          description: Identifier of the business that owns this object.
                        type:
                          type: string
                          description: Type of the object.
                        name:
                          type: string
                          description: Display name.
                        status:
                          type: string
                          description: Current status of the object.
                        isApproved:
                          type: boolean
                          description: Whether the customer has passed KYC and is approved.
                        phoneNumber:
                          type: string
                          description: Customer's phone number in international format.
                        emailAddress:
                          type: string
                          description: Customer's email address.
                        individual:
                          type: object
                          description: Details for an individual customer.
                          properties:
                            firstName:
                              type: string
                              description: First name.
                            lastName:
                              type: string
                              description: Last name.
                            otherNames:
                              type: string
                              description: Other names, if any.
                            dob:
                              type: string
                              description: Date of birth (YYYY/MM/DD).
                            identity:
                              type: object
                              description: Customer's verified identity record.
                              properties:
                                type:
                                  type: string
                                  description: Type of the object.
                                number:
                                  type: string
                                  description: Identity / card number value.
                            documents:
                              type: object
                              description: Uploaded KYC document URLs.
                              properties:
                                idFrontUrl:
                                  type: string
                                  description: >-
                                    URL of the front of the customer's ID
                                    document.
                                idBackUrl:
                                  type: string
                                  description: >-
                                    URL of the back of the customer's ID
                                    document.
                                addressVerificationUrl:
                                  type: string
                                  description: >-
                                    URL of the customer's address verification
                                    document.
                        billingAddress:
                          type: object
                          description: Customer's billing address.
                          properties:
                            line1:
                              type: string
                              description: Address line 1.
                            line2:
                              type: string
                              description: Address line 2.
                            city:
                              type: string
                              description: City.
                            state:
                              type: string
                              description: State / region.
                            postalCode:
                              type: string
                              description: Postal / ZIP code.
                            country:
                              type: string
                              description: Country.
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp of when the object was created.
                        updatedAt:
                          type: string
                          format: date-time
                          description: >-
                            ISO 8601 timestamp of when the object was last
                            updated.
                        __v:
                          type: integer
                          description: Internal document version (Mongo).
                  pagination:
                    type: object
                    description: Pagination metadata for the result set.
                    properties:
                      total:
                        type: integer
                        description: >-
                          Total number of records matching the query across all
                          pages.
                      pages:
                        type: integer
                        description: Total number of pages available for the current query.
                      page:
                        type: integer
                        description: >-
                          Current page index (zero-based; matches the `page`
                          query parameter).
                      limit:
                        type: integer
                        description: >-
                          Maximum number of records returned per page (matches
                          the `limit` query parameter).
              example:
                statusCode: 200
                message: Customers fetched successfully.
                data:
                  - _id: 64a1b2c3d4e5f6a7b8c9d0e1
                    business: 63f0a1b2c3d4e5f6a7b8c9d0
                    type: individual
                    name: John Doe
                    status: active
                    isApproved: true
                    phoneNumber: '+2348000000000'
                    emailAddress: johndoe@example.com
                    individual:
                      firstName: John
                      lastName: Doe
                      otherNames: ''
                      dob: 1990/01/01
                      identity:
                        type: BVN
                        number: '22212345678'
                      documents:
                        idFrontUrl: >-
                          https://sudo-documents.s3.amazonaws.com/customers/64a1b2c3d4e5f6a7b8c9d0e1/id-front.png
                        idBackUrl: >-
                          https://sudo-documents.s3.amazonaws.com/customers/64a1b2c3d4e5f6a7b8c9d0e1/id-back.png
                        addressVerificationUrl: >-
                          https://sudo-documents.s3.amazonaws.com/customers/64a1b2c3d4e5f6a7b8c9d0e1/utility-bill.pdf
                    billingAddress:
                      line1: 4 Barnawa Close
                      line2: Off Challawa Crescent
                      city: Barnawa
                      state: Kaduna
                      postalCode: '800243'
                      country: Nigeria
                    createdAt: '2024-09-06T12:34:56.789Z'
                    updatedAt: '2024-09-06T12:34:56.789Z'
                    __v: 0
                pagination:
                  total: 8
                  pages: 1
                  page: 0
                  limit: 50
        '400':
          description: Validation error — invalid query parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Always `null` for error responses.
              example:
                statusCode: 400
                message: Invalid pagination parameters.
                data: null
        '401':
          description: Authentication failed — missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Response payload.
              example:
                statusCode: 401
                message: >-
                  Unauthorized. Provide a valid API key in the Authorization
                  header.
                data: null
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````