Cannot get warehouse_id

Hi,

I cannot get the warehouse_id. I tried with the account query but it’s empty:

query {
  account {
    request_id
    complexity
    data {
      warehouses {
        id
        legacy_id
        account_id
        identifier
        profile
      }
    }
  }
}

RETURNS:

{
  "data": {
    "account": {
      "request_id": "60881929f3a274f05b3e957f",
      "complexity": 1,
      "data": {
        "warehouses": []
      }
    }
  }
}

What’s wrong?
Thank you

Hi @gcbee!
I believe we spoke over email but I apologize for having missed this, it seems like our community notifications were not getting through.
The Query should be working now but please let us know if there is anything else we could help you with.
Thanks again for the patience!
Tom

Hi Tomasw,

I’m also facing the same issue as I’m unaware how to get the warehouse_id. I tried running above query but the warehouse section is blank. Kindly help
Thanks!

Hi @kingstontech ! Welcome! Please send the request id and I will have a look. Thanks in advance!
Theresa

Hi @Theresa ,

My request id : 60a6ae77c8564b67b1321549

Thanks

Thank you! We are digging into this further.

Hi @kingstontech ,
You are good to go now.

Thank You!!! @Theresa

Hey @Theresa ! I was able to create product through API but while hitting create_order API , I’ getting below error:
Invalid warehouse_id in order line item with sku 123sleepingcaps

Request id : 60ad1a4a661227a5805c6be2

Thanks

Hello Kingstontech, I found I first get the warehouse ID of the product and then use it afterwards.

Blockquote{
product(sku: “41099-ss-04-01”) {
complexity
request_id
data {
sku
name
warehouse_products {
warehouse_id
}
}
}
}

Hello @JustinAnchored ,

I first hit the create_product API and product was successfully created:
Output:
“product_create”: {
“request_id”: “60ae2fe1768e16cbfbf0d60a”,
“complexity”: 10,
“product”: {
“id”: “UHJvZHVjdEluZm86MjgwODcxOTcz”,
“name”: “New Product 2”,
“sku”: “P0002”,
“warehouse_products”: [
{
“id”: “UHJvZHVjdDozNTc0NjA0OTA=”,
“warehouse_id”: “V2FyZWhvdXNlOjcyOTE3”
}
]
}
}

And when I’m creating an order by using SKU (P0002) and warehouse_id ( V2FyZWhvdXNlOjcyOTE3), I’m getting error that “Invalid warehouse_id in order line item with sku P0002”.

Why is it displaying invalid warehouse_id ?
Request id : 60ae326a03e6f50abed5896d

Hi @kingstontech!
Try not sending the warehouse_id when creating the order, that should work

I tested the examples on the website, both showed the warehouse ID and worked wonderfully. My first API Order create as well as my first API Product Create. The only adjustments I made was using my warehouse ID in both, and of course I lined up the same product sku, so for the order, I used “123woodchair”
Ill be excited when it comes time to use these APIs in production.

1 Like

One thing I would note, because I used the example, it added the quantity in a location that didn’t exist. Im not sure if this would cause an error, but I thought I would bring it to tomas’s attention

What warehouse Id did you use while creating the order. Your own warehouse_id or which I provided?

I was able to create order without using line_item field. But where would I mention my Product Sku code for which that order is placed .
Order id : T3JkZXI6MTkzNDc1NzI3
Request id : 60ae4c3667efb2058c2016b9
And one more thing , Can you check if all configuration is done in my account or need to add/modify something.

I used my warehouse ID.

Try using this query, when it responds, double check the warehouse ID you are using with the order create.

{
product(sku: “P0002”) {
complexity
request_id
data {
sku
name
warehouse_products {
warehouse_id
}
}
}
}

Your Headers, should be under Authorization, “Bearer …”

What application are you using to test?

I’m using Altair GraphQL Client and using Authorization as well.
Please look at the screenshots where I’m using same warehouse_id:

Everything looks good, Im just another customer, Maybe there is something wrong with the warehouse ID, so I would try another product that you already have been using for orders.
the other thing you can do is try another warehouse (create another sample product in the other warehouse & add it to an order), if you need other warehouses, use this query: (there may be a better query, but this one works for me)
{
inventory_sync_statuses {
data {
edges {
node {
account_id
status
created_at
updated_at
__typename
total_count
success_count
warehouse_id
}
}
}
}
}

1 Like