Getting Lot Code Of Shipped Items

We’re using the lot codes functionality for our products. When pulling shipment details down, I also need the lot code associated with the picked product. Is this something that can be currently retrieved using the Shipments query, or will a separate query for the lot information be required?

I’ve looked through the GraphQL documentation for shipments and the only thing I can see that might be it would be the line serial numbers, but it doesn’t seem like that’s correct as there’s no reference to a lot ID or an expiration date for the lot.

Hi @brett
That is correct, it is only available through the App at the moment.
I created a Feature Request for this to be exposed through our Public API.
I will let you know as soon as I have an update about it.
Thanks again!
Tom

Hi @tomasw I am currently working through an integration with ShipHero now and have a requirement to track Lot information for inbound orders, receipts, outbound orders, and shipment confirmations.

I understand at the time of this ticket that lots were not available via the Public API. Has this feature request been completed? Are you aware of any workarounds that would enable us to create inbound orders with lot codes and retrieve the lot code in the receipt confirmation? The same request applies for querying outbound shipments with lot codes.

Thanks!

Hi @isaac.wyatt!
We are currently evaluating the complexity of this task to help define if its something we could build right now.
We are currently working on the Public API infrastructure and that is taking almost all of our engineering resources, so we are defining how would something like this take.
A possibility is to add this after peak season, but I will let you know as soon as I have a response about it or a better ETA.
Thanks in advance!
Tom

Hi @tomasw,

Thank you for looking into this for us. Do you happen to have an update yet?

Hi @brett @isaac.wyatt @davidhardwick
I apologize for my delayed update on this. I have been told by our engineering team that we won’t be able to work on this at the moment.
Adding these fields and requirements on the Public API will mean a large project that we are not able to tackle at the moment.
I will keep this as pending for when our engineering team has the resources to work on this, but for the moment our Public API will not support Lots and Expiration through the different Queries or Mutations.
Thanks again for the patience and I apologize for the inconvenience
Tom

Appreciate the candor. We won’t be able to meet our customer’s requirements with this limitation.
Hopefully this will be something the team can tackle in Q1. If there is a way to pay to move this up on the roadmap, please let me know. Seriously.

FYI - We found a way to return lot numbers on shipped orders. We are able to do this by adding the shipped_line_item_lots argument to the line item in the orders query. See the sample request/response below.

This successfully returns the lots which were shipped on the order.

Request
query {
order(id: “<Order_Id>”) {
request_id
complexity
data {
id
legacy_id
order_number
shop_name
fulfillment_status
order_date
profile
required_ship_date
shipping_lines {
carrier
method
price
}
shipping_address {
first_name
last_name
address1
address2
city
state
state_code
zip
country
}
tags
line_items(first: 2) {
edges {
node {
id
sku
quantity
product_name
fulfillment_status
quantity_allocated
backorder_quantity
barcode
shipped_line_item_lots{
id
line_item_id
lot_id
lot_name
lot_expiration_date
}
}
cursor
}
}
shipments {
id
order_id
user_id
warehouse_id
shipping_labels {
id
tracking_number
carrier
shipping_name
shipping_method
cost
warehouse
carrier_account_id
source
created_date
}
address {
name
address1
address2
city
state
country
zip
}
shipped_off_shiphero
dropshipment
}
returns {
id
reason
status
}
}
}
}

1 Like

As the originator of the request, I believe this may have also been brought up in an internal ticket which got more of the attention than this public version.

This was implemented a month (maybe two) ago. There is a new shipped_line_item_lots element available on a line_item object.

2 Likes

Thanks for validating! We were unsure whether or not we should use the shipped_line_item_lots field, as we had not seen this field referenced in other community posts.