Catalog
Routes
| Method | Route | Permission | Since |
|---|---|---|---|
| GET | /products | Signed in | 1.4.0 |
| GET | /products/{id} | Signed in | 1.4.0 |
| GET | /products/{id}/availability | Public | 1.8.0 |
| PUT, PATCH | /products/{id}/availability | Management or store | 1.4.0 |
| GET | /catalog | Signed in | 1.4.0 |
| GET | /product-categories | Signed in | 1.4.0 |
| GET | /product-categories/{id} | Signed in | 1.4.0 |
| GET | /product-categories/{id}/products | Signed in | 1.4.0 |
Product lists require a signed-in user, even though those products are visible in the store. To show the catalog without a session, use the WooCommerce Store API.
Product object
{
"id": 120,
"name": "Smash clásica",
"price": "12000",
"price_html": "<span class=\"amount\">$ 12.000</span>",
"image_url": "https://tienda.example.test/wp-content/uploads/smash.jpg",
"currency_symbol": "$",
"is_enabled": true,
"extra_option_categories": [18],
"extra_options": [
{
"id": 18, "title": "Adiciones", "type": "checkbox-limitedchoice",
"minimum_options": 0, "maximum_options": 2, "required": false, "hide_prices": false,
"options": [ { "id": 91, "name": "Queso extra", "price": 3000, "sku": "", "prechecked": false } ]
}
]
}
Variable products include variations[] (each variation with its price, attributes and its own extras) and attributes[].
List and read products
GET /products
| Parameter | Notes |
|---|---|
page, per_page | Standard pagination. |
search | Search text. |
category | Product category ID. |
Returns only published products. GET /products/{id} responds 404 notiwoo_not_found if the product does not exist or is not published.
Availability
GET /products/{id}/availability is public and responds { product_id, available, reasons[] }. Possible reasons are not_found, not_published, manually_disabled and out_of_stock.
PUT /products/{id}/availability with { "enabled": false } disables a product while keeping it published, like the app's switch. Responds { id, enabled }.
curl -X PUT https://tienda.example.test/wp-json/notiwoo/v1/products/120/availability \
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{"enabled": false}'
Full catalog
GET /catalog returns every category that has products, each with its published products: data[] = { cat_id, name, products[] }. It is not paginated, so on large catalogs the response can be heavy. Cache it.
Product categories
GET /product-categories?hide_empty=truereturns{ id, name, slug, description, count, parent }, sorted by menu order.GET /product-categories/{id}/productsreturns the category's products, paginated.meta.categoryidentifies the category.
Extra filters in the WooCommerce API
Since 1.26.0, Notiwoo adds these parameters to GET /wp-json/wc/v3/products:
| Parameter | Values |
|---|---|
notiwoo_image | with or without: products with or without an image. |
notiwoo_extras | with or without: products with or without extras. |
notiwoo_extra_category | ID of an extra category. |
These are the same filters used in the app catalog.