Contents
On this page

Update Modifier Group - Plugixa POS for WooCommerce

PUT /plugixa-pos/v1/modifier-groups/{id}

Replace a group. name and options are required again. POST and PATCH work the same way.

Needs a user with the plugixa_pos_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; other roles only when you grant it.

Request

PUT https://your-site.example/wp-json/plugixa-pos/v1/modifier-groups/1

Path parameters

Name Type Description
id integer The modifier group’s id

Request body

Content type: application/json

Field Type Required Description
name string Yes 1 to 100 characters.
required boolean No The cashier must choose.
multiple boolean No Several options may be chosen. Without it, max_choices is 1.
max_choices integer No With multiple: the most options, 0 for no limit, up to 50.
options object[] Yes Up to 50: name, price (decimal string, added to the unit price), and id of an existing option.
product_ids integer[] No Products it applies to.
category_ids integer[] No Categories it applies to.
sort integer No Display order.
{
  "name": "Milk",
  "required": true,
  "options": [
    {
      "id": 1,
      "name": "Oat milk",
      "price": "0.60"
    },
    {
      "id": 2,
      "name": "Soy milk",
      "price": "0.50"
    }
  ],
  "category_ids": [118]
}

Responses

200 OK.

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Milk",
    "required": true,
    "multiple": false,
    "max_choices": 1,
    "options": [
      {
        "id": 1,
        "name": "Oat milk",
        "price": "0.50"
      },
      {
        "id": 2,
        "name": "Soy milk",
        "price": "0.50"
      }
    ],
    "product_ids": [],
    "category_ids": [118],
    "sort": 1,
    "updated_at": "2026-11-19 15:40:00"
  }
}

Errors

Status Code When
404 plugixa_pos_not_found No modifier group with that id.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-pos/v1/modifier-groups/1" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"name":"Milk","required":true,"options":[{"id":1,"name":"Oat milk","price":"0.60"},{"id":2,"name":"Soy milk","price":"0.50"}],"category_ids":[118]}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/modifier-groups/1');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'name'         => 'Milk',
        'required'     => true,
        'options'      => [
            [
                'id'    => 1,
                'name'  => 'Oat milk',
                'price' => '0.60',
            ],
            [
                'id'    => 2,
                'name'  => 'Soy milk',
                'price' => '0.50',
            ],
        ],
        'category_ids' => [118],
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/modifier-groups/1', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Milk', required: true, options: [{ id: 1, name: 'Oat milk', price: '0.60' }, { id: 2, name: 'Soy milk', price: '0.50' }], category_ids: [118] }),
});
const { data } = await response.json();

Quick Links

Share