netlify/gocommerce

Add additional filtering capabilities to orders api

RoseannaM opened this issue · 2 comments

- Do you want to request a feature or report a bug?
Feature

- What is the current behavior?
We can filter by shipping country and if an order includes tax.

- What is the expected behavior?

To filter orders by:
- Date to and from
- Billing status
- Shipping status
- Product type
- EU Counties
- Not EU Countries
image

@RoseannaM heads up:

  • Filtering by countries is already possible with billing_countries and shipping_countries:
    • Billing Address: /users/all/orders?billing_countries=Germany,USA
    • Shipping Address: /users/all/orders?shipping_countries=Germany,USA
    • When drafting my proposal for this issue @bcomnes and I agreed that we'd like to have the list of "EU Countries" in the frontend to keep the API lean. I hope this is fine.
    • I will make it possible to do a negative filter for [...]_countries
  • Filtering by item type is already possible with item_type:
    • Example: /users/all/orders?item_type=ebook
  • Filtering by order creation time range is already possible with from and to:
    • Uses unix timestamps (seconds) - JS Hint: Date.getTime() / 1000
    • Example: /users/all/orders?from=1539885572

Awesome. I will add these filter capabilities asap.