العملاء
كل العملاء
كل اللي سجّل في المتجر أو طلب منه، ومعاهم عدد طلباتهم واللي دفعوه.
GET
https://elmatajer.com/api/v1/vendor/customersالصلاحية:
customers.readمتغيرات البحث
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
q | string | لا | بحث بالاسم أو الإيميل أو الموبايل. |
segment | string | لا | star (4 طلبات أو أكتر) أو loyal (2–3) أو first أو none أو missed (مطلبش من 60 يوم).
|
الطلب
curl "https://elmatajer.com/api/v1/vendor/customers" \
-H "Api-Key: YOUR_API_KEY" \
-H "Accept: application/json"
const res = await fetch("https://elmatajer.com/api/v1/vendor/customers", {
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");
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);
الرد 200
{
"status": "ok",
"data": [
{
"id": 5801,
"name": "Sara Elsayed",
"email": "sara@example.com",
"mobile": "01000000113",
"wa": "201000000113",
"orders_count": 3,
"total_spent": 1240,
"currency": "ج.م",
"currency_code": "EGP",
"last_order_at": "2026-10-28 03:46:12",
"joined_at": "2026-10-25T17:19:00+03:00",
"segment": "loyal"
}
],
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 20,
"total": 48,
"has_more": true
}
}