3

I want to access API https://seller.flipkart.com/api-docs/listing-api-docs/LMAPIRef.html of this WEBSITE I have already generated token but latter I want Access its LIST of products which I upload on flipkart

Flipkart API documents given billow URL

Example 1 - Create Listing

Success: HTTP code 2xx Seller API of flipkart to access the list of Product using this link Request: https://api.flipkart.net/sellers/skus/SKUID/listings

{
    "skuId": "SKUID",
    "fsn": "FSN",
    "attributeValues": {
        "mrp": "2400",
        "selling_price": "2300",
        "listing_status": "INACTIVE",
        "fulfilled_by": "seller",
        "national_shipping_charge": "20",
        "zonal_shipping_charge": "20",
        "local_shipping_charge": "20",
        "procurement_sla": "3",
        "stock_count": "23"
    }
}

Response:

{
    "status": "success",
    "response": {
        "skuId": "SKUID",
        "listingId": "LISTINGID",
        "status": "created",
        "errors": []
    }
}
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
navin
  • 51
  • 6
  • you seem to have forgotten to a) try anything b) explain what the question is – Paul Collingwood Dec 01 '15 at 11:46
  • sir, actually i want to access API of Flipkart which is E-commerce website of INDIA and To understand my question you will have to open of this link https://seller.flipkart.com/api-docs/listing-api-docs/LMAPIRef.html#postlisting-label – navin Dec 01 '15 at 12:12

1 Answers1

6

$url = "https://api.flipkart.net/oauth-service/oauth/token?grant_type=client_credentials&scope=Seller_Api"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_USERPWD, "app_id:app_secret"); $result = curl_exec($curl); curl_close($curl); $tokan = json_decode($result,true); $url = "https://api.flipkart.net/sellers/v2/orders/search"; $curl = curl_init(); $json = '{ "filter": { "orderDate": { "fromDate": "2016-01-01T19:00:00Z", "toDate": "2016-03-28T19:00:00Z" } } }'; curl_setopt($curl, CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $json); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', 'Authorization:Bearer '.$tokan['access_token'], '' )); $result = curl_exec($curl); $ee = curl_getinfo($curl); echo "<pre>"; //print_r($ee); curl_close($curl); print_r($result);

  • Thanks for posting this answer. But please can you post how can I retrieve shipment detail. Right now, I am trying https://api.flipkart.net/sellers/v2/orders/shipments?orderItemsIds={orderitemid}. But getting error [code] => INVALID_ITEM_IDS. – Sachin Oct 11 '19 at 11:15
  • Hi @Manohar Can you please help me how to generate access token to flipkart api – shivashankar m Nov 19 '19 at 10:39