title: How to integrate third party api in my site magento
body: <p>I am using Magento ver. 1.9.2.1.
  I don't have any idea to integrate third party api in magento. I have to integrate the api for website.com, for that they provide the login details and a doc.
  In that doc, it is mentioned to integrate</p>
  <pre><code>1. Search Service Availability API
  2. Order Creation API
  3. Tracking API
  </code></pre>
  <p>For each above API, they provide code,details and json response.
  I have created a user and role from admin. And create a file <code>test.php</code> in root folder and put their code and checked in browser, but it shows blank</p>
  <p>Given code in doc for Search Service Availability API:</p>
  <pre><code>&lt;?php
  
  ob_start();
  
  error_reporting( 0 );
  
  ini_set('display_errors', 'off');
  
  $pickup_pincode = ‘110001’ // pass pincode
  
  $delivery_pincode =’110001’; // Pass the Parameters Here pincode
  
  $service=’Online’ // Cod or Online
  
  $weight=’1’ // pass weight
  
  $service_name = ‘Standard’ // standard / Priority / Economy
  
  $request_url ='http://avnbiz.co.in/test/AVNBIZ/webservice/test_search_service.php';
  
  $post_data =
  
  '&amp;pickup_pincode=$pickup_pincode&amp;delivery_pincode=$delivery_pincode&amp;weight=$w
  
  eight&amp;service=$service&amp;service_name=$service_name'';
  
  $post = curl_init();
  
  curl_setopt($post, CURLOPT_URL, $request_url);
  
  curl_setopt($post, CURLOPT_POST,TRUE);
  
  curl_setopt($post, CURLOPT_POSTFIELDS, $post_data);
  
  curl_setopt($post, CURLOPT_RETURNTRANSFER, TRUE);
  
  $response = curl_exec($post);
  
  curl_close($post);
  
  print_r($response);
  
  $result = json_decode($response, true);
  
  print_r($result);
  
  ?&gt;
  </code></pre>
  <p>response</p>
  <pre><code>[{&quot;Service Name&quot;:&quot;Standard&quot;,&quot;partner_id&quot;:&quot;2&quot;,&quot;partner_name&quot;:&quot;DOT 
  
  ZOT&quot;,&quot;price&quot;:&quot;0&quot;,&quot;status&quot;:&quot;PRICE NOT AVAILABLE &quot;},{&quot;Service 
  
  Name&quot;:&quot;Standard&quot;,&quot;partner_id&quot;:&quot;9&quot;,&quot;partner_name&quot;:&quot;GATI&quot;,&quot;price&quot;:&quot;0&quot;,&quot;status&quot;:&quot;PRICE 
  
  NOT AVAILABLE &quot;},{&quot;Service 
  
  Name&quot;:&quot;Standard&quot;,&quot;partner_id&quot;:&quot;324&quot;,&quot;partner_name&quot;:&quot;Fedex TSCI Pvt 
  
  Ltd&quot;,&quot;price&quot;:&quot;50&quot;,&quot;status&quot;:&quot;Success&quot;},{&quot;Service 
  
  Name&quot;:&quot;Standard&quot;,&quot;partner_id&quot;:&quot;327&quot;,&quot;partner_name&quot;:&quot;GATIKWE EXPRESS PVT 
  
  LTD&quot;,&quot;price&quot;:&quot;50&quot;,&quot;status&quot;:&quot;Success&quot;},{&quot;Service 
  
  Name&quot;:&quot;Standard&quot;,&quot;partner_id&quot;:&quot;335&quot;,&quot;partner_name&quot;:&quot;demo&quot;,&quot;status&quot;:&quot;NO SERVICE 
  
  AVAILABLE&quot;}]
  </code></pre>
  <p>If anyone has any idea, please let me know where I am making a mistake.</p>