Orders
Order statuses
Every order is in one of six lifecycle types. status_type in responses and filters is this number; the name is what the store calls it.
GET
https://elmatajer.com/api/v1/vendor/orders/statusesPermission:
orders.readRequest
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);
Response 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"
}
]
}
| Type | Name in Update order status | Meaning |
|---|---|---|
| 1 | pending |
New, under review |
| 2 | processing |
Confirmed, being prepared |
| 3 | shipped |
With the courier |
| 4 | delivered |
Delivered |
| 5 | cancelled |
Cancelled |
| 6 | returned |
Returned |