Fetching Orders

All the new orders that the seller needs to process from a seller location.

Sellers can only act on the shipment after the dispatchAfterDate and when the hold status is FALSE. Sellers can get these two details in the shipment payload calling these APIs or by subscribing to order notification service.

Request - v3 APIs

POST https://api.flipkart.net/sellers/v3/shipments/filter

Request Body Schema (v3)

const orderDate = {
	type: 'object',
    properties: {
        from: { type: "string($date-time)" },
        to: { type: "string($date-time)" },
    },
};

const filter = {
	type: 'object',
    properties: {
        type: { type: "string", enum: [ "preDispatch", "postDispatch", "cancelled" ] },
        states: { type: "array", uniqueItems: true, items: {type: "string"}, enum: ["APPROVED", "PACKING_IN_PROGRESS", "FORM_FAILED", "PACKED", "READY_TO_DISPATCH", "PICKUP_COMPLETE", "CANCELLED", "RETURN_REQUESTED", "RETURNED", "SHIPPED", "DELIVERED", "COMPLETED" ] },
        locationId: { type: "string" },
        sku: { type: "array", uniqueItems: true, items: {type: "string"} },
        orderDate: orderDate,
        dispatchAfterDate: orderDate,
        dispatchByDate: orderDate,
        modifiedDate: orderDate,
        shipmentTypes: { type: "array", uniqueItems: true, items: {type: "string"}, enum: [ "EXPRESS", "NORMAL", "SELF" ] },
        serviceProfiles: { type: "array", uniqueItems: true, items: {type: "string"}, enum: [ "FBF", "NON_FBF", "FBF_LITE" ] },
        dispatchServiceTiers: { type: "array", uniqueItems: true, items: {type: "string"}, enum: [ "EXPRESS", "REGULAR" ] },
        cancellationDate: orderDate,
        cancellationType: { type: "array", items: {type: "string"}, enum: [ "sellerCancellation", "buyerCancellation", "marketplaceCancellation" ] },
    },
    required: ["type", "states"],
};

const sort = {
	type: 'object',
    properties: {
        field: { type: "string", enum: [ dispatchByDate, orderDate, modifiedDate, dispatchAfterDate ] },
        order: { type: "string", enum: [ asc, desc ] },
    },
};

const SearchShipmentRequest = {
    type: "object",
    properties: {
        filter: filter,
        pagination: { type: 'integer($int32)' },
        sort: sort,
        sellerId: { type: 'string' },
    },
}

Request Body Example (v3)

{
    filter: {
        type: "preDispatch",
        states: ["APPROVED"]
    }
}

Response Body Schema (v3)

const Dimension = {
    type: "object",
    properties: {
        length: { type: "number" },
        breadth: { type: "number" },
        height: { type: "number"},
    },
}

const NotionalValue = {
    type: "object",
    properties: {
        amount: { type: "number", minimum: 0 },
        unit: { type: "string", enum: ['PERCENTAGE', 'INR'] },
    },
}

const Handling = {
    type: "object",
    properties: {
        fragile: { type: "boolean" },
    },
}

const Package = {
    type: "object",
    properties: {
        id: { type: "string" },
        name: { type: "string" },
        dimensions: Dimension,
        weight: { type: "number"},
        notional_value: NotionalValue,
        description: { type: "string"},
        handling: Handling,
    },
}

const SubShipment = {
    type: "object",
    properties: {
        subShipmentId: { type: "string" },
        packages: { type: "array", items: Package }
    },
}

const PriceComponent = {
    type: "object",
    properties: {
        sellingPrice: { type: "number" },
        totalPrice: { type: "number" },
        shippingCharge: { type: "number" },
        customerPrice: { type: "number"},
        flipkartDiscount: { type: "number" },
    },
}

const OrderItem = {
    type: "object",
    properties: {
        orderItemId: { type: "string" },
        orderId: { type: "string" },
        cancellationGroupId: { type: "string" },
        orderDate: { type: "string" },
        cancellationDate: { type: "string"},
        paymentType: { type: "string", enum: ['COD', 'PREPAID'] },
        status: { type: "string", enum: [ APPROVED, PACKING_IN_PROGRESS, FORM_FAILED, PACKED, READY_TO_DISPATCH, PICKUP_COMPLETE, CANCELLED, RETURN_REQUESTED, RETURNED, SHIPPED, DELIVERED, COMPLETED ] },
        cancellationReason: { type: "string"},
        cancellationSubReason: { type: "string"},
        courierReturn: { type: "boolean" },
        quantity: { type: "integer" },
        fsn: { type: "string"},
        sku: { type: "string"},
        listingId: { type: "string"},
        hsn: { type: "string"},
        title: { type: "string"},
        packageIds: { type: "array", items: "string" },
        priceComponents: PriceComponent,
        serviceProfile: { type: "string", enum: [ Flipkart_Fulfilment, Seller_Fulfilment, Smart_Fulfilment, FBF, NON_FBF, FBF_LITE ] },
        is_replacement: { type: "boolean"},
    },
}

const Form = {
    type: "object",
    properties: {
        name: { type: "string" },
        link: { type: "string" },
        automated: { type: "boolean" },
    },
}

const Shipment = {
    type: "object",
    properties: {
        shipmentId: { type: "string" },
        dispatchByDate: { type: "string" },
        dispatchAfterDate: { type: "string" },
        updatedAt: { type: "string"},
        locationId: { type: "string"},
        hold: { type: "boolean"},
        mps: { type: "boolean"},
        packagingPolicy: { type: "string" },
        subShipments: { type: "array", items: SubShipment },
        orderItems: { type: "array", items: OrderItem },
        forms: { type: "array", items: Form },
        shipmentType: { type: "string" },
    },
}

const ShipmentStatusResponse = {
    type: "object",
    properties: {
        hasMore: { type: "boolean"},
        nextPageUrl: { type: "string"},
        shipments: { type: "array", items: Shipment },
    },
    required: ["hasMore", "nextPageUrl", "shipments"],
}

Success Response Example (v3)

// status: 200
{
  "hasMore": false,
  "nextPageUrl": "/v3/shipments/filter?next_token=ewogICJmaWx0ZXJUeXBlIiA6ICJwcmVEaXNwYXRjaCIsCiAgInNlbGxlcklkIiA6ICJlZTY4MTk5ZDFiNmE0MzZjIiwKICAidG9rZW4iIDogbnVsbCwKICAidmlldyIgOiAib3JkZXJfYXBpLnYzLnNoaXBtZW50IiwKICAidGVtcGxhdGUiIDogIm9hcGlfcHJlX2Rpc3BhdGNoIgp9",
  "shipments": [
    {
      "dispatchAfterDate": "2022-08-26T23:01:41.000+05:30",
      "dispatchByDate": "2022-08-29T12:00:00.000+05:30",
      "forms": [],
      "hold": false,
      "locationId": "LOCbba44916f16b474da588ed9b28768c43",
      "mps": false,
      "orderItems": [
        {
          "cancellationGroupId": "grp22583900894645300",
          "fsn": "UMBEK7GAGQMN2K6H",
          "hsn": "66019900",
          "is_replacement": false,
          "listingId": "LSTUMBEK7GAGQMN2K6HFHW8ZB",
          "orderDate": "2022-08-26T22:56:41.424+05:30",
          "orderId": "OD225839008946453000",
          "orderItemId": "22583900894645300",
          "packageIds": [
            "PKGUMBEK7GAGQMN2K6HFHW8ZB"
          ],
          "paymentType": "PREPAID",
          "priceComponents": {
            "customerPrice": 364,
            "flipkartDiscount": 0,
            "sellingPrice": 314,
            "shippingCharge": 50,
            "totalPrice": 364
          },
          "quantity": 1,
          "serviceProfile": "Seller_Fulfilment",
          "sku": "AN1004-YELLOW",
          "status": "APPROVED",
          "title": "ANCHOR Auto Open 2 Fold Umbrella Yellow 21"
        }
      ],
      "packagingPolicy": "GREEN_PACKAGE",
      "shipmentId": "2f14a546-626d-40eb-86d8-1dcb2f615174",
      "shipmentType": "NORMAL",
      "subShipments": [
        {
          "packages": [
            {
              "dimensions": {
                "breadth": 10,
                "height": 6,
                "length": 30,
                "weight": 0.35
              },
              "packageId": "PKGUMBEK7GAGQMN2K6HFHW8ZB",
              "packageSku": "AN1004-YELLOW"
            }
          ],
          "subShipmentId": "SS-1"
        }
      ],
      "updatedAt": "2022-08-26T22:57:10.000+05:30"
    },
    {
      "dispatchAfterDate": "2022-08-25T22:42:41.000+05:30",
      "dispatchByDate": "2022-08-29T12:00:00.000+05:30",
      "forms": [],
      "hold": false,
      "locationId": "LOCbba44916f16b474da588ed9b28768c43",
      "mps": false,
      "orderItems": [
        {
          "cancellationGroupId": "grp22583025532006800",
          "fsn": "UMBF5D4DEAFDEWSG",
          "hsn": "66019900",
          "is_replacement": false,
          "listingId": "LSTUMBF5D4DEAFDEWSGBM0UJY",
          "orderDate": "2022-08-25T22:37:41.730+05:30",
          "orderId": "OD225830255320068000",
          "orderItemId": "22583025532006800",
          "packageIds": [
            "PKGUMBF5D4DEAFDEWSGBM0UJY"
          ],
          "paymentType": "COD",
          "priceComponents": {
            "customerPrice": 600,
            "flipkartDiscount": 0,
            "sellingPrice": 550,
            "shippingCharge": 50,
            "totalPrice": 600
          },
          "quantity": 1,
          "serviceProfile": "Seller_Fulfilment",
          "sku": "AN1004_RED_YELLOW",
          "status": "APPROVED",
          "title": "ANCHOR 2 Fold Red,Yellow Auto Open Umbrella Red, Yellow 45"
        }
      ],
      "packagingPolicy": "GREEN_PACKAGE",
      "shipmentId": "df3d0605-06ef-4602-aacb-64f653e2e048",
      "shipmentType": "NORMAL",
      "subShipments": [
        {
          "packages": [
            {
              "dimensions": {
                "breadth": 6,
                "height": 6,
                "length": 35,
                "weight": 0.3
              },
              "packageId": "PKGUMBF5D4DEAFDEWSGBM0UJY",
              "packageSku": "AN1004_RED_YELLOW"
            }
          ],
          "subShipmentId": "SS-1"
        }
      ],
      "updatedAt": "2022-08-25T22:38:29.000+05:30"
    }
  ]
}

Possible Error Response Codes

Error Codes Reason for Error
INVALID_REQUEST_PAGE_SIZE Validation failure of the requested pageSize value
INVALID_REQUEST_JSON JSON parsing failure of the request
INVALID_DATE_FORMAT Parsing failure of the from or to dates
Edit this page on GitHub
Updated at Tue, Sep 6, 2022
Was this page helpful?