Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Python Flipkart Marketplace API Client

Project description

Python Flipkart Marketplace API Client


From PYPI:

$ pip install python-flipkart

From source code (advanced users and for development):

$ git clone
$ cd python-flipkart
$ python install

Example Usage

from flipkart import FlipkartAPI, Authentication

auth = Authentication('app id', 'app secret', sandbox=True)
token = auth.get_token_from_client_credentials()

flipkart = FlipkartAPI(token['access_token'], sandbox=True, debug=True)
orders = flipkart.search_orders()

Get listings of a SKU

sku = flipkart.sku('my-special-sku', fsn='TSHDBN3326TEZHQZ')
for listing in sku.listings:
    print listing.attributes['mrp']

Create a listing

sku = flipkart.sku('my-special-sku', fsn='TSHDBN3326TEZHQZ')
listing = sku.create_listing(
print listing.mrp

Update a listing

listing = flipkart.listing('LSTTSHDBN332XDYBZ5MHX30XI')
listing.attributes['mrp'] = 2600

Searching for orders

orders = flipkart.search_orders()

Find only orders of selected SKUs:

orders = flipkart.search_orders(
    filters={'sku': ['my-sku-1', 'my-sku-2']}

Filter by state:

orders = flipkart.search_orders(
    filters={'states': ['Approved']}


For a list of valid state see API documentation

Fetching a specific order item

order_item = flipkart.order_item('1731')

Or to get several order items at once

order_items = flipkart.order_items('1731', '1732')

Once the order is ready to pack, generate a label

label_request = order_item.generate_label(,   # Invoice date
    'INV12345',     # Invoice number

When there are items that need serial numbers

label_request = order_item.generate_label(,   # Invoice date
    'INV12345',     # Invoice number

If the item was dual sim

label_request = order_item.generate_label(,   # Invoice date
    'INV12345',     # Invoice number
    [['IMEI1', 'IMEI2']],

If 2 units of dual sim mobiles

label_request = order_item.generate_label(,   # Invoice date
    'INV12345',     # Invoice number
    [['IMEI1', 'IMEI2'], ['IMEI3', 'IMEI4']],

The response of generate_label is a Label Request. The label request is a lazy API. The status can be refreshed by calling


Once the status is cleared, the item can be shipped out. To get the label to ship call the get_label method to get a PDF of the label and possibly the invoice.

pdf = order_item.get_label()

Once your shipment is ready to be picked by Flipkart logistics partner, call the ready to dispatch API.


Getting shipment details

The Shipments API gives the shipping details for orderitems


the response items can be seen on Flipkart API documentation

Getting Access Token

If you have registered an application with your seller credentials and would like to access resources in your account, you could use the application id and secret alone to do so. The authentication helper in the API gives you a convenient way to get tokens

from auth import Authentication

auth = Authentication(
    '<application id>',
    '<application secret>',
    sandbox=True,           # If you are using sandbox


  • TODO



  • Major update with complete Order Item API
  • Added examples to the README


  • Make version numbers consistent.


  • Renamed package to python-flipkart.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-flipkart, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size python-flipkart-0.2.0.tar.gz (19.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page