Fetch Customer & Shipping Name Fields via API?

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

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!

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.

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

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