orderline add
URL :
POST : https://api.megawin.be/orderline/add/
Auth :
API Keys
Paramètre :
guid -> id of the order
arcleunik -> id of the product
qty -> quantity to the cart
arcleunik -> id of the product
qty -> quantity to the cart
Requête :
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.megawin.be/orderline/add/'); $array = array(); $array['guid'] = '000000-000000-000000-000000-000000-00000'; $array['arcleunik'] = '00000'; $array['qty'] = '1'; $data = json_encode($array); $headers = array(); $headers[] = 'X-Api-Key: xxxxxxxxxxxx'; $headers[] = 'Content-Type: application/json'; $headers[] = 'Accept: application/json'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch,CURLOPT_POST, count($data)); curl_setopt($ch,CURLOPT_POSTFIELDS, $data ); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3); curl_setopt($ch,CURLOPT_TIMEOUT, 20); $result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close($ch);
Réponse :
Autres documentation pour orderline :
list
add
delete