Get Customer
The Get Customer endpoint allows you to retrieve details of a specific customer by their customer code.
Endpoint
GET https://api.cashonrails.com/api/v1/customer/{customer_code}
Request Headers
| Header | Type | Description |
|---|---|---|
| Authorization | string | Bearer token with your secret key |
Sample Request
GET https://api.cashonrails.com/api/v1/customer/CUS_dcoo3papxzfu3gsSample cURL Request
curl --location 'https://api.cashonrails.com/api/v1/customer/CUS_dcoo3papxzfu3gs' \
--header 'Authorization: Bearer sk_test_0123456789abcdefghijkl'Sample Response
{
"status": true,
"message": "Customer retrieved",
"data": {
"id": 1,
"account_name": "Ria Madini Fashion Store",
"first_name": "John",
"last_name": "Doe",
"email": "johndoe@gmail.com",
"phone": "08023456542",
"nin": "",
"address": "No 23, Emeks Street",
"dob": "",
"customer_code": "CUS_dcoo3papxzfu3gs",
"metadata": "{}",
"domain": "test",
"status": "active",
"created_at": "2024-12-21T15:19:35.000000Z",
"updated_at": "2024-12-20T17:51:20.000000Z"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| id | int | The customer’s unique identifier |
| account_name | string | The name of the customer’s account |
| 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 |
| 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’s unique code |
| metadata | string | Additional information about the customer |
| domain | string | The domain of the customer |
| status | string | The status of the customer |
| created_at | string | The date and time the customer was created |
| updated_at | string | The date and time the customer was last updated |
Last updated on