Skip to main content

Endpoint

GET /clients/business/customers

Headers

Authorization
string
required
Bearer YOUR_ACCESS_TOKEN
SECRET_KEY
string
required
Your API secret key.
businessId
string
required
The ID of the business whose customers you want to list.

Query parameters

page
integer
Page number. Defaults to 1.
limit
integer
Records per page. Defaults to 10.
See Pagination for full usage.

Response

status
boolean
true on success.
message
string
Human-readable outcome.
data
array
Array of customer objects.
data[].id
string
Unique customer ID.
data[].name
string
Full name of the customer.
data[].phoneNo
string
Customer’s phone number.
data[].email
string
Customer’s email address.
data[].dateCreated
string
ISO 8601 timestamp of when the customer record was created.
data[].nuban
string
The NUBAN account number assigned to this customer.
pagination
object
Standard pagination envelope. See Pagination.

Code examples

curl -X GET "https://sandbox.stellasbank.com/api/v1/clients/business/customers?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "SECRET_KEY: YOUR_SECRET_KEY" \
  -H "businessId: YOUR_BUSINESS_ID"

Example response

{
  "status": true,
  "message": "Customers retrieved successfully",
  "data": [
    {
      "id": "cust_001",
      "name": "Grace Hopper",
      "phoneNo": "+2348098765432",
      "email": "grace@example.com",
      "dateCreated": "2024-03-15T10:30:00.000Z",
      "nuban": "9876543210"
    }
  ],
  "pagination": {
    "totalCount": 50,
    "hasNextPage": true,
    "hasPreviousPage": false,
    "nextPage": 2,
    "previousPage": 0,
    "limit": 10,
    "lastPage": 5
  }
}