I need to have product locations but a product can sometimes have 10 locations, and we need the name in order to pick the correct destination via API. That means we’ll have to query location 10 times in order to get their names - and with the credit ceiling, that’s not a good option.
query {
product(sku:“100442016032iii”) {
request_id
complexity
data {
warehouse_products {
locations {
edges {
node {
id
legacy_id
account_id
warehouse_id
name
location_id
type {
name
}
}
}
}
}
}
}
}
In this does ShipHero can include pickable status in the same query. So, It can be helpful for performance.
Hi @Venkatesh!
We have something like this on our radar, would a Query like this work for you?:
query {
product(sku: "1122334458") {
request_id
data {
sku
name
warehouse_products {
warehouse_id
locations {
edges {
node {
name
location_id
legacy_id
quantity
}
}
}
}
}
}
}
Another option would be (in the meantime) to get ALL locations once a day, store that information and be able to tell which bin is which and if it is pickable using:
query{
locations(warehouse_id: "V2FyZWhvdXNlOjExNzkw"){
request_id
complexity
data(first: 1000) {
edges {
node {
id
name
pickable
}
}
}
}
}
That should allow you to get 1k locations.
We will keep you updated on the progress of that implementation.
Thanks in advance!
Tom
That’s correct @Venkatesh, I apologize for the confusion.
It’s currently on our radar and looking to be implemented in the next few months, but not live yet.
Currently, there is no way of getting the location name and pickable using the product query, they need to be returned using the locations query, either by getting them all at once and storing the data, or getting them one by one filtering by location id.
We recommend getting all the locations at once and storing that information which should not consume many credits.