How to delete products in promotions via API?
Post: http://www.namedoseusite.com.br/api_seller_products_edit.php?action=delete_Product_specials
Header Parameter | format |
token | base64_encode () |
Secret | base64_encode () |
base64_encode () |
Parameter | format | description |
Products_id | json |
Product ID |
php sample
// sample delete product Specials$ URL = $ tabain_url. ' /API_SELLER_PRODUCTS_OTHERS.PHP? Action = delete_Product_specials ' ;;
$ data = array ("Products_id" = & gt; $ _get [' Products_id '] // Products ID (Only Number Is Required) * Field Required
);$ data_string = json_encode ($ date);
$ CH = curl_init ($ URL);
Curl_Setopt ($ CH, curlopt_customrequest, "post");
Curl_Setopt ($ CH, Curlopt_postFields, $ Data_String);
Curl_Setopt ($ CH, Curlopt_Returntransfer, True);
curl_setopt ($ CH, curlopt_ssl_verifypeer, false);
Curl_Setopt ($ CH, Curlopt_httpheader, Array (
' CONTENT-TYPE: Application/JSON ',
"Cache-Control: No-Cache",
' TOKEN: ' . base64_encode ($ token),
' Secret: ' . base64_encode ($ secret),
' E-mail: ' . base64_encode ($ email),
' CONTENT-LENGTH: ' . Strlen ($ data_string)))
);$ result = curl_exec ($ CH);
Curl_Close ($ CH);print_r ($ result);
// sample Delete Product Specials Eof
Return Error:
Code
MessageReturn Success:
Code
Message