Skip to Content
CustomersFetch Customers

Get Customers

The Get Customers endpoint allows you to retrieve a list of all customers.

Endpoint

GET https://api.cashonrails.com/api/v1/customer

Request Headers

HeaderTypeDescription
AuthorizationstringBearer token with your secret key

Sample Request

GET https://api.cashonrails.com/api/v1/customer

Sample cURL Request

curl -X GET https://api.cashonrails.com/api/v1/customer \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_SECRET_KEY"

Sample Response

{ "status": true, "message": "Customers retrieved", "data": [ { "id": 1, "account_name": "Ria Madini Fashion Store", "first_name": "John", "last_name": "Doe", "email": "johndoe@gmail.com", "phone": "08023456542", "bvn": "2200000009", "nin": "", "address": "No 23, Emeks Street", "dob": "", "customer_code": "CUS_dcoo3papxzfu3gs", "metadata": "{}", "domain": "test", "created_at": "2024-12-21T15:19:35.000000Z", "updated_at": "2024-12-20T17:51:20.000000Z" }, // ... more customers ], "pagination": { "total": 1, "current_page": 1, "per_page": 10 } }

Response Fields

FieldTypeDescription
statusbooleanIndicates if the request was successful
messagestringHuman-readable response message
dataarrayContains the list of customers
paginationobjectPagination metadata
idintegerThe customer’s ID
account_namestringThe account name of the customer
first_namestringThe first name of the customer
last_namestringThe last name of the customer
emailstringThe email address of the customer
phonestringThe phone number of the customer
bvnstringThe Bank Verification Number
ninstringThe National Identification Number
addressstringThe address of the customer
dobstringThe date of birth of the customer
customer_codestringThe customer code
metadatastringAdditional information about the customer
domainstringThe domain of the customer
created_atstringThe date the customer was created
Last updated on