REST API Issue
-
While trying to get all product/Categories from Woocommerce I am only getting a few instead of the 500 Categories that I have created programmatically. Any advice?
I am using A Python wrapper for the WooCommerce REST API called “WooCommerce 1.2.0”. Can be find => https://pypi.python.org/pypi/WooCommerce
I am executing the following code from Python
“…
from woocommerce import API
…
wcapi = API(
url=”https://99.99.99.99″,
consumer_key=”ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXX”,
consumer_secret=”cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXX”,
wp_api=True,
version=”wc/v1″
)
r = wcapi.get(“products/categories/”)
r.json()
…”No error message received. Retrieved only a few categories instead of the 500 that are in WooCommerce.
Have seen that there is a parameter called “per_page” to determine the maximum number of items to be returned in result set. How should I apply in the code above?https://woothemes.github.io/woocommerce-rest-api-docs/#list-all-product-categories
Regards,
Mariano
- The topic ‘REST API Issue’ is closed to new replies.