cancel
Showing results for 
Search instead for 
Did you mean: 

Get all orders a customer has made with REST API

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Get all orders a customer has made with REST API

Hello

 

I'm trying to make a GET request to find out everything a customer has purchased.

I'm using the following query to get all orders ever made, but can't figure out how to sort out only specific ones made by customer_id = 1 for example, or email=someone@test.com.

http://<host>/rest/V1/orders?searchCriteria

 

Thanks in advance

 

Edit: Nevermind, figured it out;

http://<host>/rest/V1/orders?searchCriteria[filterGroups][][filters][][field]=customer_email&searchCriteria[filterGroups][0][filters][0][value]=someone@test.com

 

1 REPLY 1

Re: Get all orders a customer has made with REST API

This API is too slow if a customer is having 5-7 records .How to improve it?


@Blendrio wrote:

Hello

 

I'm trying to make a GET request to find out everything a customer has purchased.

I'm using the following query to get all orders ever made, but can't figure out how to sort out only specific ones made by customer_id = 1 for example, or email=someone@test.com.

http://<host>/rest/V1/orders?searchCriteria

 

Thanks in advance

 

Edit: Nevermind, figured it out;

http://<host>/rest/V1/orders?searchCriteria[filterGroups][][filters][][field]=customer_email&searchCriteria[filterGroups][0][filters][0][value]=someone@test.com