Please let me know how I can get the all products through the Flipkart seller API. I am not able to get this api.
I have tried this but it gives me error:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.flipkart.net/sellers/listings/v3');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$headers = array();
$headers[] = 'Authorization: Bearer xxxxxx-8be7-429c-xxx-xxxx';
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}else{
echo $result;
}
curl_close($ch);
output: {"errors":[{"severity":"ERROR","code":10000,"description":"HTTP 405 Method Not Allowed"}]}
Please help me to get all products.
Thanks in Advance!!
You should read the doc. The error is pretty clear, you're using GET instead of POST for this url endpoint.
Following the doc you can see this section:
https://seller.flipkart.com/api-docs/listing-api-docs/LMAPIRef.html#get-listings-v3-sku-ids
I guess that it's what you want.
And please, do not share your token in a public post.