POST: http://www.nomedoseusite.com.br/api_products_others.php?action=add_manufacturers
Header Parameter | Format |
Usuario1 | base64_encode() |
Senha1 | base64_encode() |
Parameter | Format | Description |
manufacturers_name | JSON |
Main name of manufacturer |
manufacturers_banner_status | JSON | 1 = ACTIVE or 0 = INACTIVE Only number is required Format: int(1) * FIELD REQUIRED |
manufacturers_description | JSON | Full description of manufacturer Format: text |
manufacturers_url | JSON | URL link of manufacturer Example: http://www.sitename.com Format: varchar(255) |
PHP Sample
// sample add manufacturers $url = $domain_url . '/api_products_others.php?action=add_manufacturers'; $data = array("manufacturers_name" => "Main name of manufacturer", // Main name of manufacturer * FIELD REQUIRED "manufacturers_banner_status" => "1", // 1 = ACTIVE or 0 = INACTIVE (Only number is required) * FIELD REQUIRED "manufacturers_description" => "Full description of manufacturer", // Full description of manufacturer "manufacturers_url" => "URL link of manufacturer" // URL link of manufacturer Example: http://www.sitename.com ); $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", 'Usuario1: ' . base64_encode($usuario1), 'Senha1: ' . base64_encode($senha1), 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); curl_close($ch); print_r($result); // sample add manufacturers eof
Return Error:
code
message
Return Success:
code
id
message