Find orders from your master_id / Account_id

Hi tomas,
I need a Graphql query where find orders from your master_id / Account_id, can you please share with us ?
@ tomas

Hi Raajesh, Welcome!
This query will return the orders for a client account that you specify.

query {
  orders(
    customer_account_id:"*client account number here*"
  ) {
    request_id
    complexity
    data {
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          order_number
        }
      }
    }
  }
}

There are many more arguments that you can use to make your results more specific in the orders query.

  • shop_name String
  • partner_order_id String
  • order_number String
  • warehouse_id String
  • fulfillment_status String
  • sku String
  • email String
  • updated_from ISODateTime
  • updated_to ISODateTime
  • order_date_from ISODateTime
  • order_date_to ISODateTime
  • customer_account_id String

Thank you very much Theresa …
can you send query where i can find from customer email_id like here you share from customer_id right.
Thanks for reply…

I got it …
query {

orders(

email:"*****************" 

)

{

request_id

complexity

data {

  pageInfo {

    hasNextPage

    endCursor

  }

  edges {

    node {

      order_number,

      shop_name,

      email        

    }

  }

}

}

}

Hi Raajesh,
Not positive I understand. But here is one where you enter the order number and get the email. Is this what you were looking for or did you want to find the order from the email ?

query {
  orders(order_number: "XXorder number hereXX") {
    data {
      edges {
        node {
          email
        }
      }
    }
    request_id
    complexity
  }
}

Thanks…
But i need a query where you can find from orders where put all 3pl customer’s email and give all details of single users.

Example:
query {
orders(
email:"*************@gmail.com"
)
{
request_id
complexity
data {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
order_number,
shop_name,
email
}
}
}
}
}

Here we are using particular email_id right?
So I need dynamic something where we can give any email they will show their details…
something like that…
Thanks.

Hi Raajesh,
Are you asking to put in an email and get the customer’s information? If that is what you’re looking for, it would be on the order level. You would need to bring up the order, then you would have access to a shipping address, billing address, and email for that individual order.