Get all product list with API
-
Hello,
I am pretty new to this so sorry if my question is not explained well.
I have been struggling to do this and did not find any answer on forums.I am trying to get all the products from woocommerce.
I have read the API page and it worked with my code :headermap = Map(); headermap.put(rec.API_key,rec.API_secret); response = invokeurl [ url :"https://" + rec.store_URL + "/wp-json/wc/v3/products?consumer_key=" + rec.API_key + "&consumer_secret=" + rec.API_secret + "" type :GET headers:headermap ];
But this only retrieve 10 products at the time.
I have tried using the per_page as required but it did not change anything.
Here is the code with the per_page included. This one does not retrieve any result.headermap = Map(); headermap.put(rec.API_key,rec.API_secret); response = invokeurl [ url :"https://" + rec.store_URL + "/wp-json/wc/v3/products?per_page=-1?consumer_key=" + rec.API_key + "&consumer_secret=" + rec.API_secret + "" type :GET headers:headermap ];
Thank you very much for your help !
Regards
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get all product list with API’ is closed to new replies.