-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetCustomerOrders Returns No Orders #1084
Comments
Have you tried using postman to do a similar api call and see if that does return a value? |
No, I don't have postman setup, otherwise I would have tried. |
Hey @shafaqat-ali-cms365! I've just tested this myself and it seems to work fine. I've added it to ShopifySharp's integration tests in this commit and they pass without issue. I think it might be a permission issue. Both the customers and orders are protected by special permissions that may not necessarily return errors. Off the top of my head, you'd need the following:
|
Your permissions look good, and so does the customer data privacy stuff. The fulfillment/order status thing is an interesting observation though, that sounds like it could be the problem. On the list filter, there's a property named Note: I marked |
I have added the status field in the filter and I can confirm that I get orders returned but If I remove the status field, I don't get any order returned for the same customer. |
I am trying to get customer orders, here is my code
var filter = new CustomerSearchListFilter { //Searches for a customer from the United States with a name like 'Jane'. Query = $"email:{emailAddress}" }; var customer = (await customerService.SearchAsync(filter)).Items.FirstOrDefault(); if (customer != null) { var customerOrders =await customerService.ListOrdersForCustomerAsync(customer.Id.Value); }
but it is returning 0 orders.
The text was updated successfully, but these errors were encountered: