Extras
All routes on this page require management permission. For storefront behavior, see Extras and popup appearance.
Routes
| Method | Route | Since |
|---|---|---|
| GET, POST | /extras | 1.1.0 |
| GET, PUT, PATCH, DELETE | /extras/{id} | 1.1.0 |
| GET, POST | /extra-categories | 1.1.0 |
| GET, PUT, PATCH, DELETE | /extra-categories/{id} | 1.1.0 |
| GET, PUT, PATCH | /products/{id}/extra-categories | 1.1.0 |
| GET | /products/{id}/variations | 1.17.0 |
| GET, PUT, PATCH, DELETE | /products/{id}/variations/{variation_id}/extra-categories | 1.17.0 |
Extras
Extra object
{
"id": 91,
"name": "QUESO EXTRA 50G",
"visible_as": "Queso extra",
"sku": "",
"price": "3000",
"prechecked": false,
"enabled": true,
"categories": [ { "id": 18, "name": "Adiciones" } ],
"updated_at": "2026-09-30T17:15:00+00:00"
}
name is the internal name. visible_as is the name the customer sees; if empty, name is shown.
List
GET /extras with page, per_page, search and category_id. Sorted by name.
Create and edit
| Field | Notes |
|---|---|
name | Required on create. |
price | Decimal number ≥ 0. A decimal comma is accepted. |
visible_as, sku | Text. |
prechecked | Whether it is selected by default ("Preselected"). |
enabled | Whether it is active. |
category_ids | IDs of existing extra categories. Alias: categories. |
When editing, only the fields sent change. Categories are not created automatically: they must already exist.
curl -X POST https://tienda.example.test/wp-json/notiwoo/v1/extras \
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{"name": "QUESO EXTRA 50G", "visible_as": "Queso extra", "price": "3000", "category_ids": [18]}'
Delete
DELETE /extras/{id} deletes the extra permanently and removes it from its categories' ordering. Responds { deleted: true, id }.
Errors: 404 notiwoo_extra_not_found, 400 notiwoo_extra_name_required, 400 notiwoo_invalid_extra_price, 400 notiwoo_extra_category_not_found (details.category_id).
Extra categories
Category object
{
"id": 18,
"title": "Adiciones",
"visible_as": "Elige tus adiciones",
"style": "accordion",
"type": "checkbox-limitedchoice",
"minimum_options": 0,
"maximum_options": 2,
"required": false,
"hide_prices": false,
"enabled": true,
"global_categories": [7],
"extra_order": [94, 91],
"extras_count": 2,
"updated_at": "2026-09-30T17:20:00+00:00"
}
| Field | Values |
|---|---|
type | checkbox-multichoice (checkboxes), checkbox-limitedchoice (checkboxes with limited selection), radio or select (a single option). |
style | accordion or flat. |
minimum_options, maximum_options | Integers ≥ 0. radio and select set the maximum to 1. checkbox-limitedchoice needs a maximum of at least 1. The minimum cannot exceed the maximum. |
global_categories | Product category IDs: the extra category applies to all their products. |
extra_order | Order of the extras. All of them must exist and belong to the category, so save a new category first and order it afterwards. |
GET /extra-categories accepts search. It is not paginated: meta.total gives the total.
DELETE /extra-categories/{id} deletes it and removes it from all products and variations.
Common errors: 400 notiwoo_extra_category_title_required, 400 notiwoo_invalid_extra_category_type, 400 notiwoo_invalid_extra_category_range, 400 notiwoo_missing_extra_category_maximum, 400 notiwoo_ordered_extra_wrong_category, 404 notiwoo_extra_category_not_found.
Product extras
GET /products/{id}/extra-categories returns the categories assigned directly to the product. meta includes:
| Field | Meaning |
|---|---|
category_ids | Direct assignment, in order. |
effective_category_ids | What the customer will see: direct assignment plus global categories, excluding disabled ones. |
inherited | For a variation, whether it inherits the product's extras. |
extras_disabled | "No extras" state. |
PUT /products/{id}/extra-categories accepts category_ids (in order) and/or extras_disabled. You must send at least one of them.
curl -X PUT https://tienda.example.test/wp-json/notiwoo/v1/products/120/extra-categories \
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{"category_ids": [18, 12]}'
Variations
GET /products/{id}/variationslists the variations{ id, name, status, enabled }. For a simple product it returns[].PUT /products/{id}/variations/{variation_id}/extra-categoriessets the variation's own extras and stops inheriting the product's.DELETEon the same route removes the variation's own configuration and inherits again.
Errors: 404 notiwoo_invalid_product, 404 notiwoo_invalid_variation, 400 notiwoo_category_ids_required.