• Resolved billfleischersonymusic

    (@billfleischersonymusic)


    Hi Everyone,

    I’m on a project in which we need to pull created AND modified records from our WooCommerce database on a daily basis. At the moment the REST API for WooCommerce does not allow for extraction of data via a modified date parameter (i.e. from ORDERS, PRODUCTS, or CUSTOMERS). Currently, there are BEFORE and AFTER parameters that are tied to ‘date created’ (on ORDERS, PRODUCTS). Customers has no before/after parameters. We need the ability to pull data by Modified Date for these objects. Can parameters be added to the APIs to support queries against ‘date_modified’?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    Hi @billfleischersonymusic,

    It is not possible to pull orders by targeting the date_modified field. The document you’ve linked to shows the parameters that you have available to you.

    You can pull all orders and order by the modified date if that helps you achieve what you’re looking for.

    The before and after parameters allow you to filter for orders that were created before or after a given ISO8601 compliant date. So, you can select only orders that were created after Cyber Monday, for example.

    Can parameters be added to the APIs to support queries against ‘date_modified’?

    This would require you to write custom code or possibly try to contribute this to the project. You can find the WooCommerce GitHub repository here – https://github.com/woocommerce/woocommerce

    Thread Starter billfleischersonymusic

    (@billfleischersonymusic)

    Thank you for the comprehensive feedback! Appreciated

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modified Date Parameter for WooCommerce REST API’ is closed to new replies.