Contents
On this page

Create Modifier Group - Plugixa POS for WooCommerce

POST /plugixa-pos/v1/modifier-groups

Add a group of options.

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

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

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": false,
  "options": [
    {
      "name": "Oat milk",
      "price": "0.50"
    },
    {
      "name": "Soy milk",
      "price": "0.50"
    }
  ],
  "category_ids": [118]
}

Responses

201 Created.

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Milk",
    "required": false,
    "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
400 rest_missing_callback_param name or options is missing.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/modifier-groups" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"name":"Milk","required":false,"options":[{"name":"Oat milk","price":"0.50"},{"name":"Soy milk","price":"0.50"}],"category_ids":[118]}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/modifier-groups');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    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'     => false,
        'options'      => [
            [
                'name'  => 'Oat milk',
                'price' => '0.50',
            ],
            [
                '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', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Milk', required: false, options: [{ name: 'Oat milk', price: '0.50' }, { name: 'Soy milk', price: '0.50' }], category_ids: [118] }),
});
const { data } = await response.json();

Quick Links

Share