Program – Call Flipkart API with PHP Code Example
Solution
<?php //header('Content-Type: application/json'); $tracking_id = "your tracking id"; $token = "your token"; $handle = "https://affiliate-api.flipkart.net/affiliate/api/$tracking_id.json"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $handle); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Fk-Affiliate-Id:{$tracking_id}", "Fk-Affiliate-Token:{$token}" )); $data = json_decode(curl_exec($ch), true); print_r($data);
Now to have idea to get data from flipkart API. If you got any error please comment below.