Unable to list orders using WC REST API v3, although listing of products and customers work


I currently run a webshop on WordPress 5.4.2 and WooCommerce 4.5.2.

As instructed in the WooCommerce REST API docs, I am using the latest v3 REST API for WooCommerce.

With this API, I can perfectly list products and customers, but whenever I try to list orders I always get an empty array as answer. (Postman result = [])
I do have several orders in the WooCommerce dashboard, so don’t really know what’s going wrong here.

This is how I construct my GET request urls:

  • /wp-json/wc/v3/products?consumer_key=ck_xxx&consumer_secret=cs_xxx
  • /wp-json/wc/v3/customers?consumer_key=ck_xxx&consumer_secret=cs_xxx
  • /wp-json/wc/v3/orders?consumer_key=ck_xxx&consumer_secret=cs_xxx

Any ideas what’s preventing me from listing orders correctly? Is there any special about listening orders that I might have overlooked?

Alec Seynaeve 4 months 0 Answers 12 views 0

Leave an answer