How to add highlighted products via API?

Post: http://www.namedoseusite.com.br/api_seller_products_edit.php?af?





Header Parameter format
token base64_encode ()
Secret base64_encode ()
email base64_encode ()




Parameter format description
Products_id json

Product ID
Only Number is Required
Format: int (11)
* Field Required

Total_days json Example: 5, 10, 15, 20, 25 or 30
* Field Required

php sample

 // sample add product featured

$ URL = $ tabain_url. ' /API_SELLER_PRODUCTS_OTHERS.PHP? Action = Add_Product_FEATURED ' ;;

$ data = array ("Products_id" = & gt; $ _get [' Products_id '], // Products ID (Only Number Is Required) * Field Required
"Total_days" = & gt; $ _Get [' Total_days '] // Total Days. 5, 10, 15, 20, 25 or 30 (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 Add Product Featured Eof

Return Error:

Code
Message

Return Success:

Code
Message

Leave a Reply 0