# How can we get warehouse id from generate label webhook

**URL:** <https://community.shiphero.com/t/how-can-we-get-warehouse-id-from-generate-label-webhook/1507>\
**Category:** GraphQL API\
**Created:** [August 23, 2021, 9:03am UTC](https://community.shiphero.com/t/how-can-we-get-warehouse-id-from-generate-label-webhook/1507 "2021-08-23T09:03:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [August 23, 2021, 9:03am UTC](https://community.shiphero.com/t/how-can-we-get-warehouse-id-from-generate-label-webhook/1507/1 "2021-08-23T09:03:17Z")

</div>

Hi!  
we have few generate webhook labels registered and now we have a requirement where we need to get the warehouse from where this particular label is being generated.  
I could not find any information related to warehouse in the webhook body.  
How can we access this information.  
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:** [August 23, 2021, 5:44pm UTC](https://community.shiphero.com/t/how-can-we-get-warehouse-id-from-generate-label-webhook/1507/2 "2021-08-23T17:44:10Z")

</div>

Hi @saif_storage  
I am not sure I understand, did you want to say that you have a few generate label webhooks registered? If so, can you send the request-id and the error that you are receiving? I will be happy to take a look.

---

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [August 23, 2021, 6:00pm UTC](https://community.shiphero.com/t/how-can-we-get-warehouse-id-from-generate-label-webhook/1507/3 "2021-08-23T18:00:19Z")

</div>

Hello @theresa  
Yes the webhook is registered, and actually am not getting any error. I am looking for a way to find the warehouse from where the label is being generated.  
Let me try to explain.  
We have 2 warehouses in location A and location B from where orders with shipping method X are processed. When we generate the label a webhook request is received on our [url.com](http://url.com) webhook. In this webhook we are getting all data as mentioned in the documentation. Now what i want is to find out whether the request is coming from warehouse in location A or warehouse in location B.  
is there any way to find out?  
I hope its clear now

---

<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:** [August 23, 2021, 9:09pm UTC](https://community.shiphero.com/t/how-can-we-get-warehouse-id-from-generate-label-webhook/1507/4 "2021-08-23T21:09:52Z")

</div>

Hi @saif_storage !  
Thank you for the details in the explanation. The warehouse information is contained in the shipment data.

This will get you the warehouse id and the name:

```auto
query {
  shipment(id: "<shipment id here>") {
    request_id
    complexity
    data {
      warehouse {
        id
        identifier
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [August 24, 2021, 8:08am UTC](https://community.shiphero.com/t/how-can-we-get-warehouse-id-from-generate-label-webhook/1507/5 "2021-08-24T08:08:54Z")

</div>

okay… in the webhook i will have to make a request to get the order details from order query and then from shipment i can get the warehouse… It seems to bit of extra work but i dont think there is another way to do this.  
Thanks for your help
