.. _ordersearch-label: POST /orders/search ------------------- **Description** - The Search Orders API searches order items using specific filters. It gets order items and their details based on the order date, dispatch date, order states, and seller SKU ID. The first call to the Search API returns a finite number of results based on the ``pageSize`` value. Calling the URL returned in the ``nextPageURL`` field of the response gets the subsequent pages of the search result. The response of the Search API contains a list of order items and their sub-items (freebies), to be packed together in one shipment, for which only one label is generated. Request and Response Parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: toggle .. container:: header **☰ SHOW | HIDE** **URL:** ``https://api.flipkart.net/sellers/v2/orders/search`` **Request Body Parameter:** ``filter`` +------------------------+------------+------------+----------------------------------+ |Parameter/Attribute |Type |Requirement | Description | +========================+============+============+==================================+ |* ``orderDate``: | String |Optional |Filter based on orders placed | | | | |within the selected date range, | | - ``fromDate`` | | |where the date strings are in ISO | | - ``toDate`` | | |format | +------------------------+------------+------------+----------------------------------+ |* ``dispatchAfterDate``:| String |Optional |Filter based on orders to be | | | | |processed within the selected | | - ``fromDate`` | | |date range, where the date strings| | - ``toDate`` | | |are in ISO format | +------------------------+------------+------------+----------------------------------+ |* ``dispatchByDate``: | String |Optional |Filter based on orders to be | | | | |dispatched within the selected | | - ``fromDate`` | | |date range, where the date strings| | - ``toDate`` | | |are in ISO format | +------------------------+------------+------------+----------------------------------+ |* ``modifiedDate``: | String |Optional |Filter for orders that were | | | | |modified within the selected date | | - ``fromDate`` | | |range, where the date strings are | | - ``toDate`` | | |in ISO format | +------------------------+------------+------------+----------------------------------+ |``states`` |List|Optional |Filter orders based on a comma | | | | |separated list of valid order | | | | |states. Filtering based on | | | | |processing states is not supported| | | | |now. Possible values: | | | | |``APPROVED``,``PACKED``, | | | | |``READY_TO_DISPATCH``, and | | | | |``CANCELLED`` | +------------------------+------------+------------+----------------------------------+ |``sku`` |List|Optional |Filter orders based on a comma | | | | |separated list of seller SKUs | +------------------------+------------+------------+----------------------------------+ **Request Body Parameter:** ``pagination`` +---------------+-----------+------------+-----------------------------------+ |Parameter |Type |Requirement | Description | +===============+===========+============+===================================+ |``pageSize`` |Numeric |Optional |Number of search results to display| | | | |in one page. Maximum size is 20 | +---------------+-----------+------------+-----------------------------------+ **Request Body Parameter:** ``sort`` +---------------+-----------+------------+-----------------------------------+ |Parameter |Type |Requirement | Description | +===============+===========+============+===================================+ |``field`` |ISO String |Optional |Sort results by ``orderDate`` or | | | | |``dispatchByDate`` | +---------------+-----------+------------+-----------------------------------+ |``order`` |String |Optional |Sort results by ``desc`` or ``asc``| +---------------+-----------+------------+-----------------------------------+ **Validations** :: pageSize: Value between 1 and 20 states: Options are APPROVED, PACKED, READY_TO_DISPATCH, CANCELLED filter: All filters are optional sort field: Can be orderDate or dispatchByDate .. Note:: * Provides only those orders that are fulfilled based on the seller's fulfillment service. Flipkart Advantage (FA) orders are not shown. * The default sort order is by ``dispatchByDate`` (to be marked "Ready to Dispatch"). * If the date strings do not contain timezone information, it is assumed as IST. **Response Body Parameters:** +--------------------------------------+---------------+-------------------------------------------+ |Parameter/Attribute/Field |Type | Description | +======================================+===============+===========================================+ |``hasMore`` |Boolean |A flag to indicate whether there are more | | | |search results in the next page | +--------------------------------------+---------------+-------------------------------------------+ |``orderItems`` |List |A comma separated list of order items | +--------------------------------------+---------------+-------------------------------------------+ |``orderItemId`` |String |The primary identifier for seller actions | +--------------------------------------+---------------+-------------------------------------------+ |``orderId`` |String |System generated order ID for the buyer | +--------------------------------------+---------------+-------------------------------------------+ |``status`` |String |The current order processing status. | | | |Possible values: ``APPROVED``, | | | |``PACKING_IN_PROGRESS``, ``PACKED``, | | | |``READY_TO_DISPATCH``, ``PICKUP_COMPLETE``,| | | |``CANCELLED``, ``SHIPPED``, ``DELIVERED``, | | | |``RETURN_REQUESTED``, ``RETURNED`` | +--------------------------------------+---------------+-------------------------------------------+ |``sla`` |Integer |Order item specific SLA | +--------------------------------------+---------------+-------------------------------------------+ |``quantity`` |Integer |Number of units ordered of a particular | | | |order item | +--------------------------------------+---------------+-------------------------------------------+ |``title`` |String |Product listing title | +--------------------------------------+---------------+-------------------------------------------+ |``listingId`` |String |Product listing ID | +--------------------------------------+---------------+-------------------------------------------+ |``fsn`` |String |Flipkart system generated serial number | | | |used as a product identifier | +--------------------------------------+---------------+-------------------------------------------+ |``sku`` |String |Seller SKU for the listing | +--------------------------------------+---------------+-------------------------------------------+ |``priceComponenets``.``sellingPrice`` |Float |Product price listed by the seller. This | | | |value can be less than or equal to the MRP | +--------------------------------------+---------------+-------------------------------------------+ |``priceComponents``.``customerPrice`` |Float |The price at which buyer bought the order | | | |item from the Website (``sellingPrice`` - | | | |``promotionDiscount``) | +--------------------------------------+---------------+-------------------------------------------+ |``priceComponents``.``shippingCharge``|Float |Shipping charge per unit | +--------------------------------------+---------------+-------------------------------------------+ |``priceComponents``.``totalPrice`` |Float |The price paid by the customer per unit | | | |(``customerPrice`` + ``shippingCharge``) | +--------------------------------------+---------------+-------------------------------------------+ |``stateDocuments`` |List |List of state documents to be attached with| | | |the shipment | +--------------------------------------+---------------+-------------------------------------------+ |``subItems`` |List|Freebies associated with the order item. | | | |**Note:** Freebies must be shipped along | | | |with the primary order item | +--------------------------------------+---------------+-------------------------------------------+ |``orderDate`` |ISO String |Date on which the order was placed | +--------------------------------------+---------------+-------------------------------------------+ |``dispatchAfterDate`` |ISO String |Date after which the order items needs to | | | |be processed by the seller | +--------------------------------------+---------------+-------------------------------------------+ |``dispatchByDate`` |ISO String |Date by which the order items needs to be | | | |dispatched by the seller | +--------------------------------------+---------------+-------------------------------------------+ |``updatedAt`` |ISO String |Timestamp of the last update for a | | | |particular order item | +--------------------------------------+---------------+-------------------------------------------+ |``url`` |String |A GET call on this URL fetches the current | | | |page results | +--------------------------------------+---------------+-------------------------------------------+ |``nextPageUrl`` |String |A GET call on this URL fetches the next | | | |page results. Not present for the last page| +--------------------------------------+---------------+-------------------------------------------+ |``previousPageUrl`` |String |A GET call on this URL fetches the previous| | | |page results. Not present for the first | | | |page | +--------------------------------------+---------------+-------------------------------------------+ **Possible Error Response Codes** ============================= ========================= Error Codes Reason for Error ============================= ========================= ``INVALID_REQUEST_PAGE_SIZE`` Validation failure of the requested ``pageSize`` value ``INVALID_REQUEST_STATE`` Validation failure of the selected ``state`` ``INVALID_REQUEST_JSON`` JSON parsing failure of the request ``INVALID_DATE_FORMAT`` Parsing failure of the from or to dates ============================= ========================= | `Try it out! `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |