الطلبات
حالات الطلب
كل طلب في نوع من ستة أنواع. status_type في الردود والفلترة هو الرقم ده؛ والاسم هو اللي المتجر مسمّيه.
GET
https://elmatajer.com/api/v1/vendor/orders/statusesالصلاحية:
orders.readالطلب
curl "https://elmatajer.com/api/v1/vendor/orders/statuses" \
-H "Api-Key: YOUR_API_KEY" \
-H "Accept: application/json"
const res = await fetch("https://elmatajer.com/api/v1/vendor/orders/statuses", {
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/orders/statuses");
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": 1,
"type": 1,
"name": "Under review"
},
{
"id": 2,
"type": 2,
"name": "Preparing"
},
{
"id": 3,
"type": 3,
"name": "Shipped"
},
{
"id": 4,
"type": 4,
"name": "Delivered"
},
{
"id": 5,
"type": 5,
"name": "Cancelled"
},
{
"id": 6,
"type": 6,
"name": "Returned"
}
]
}
| النوع | الاسم في غيّر حالة الطلب | المعنى |
|---|---|---|
| 1 | pending |
جديد، قيد المراجعة |
| 2 | processing |
اتأكد، بيتجهّز |
| 3 | shipped |
مع شركة الشحن |
| 4 | delivered |
اتسلّم |
| 5 | cancelled |
اتلغى |
| 6 | returned |
مرتجع |