Customers
Get a customer
One customer with their last 30 orders.
GET
https://elmatajer.com/api/v1/vendor/customers/{id}Permission:
customers.readPath parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The customer id. |
Request
curl "https://elmatajer.com/api/v1/vendor/customers/4904" \
-H "Api-Key: YOUR_API_KEY" \
-H "Accept: application/json"
const res = await fetch("https://elmatajer.com/api/v1/vendor/customers/4904", {
method: "GET",
headers: {
"Api-Key": process.env.ELMATAJER_API_KEY,
"Accept": "application/json"
}
});
const data = await res.json();
$ch = curl_init("https://elmatajer.com/api/v1/vendor/customers/4904");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Api-Key: " . getenv('ELMATAJER_API_KEY'), "Accept: application/json"],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
"status": "ok",
"data": {
"id": 5801,
"name": "Sara Elsayed",
"orders_count": 3,
"total_spent": 1240,
"avg_order": 413.32999999999998408384271897375583648681640625,
"orders": [
{
"id": 4844,
"order_number": "IOY491",
"grand_total": 436,
"status_type": 4,
"paid": true,
"created_at": "2026-10-18 12:33:31"
}
]
}
}