In Magento2 How can i get the list of orders placed by specific user using REST API ?

1 Answer 1



OK, so what is this?

The endpoint for getting orders is: http://yourdomain/rest/V1/orders

Make sure you change "yourdomain" to your actual domain.

This endpoint is reached by GET.

Next, the so called searchCriteria is a mandatory field to send to this endpoint.

So, the rest of the URL pretty much sets

  • filter groups: [filterGroups][0] means this is the filterGroup with id 0, i.e. the first one
  • filters: [filters][0] means this is the first filter within the filterGroup
  • and for each filter we set [field], [value] and [conditionType]. By this triplet in my example I have set that the filter be based on the customer_id and that it should try to match it (using:eq) to value 2

Another example

http://yourdomain/rest/V1/orders?searchCriteria[filterGroups][0][filters][0][field]=customer_email&searchCriteria[filterGroups][0][filters][0][value][email protected]&searchCriteria[filterGroups][0][filters][0][conditionType]=eq

Here, the query is to look for a customer by email. field is set to customer_email, value to [email protected] and conditionType to eq

You can, of course, do combinations of multiple filters and logical AND, and logical OR are possible for different fields.

This link gives even more details


I hope this helps.

  • iam using http://www.depoto.com/Beta/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value][email protected] it works fine Commented Sep 18, 2018 at 10:46
  • Do you know how to get wish list of specific user in magento 2 REST API Commented Sep 18, 2018 at 10:51
  • It's hard for me to believe as well, but the Wishlist module has no web api at all. This link show what is available per module devdocs.magento.com/guides/v2.2/rest/rest_endpoints.html. So, you will need to build your own service to query for wishlist items.
    – Marjan
    Commented Sep 18, 2018 at 11:40
  • Remember to add the admin auth token on the request. And also note that this doesn't work for a customer's token. Commented Sep 14, 2022 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.