# Fetch Customer & Shipping Name Fields via API?

**URL:** <https://community.shiphero.com/t/fetch-customer-shipping-name-fields-via-api/894>\
**Category:** GraphQL API\
**Created:** [October 13, 2020, 9:52pm UTC](https://community.shiphero.com/t/fetch-customer-shipping-name-fields-via-api/894 "2020-10-13T21:52:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mike](https://community.shiphero.com/u/Mike)\
**Post date:** [October 13, 2020, 9:52pm UTC](https://community.shiphero.com/t/fetch-customer-shipping-name-fields-via-api/894/1 "2020-10-13T21:52:43Z")

</div>

Hi there,

I’m working on some graphQL API queries to pull order and shipment data and I would like to fetch the following fields:

-Customer  
-Shipping Name

These fields are visible in the left pane of the main orders search page:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/a74638b139cced099a15ca4aac27726ca6350d95.png)

Is there some way to get these fields when querying an order or shipment via API? I can’t seem to find them in the list of fields, but sometimes the labeling of fields in the API is different vs the front-end so maybe I’m just overlooking them. Please let me know if it’s possible & if so how.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![galvarez](https://avatars.discourse-cdn.com/v4/letter/g/d2c977/32.png) [@galvarez](https://community.shiphero.com/u/galvarez)\
**Post date:** [October 14, 2020, 4:34pm UTC](https://community.shiphero.com/t/fetch-customer-shipping-name-fields-via-api/894/2 "2020-10-14T16:34:21Z")

</div>

Hello @Mike this query could help you achieve what you are trying to do

```
query {
  orders(fulfillment_status: "pending") {
    request_id
    complexity
    data(first: 10) {
      edges {
        node {
          id
          legacy_id
          order_number
          partner_order_id
          shop_name
          fulfillment_status
          account_id
          shipping_lines{
            title       
            method
          }      
        }
      }
    }
  }
} 

```

where shipping\_lines and account\_id are the fields you would need.

---

<div class="post-metadata">

**Author:** ![Mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mike](https://community.shiphero.com/u/Mike)\
**Post date:** [October 16, 2020, 2:22am UTC](https://community.shiphero.com/t/fetch-customer-shipping-name-fields-via-api/894/3 "2020-10-16T02:22:50Z")

</div>

Thanks! Is there a way to get a user-friendly list of all 'Customer’s and their associated 'account\_id’s ?

---

<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:** [October 26, 2020, 2:02pm UTC](https://community.shiphero.com/t/fetch-customer-shipping-name-fields-via-api/894/4 "2020-10-26T14:02:16Z")

</div>

Hi @Mike!  
I apologize for the delayed response to this.  
I believe a query like this one might help:

```
query {
  account {
    request_id
    complexity
    data {
      customers {
        edges {
          node {
            id
            email
            warehouses {
 		         company_alias             
            }
          }
        }
      }
    }
  }
} 

```

Under company alias, you can find the friendly name for the Customer account associated with that id

Let me know if that still doesn’t help!  
Thanks again  
Tom
