POST: http://www.sitename.com/api_seller_products_others.php?action=update_products_contacts
Header Parameter | Format |
Token | base64_encode() |
Secret | base64_encode() |
base64_encode() |
Parameter | Format | Description |
pc_id | JSON |
PC ID |
answer | JSON | Only number is required Format: varchar(255) * FIELD REQUIRED |
PHP Sample
// sample edit products contacts $url = $domain_url . '/api_seller_products_others.php?action=update_products_contacts'; $data = array("pc_id" => $_GET['pc_id'], // PC ID (Only number is required) * FIELD REQUIRED "answer" => $_GET['answer'] // The answer ); $data_string = json_encode($data); $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 edit products contacts eof
Return Error:
code
message
Return Success:
code
pc_id
message