الطلبات
ضيف ملاحظة للطلب
بتضيف ملاحظة في سجل الطلب في لوحة التاجر (العميل مش بيشوفها).
POST
https://elmatajer.com/api/v1/vendor/orders/{id}/notesالصلاحية:
orders.writeمتغيرات الرابط
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | integer | نعم | رقم الطلب الداخلي. |
محتوى الطلب
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
note | string | نعم | لحد 1000 حرف. |
الطلب
curl -X POST "https://elmatajer.com/api/v1/vendor/orders/4904/notes" \
-H "Api-Key: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"note":"Picked up by the courier — AWB 778201"}'
const res = await fetch("https://elmatajer.com/api/v1/vendor/orders/4904/notes", {
method: "POST",
headers: {
"Api-Key": process.env.ELMATAJER_API_KEY,
"Accept": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
"note": "Picked up by the courier — AWB 778201"
})
});
const data = await res.json();
$ch = curl_init("https://elmatajer.com/api/v1/vendor/orders/4904/notes");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Api-Key: " . getenv('ELMATAJER_API_KEY'), "Accept: application/json", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'note' => 'Picked up by the courier — AWB 778201'
]),
]);
$data = json_decode(curl_exec($ch), true);
الرد 200
{
"status": "ok",
"data": {
"id": 322,
"order_id": 4904,
"note": "Picked up by the courier — AWB 778201"
}
}