# Cannot get warehouse\_id

**URL:** <https://community.shiphero.com/t/cannot-get-warehouse-id/1290>\
**Category:** GraphQL API\
**Created:** [April 27, 2021, 2:14pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290 "2021-04-27T14:14:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcbee](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@gcbee](https://community.shiphero.com/u/gcbee)\
**Post date:** [April 27, 2021, 2:14pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/1 "2021-04-27T14:14:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [May 8, 2021, 2:11pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/2 "2021-05-08T14:11:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 20, 2021, 5:22pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/3 "2021-05-20T17:22:33Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [May 20, 2021, 6:33pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/4 "2021-05-20T18:33:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 20, 2021, 7:48pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/6 "2021-05-20T19:48:14Z")

</div>

Hi @Theresa ,

My request id : 60a6ae77c8564b67b1321549

Thanks

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [May 21, 2021, 2:54pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/8 "2021-05-21T14:54:40Z")

</div>

Thank you! We are digging into this further.

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [May 21, 2021, 7:59pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/9 "2021-05-21T19:59:40Z")

</div>

Hi @kingstontech ,  
You are good to go now.

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 21, 2021, 10:07pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/11 "2021-05-21T22:07:05Z")

</div>

Thank You!!! @Theresa

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 25, 2021, 3:42pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/12 "2021-05-25T15:42:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JustinAnchored](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JustinAnchored](https://community.shiphero.com/u/JustinAnchored)\
**Post date:** [May 25, 2021, 5:38pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/13 "2021-05-25T17:38:44Z")

</div>

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  
> }  
> }  
> }  
> }

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 26, 2021, 11:37am UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/14 "2021-05-26T11:37:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [May 26, 2021, 12:28pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/15 "2021-05-26T12:28:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JustinAnchored](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JustinAnchored](https://community.shiphero.com/u/JustinAnchored)\
**Post date:** [May 26, 2021, 2:06pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/16 "2021-05-26T14:06:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JustinAnchored](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JustinAnchored](https://community.shiphero.com/u/JustinAnchored)\
**Post date:** [May 26, 2021, 2:10pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/17 "2021-05-26T14:10:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 26, 2021, 2:32pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/18 "2021-05-26T14:32:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 26, 2021, 2:36pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/19 "2021-05-26T14:36:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JustinAnchored](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JustinAnchored](https://community.shiphero.com/u/JustinAnchored)\
**Post date:** [May 26, 2021, 2:49pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/20 "2021-05-26T14:49:40Z")

</div>

> [@kingstontech](#):
>
> my account or need to add/modify

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  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![JustinAnchored](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JustinAnchored](https://community.shiphero.com/u/JustinAnchored)\
**Post date:** [May 26, 2021, 2:53pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/21 "2021-05-26T14:53:30Z")

</div>

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

What application are you using to test?

---

<div class="post-metadata">

**Author:** ![kingstontech](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kingstontech](https://community.shiphero.com/u/kingstontech)\
**Post date:** [May 26, 2021, 3:09pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/22 "2021-05-26T15:09:36Z")

</div>

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

> **[2021-05-26\_20-35-44](https://www.screencast.com/t/h2PpUqAi)**
>
> Shared from Screencast.com

> **[2021-05-26\_20-37-04](https://www.screencast.com/t/9DWhFZsg)**
>
> Shared from Screencast.com

---

<div class="post-metadata">

**Author:** ![JustinAnchored](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JustinAnchored](https://community.shiphero.com/u/JustinAnchored)\
**Post date:** [May 26, 2021, 4:16pm UTC](https://community.shiphero.com/t/cannot-get-warehouse-id/1290/23 "2021-05-26T16:16:08Z")

</div>

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  
}  
}  
}  
}  
}

[Next page](https://community.shiphero.com/t/cannot-get-warehouse-id/1290.md?page=2)
