Can I get product from shiphero based on Sku and Warehouse-id, I want to filter out the products by Sku and Warehouse-id.
Hi @ShamaliR
We don’t have this combination but you can accomplish that using the following Query
query{
products(sku: "46101204"){
request_id
complexity
data(first: 10) {
edges {
node {
id
sku
warehouse_products {
warehouse{
identifier
}
warehouse_id
on_hand
}
}
}
}
}
}
That should bring you all the warehouses, for example:
{
"data": {
"products": {
"request_id": "5f16eeee7032073ec1696114",
"complexity": 11,
"data": {
"edges": [
{
"node": {
"id": "UHJvZHVjdEluZm86MjcyMDk3OTA4",
"sku": "46401204",
"warehouse_products": [
{
"warehouse": {
"identifier": "Primary"
},
"warehouse_id": "V2FyZWhvdXNl1jExNzkw",
"on_hand": 8
},
{
"warehouse": {
"identifier": "Warehouse TWO"
},
"warehouse_id": "V2FyZWhvdXNlOjE1MTc0",
"on_hand": 351
}
]
}
}
]
}
}
}
}
And then you could filter for the warehouse you need
Let me know if this doesn’t work for you
Thanks in advance!
Tom