# Lot Tracking - Querying Allocation Pre-Shipping & Shipped Quantity

**URL:** <https://community.shiphero.com/t/lot-tracking-querying-allocation-pre-shipping-shipped-quantity/3137>\
**Category:** Feedback\
**Created:** [December 6, 2024, 3:59pm UTC](https://community.shiphero.com/t/lot-tracking-querying-allocation-pre-shipping-shipped-quantity/3137 "2024-12-06T15:59:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhalawi](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@dhalawi](https://community.shiphero.com/u/dhalawi)\
**Post date:** [December 6, 2024, 3:59pm UTC](https://community.shiphero.com/t/lot-tracking-querying-allocation-pre-shipping-shipped-quantity/3137/1 "2024-12-06T15:59:41Z")

</div>

Hi Team,

Is there a way to query which lot numbers have been allocated to an order pre-shipping?

Additionally, after the shipping is completed, I can see shipped\_line\_item\_lots, however in the schema for this it doesn’t give me the quantity pick per lot, how would I surface this information?

```auto
query {
  order {
    request_id
    complexity
    data {
                id
                legacy_id
                order_number
                partner_order_id
                shop_name
                fulfillment_status
                ready_to_ship
          
          line_items{
            edges {
              node {
                id
                sku
                partner_line_item_id
                quantity
                product_name
                fulfillment_status
                quantity_shipped
                quantity_pending_fulfillment
                quantity_allocated
                backorder_quantity
                shipped_line_item_lots {
                                    line_item_id
                                    lot_id
                                    lot_name
                                    lot_expiration_date
                                }
              }
            }
          }

    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![dhalawi](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@dhalawi](https://community.shiphero.com/u/dhalawi)\
**Post date:** [December 6, 2024, 5:39pm UTC](https://community.shiphero.com/t/lot-tracking-querying-allocation-pre-shipping-shipped-quantity/3137/2 "2024-12-06T17:39:47Z")

</div>

Further update to this… we have an order that has quantity of 3 on a line item, of which 2 items have one lot and the 3rd has another.

We need to know how many of the lot have been assigned to the order.

Output of a live query below…

```auto
{
  "page_of_records": [
    {
      "record": {
        "order": {
          "request_id": "675335e1cbd03a3963e8eaff",
          "complexity": 12,
          "data": {
            "id": "T3JkZXI6NTQ4NzE2NDk1",
            "legacy_id": 548716495,
            "order_number": "SO0168506",
            "partner_order_id": "SO0168506",
            "shop_name": " ******",
            "fulfillment_status": "fulfilled",
            "ready_to_ship": false,
            "line_items": {
              "edges": [
                {
                  "node": {
                    "id": "TGluZUl0ZW06MTM1NDY2MDY4Mg==",
                    "sku": " ******",
                    "partner_line_item_id": "2024120639327721",
                    "quantity": 3,
                    "product_name": " ********",
                    "fulfillment_status": "fulfilled",
                    "quantity_shipped": 3,
                    "quantity_pending_fulfillment": 0,
                    "quantity_allocated": 0,
                    "backorder_quantity": 0,
                    "shipped_line_item_lots": [
                      {
                        "line_item_id": "TGluZUl0ZW06MTM1NDY2MDY4Mg==",
                        "lot_id": "TG90OjM2NTMyMA==",
                        "lot_name": "A-M23758/21305",
                        "lot_expiration_date": "2025-01-01"
                      },
                      {
                        "line_item_id": "TGluZUl0ZW06MTM1NDY2MDY4Mg==",
                        "lot_id": "TG90OjM2NTMyMQ==",
                        "lot_name": "M23758/21302",
                        "lot_expiration_date": "2025-01-31"
                      }
                    ]
                  }
                },
                {
                  "node": {
                    "id": "TGluZUl0ZW06MTM1NDY2MDY4Mw==",
                    "sku": " *****",
                    "partner_line_item_id": "2024120639327722",
                    "quantity": 2,
                    "product_name": " *****",
                    "fulfillment_status": "fulfilled",
                    "quantity_shipped": 2,
                    "quantity_pending_fulfillment": 0,
                    "quantity_allocated": 0,
                    "backorder_quantity": 0,
                    "shipped_line_item_lots": [
                      {
                        "line_item_id": "TGluZUl0ZW06MTM1NDY2MDY4Mw==",
                        "lot_id": "TG90OjM2NTMyOA==",
                        "lot_name": "B-M22850/21202",
                        "lot_expiration_date": "2025-01-31"
                      }
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [December 6, 2024, 8:22pm UTC](https://community.shiphero.com/t/lot-tracking-querying-allocation-pre-shipping-shipped-quantity/3137/3 "2024-12-06T20:22:02Z")

</div>

Hey @dhalawi

Wanted to let you know I started reviewing you questions. I will let you know as soon as I make progress.

Have a nice day!

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [December 10, 2024, 6:49pm UTC](https://community.shiphero.com/t/lot-tracking-querying-allocation-pre-shipping-shipped-quantity/3137/4 "2024-12-10T18:49:43Z")

</div>

Hello @dhalawi!

At the moment, our API and webhook do not show that breakdown. I will forward this as feedback to our product team for further review.

Have a nice day!
