I have rest API URL but how to run the in rest API.
$service_url='http://testing.com/data/rest/Masters/CheckPartnerId?Key=121&Type=CREATE&PartnerId=13&BrandId=67&StoreId=main_website_store&ValidateId=Mpnid&[email protected]';
try {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $service_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
// curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
$response1 = json_decode($response, true);
echo '<pre>'; print_r($response1); exit;
} catch (Exception $e) {
echo $e->getMessage();
//$debugshipData['result'] = array('error' => $e->getMessage(), 'code' => $e->getCode());
}
Can you please help me