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
| Header | Type | Description |
|---|---|---|
| Authorization | string | Bearer token with your secret key |
Sample Request
GET https://api.cashonrails.com/api/v1/customerSample 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
| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates if the request was successful |
| message | string | Human-readable response message |
| data | array | Contains the list of customers |
| pagination | object | Pagination metadata |
| id | integer | The customer’s ID |
| account_name | string | The account name of the customer |
| first_name | string | The first name of the customer |
| last_name | string | The last name of the customer |
| string | The email address of the customer | |
| phone | string | The phone number of the customer |
| bvn | string | The Bank Verification Number |
| nin | string | The National Identification Number |
| address | string | The address of the customer |
| dob | string | The date of birth of the customer |
| customer_code | string | The customer code |
| metadata | string | Additional information about the customer |
| domain | string | The domain of the customer |
| created_at | string | The date the customer was created |
Last updated on