Services Introduction:
بمزإمنة بيانات نظام إلعميل مع نظام خلل ، www.shopv.com API وإلتي تسمح يصف هذإ إلمستند نقاط إلتكامل إلمتاحة للعملء منwww.shopv.com
عنوإن إلوإجهة:
https://api.shopv.com/order-create
طريقة إلطلب:
POST
طلب معلمات (رؤوس):
طلب إلمعلمات (bodyParam):
حالة إلطلب:
<?php
$ch = curl_init();
$url = 'https://api.shopv.com/order-cancel';
$header = array(
'Content-Type:application/x-www-form-urlencoded',
'apikey: your apikey',
);
$post_data = array(
'order_id' => '100001',
'remark' => 'test'
);
// Add apikey to header
curl_setopt($ch, CURLOPT_HTTPHEADER , $header);
// Add post_data to bodyParam
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// HTTP request
curl_setopt($ch , CURLOPT_URL , $url);
$res = curl_exec($ch);
var_dump(json_decode($res));
?>
JSON مثال على إرجاع:
{
"code": 0,
"msg": "success",
"data": null
}
ملحظة:
The cancel API call to cancel any orders before shipment.
رسالة خطأ: