Skip to main content
added 2 characters in body
Source Link

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

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

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

deleted 2 characters in body
Source Link

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

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

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

Source Link

How to use the rest api without body data

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