Contents
On this page

Update Group - Plugixa Extra Product Options

PUT /plugixa-epo/v1/groups/{id}

Save the group’s draft. The published copy does not change: customers see your changes after you publish. Send only what changes. PATCH and POST work the same.

Needs a user with the plugixa_epo_manage capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators and shop managers hold it; see Permissions.

Note. priority applies on the store at once, without publishing: it is the group’s place among groups, not part of its form.

Request

PUT https://your-store.example/wp-json/plugixa-epo/v1/groups/7

Path parameters

Name Type Description
id integer The group’s id

Request body

Content type: application/json

Field Type Required Description
title string No The group’s name.
priority integer No Lower comes first.
doc object No The whole group document. It replaces the draft: send every field, not only the changed one.
{
  "title": "Gift options",
  "doc": {
    "fields": [
      {
        "id": "fk3q8x2ma",
        "type": "radio",
        "label": "Gift wrap",
        "description": "",
        "placeholder": "",
        "required": true,
        "default": "ow1n5d2kq",
        "price_type": "none",
        "price": 0,
        "min": null,
        "max": null,
        "step": null,
        "maxlength": null,
        "options": [
          {
            "id": "ow1n5d2kq",
            "label": "No wrapping",
            "price_type": "none",
            "price": 0,
            "meta": []
          },
          {
            "id": "op7r2v9tc",
            "label": "Gift wrap",
            "price_type": "flat",
            "price": 4,
            "meta": []
          }
        ],
        "logic": {
          "enabled": false,
          "action": "show",
          "match": "all",
          "rules": []
        },
        "meta": []
      },
      {
        "id": "fm9d4c7wb",
        "type": "textarea",
        "label": "Card message",
        "description": "Printed on a card in the box.",
        "placeholder": "Happy birthday, Emma!",
        "required": false,
        "default": "",
        "price_type": "none",
        "price": 0,
        "min": null,
        "max": null,
        "step": null,
        "maxlength": 150,
        "options": [],
        "logic": {
          "enabled": true,
          "action": "show",
          "match": "all",
          "rules": [
            {
              "field": "fk3q8x2ma",
              "op": "equals",
              "value": "op7r2v9tc"
            }
          ]
        },
        "meta": []
      },
      {
        "id": "fd2h6t1ys",
        "type": "date",
        "label": "Deliver on",
        "description": "Leave empty for the first available day.",
        "placeholder": "",
        "required": false,
        "default": "",
        "price_type": "none",
        "price": 0,
        "min": null,
        "max": null,
        "step": null,
        "maxlength": null,
        "options": [],
        "logic": {
          "enabled": false,
          "action": "show",
          "match": "all",
          "rules": []
        },
        "meta": []
      }
    ],
    "targets": {
      "all": false,
      "products": [],
      "categories": [21]
    }
  }
}

Responses

200 OK. data is the group, with dirty: true.

{
  "success": true,
  "data": {
    "id": 7,
    "title": "Gift options",
    "status": "published",
    "priority": 10,
    "draft": {
      "version": 1,
      "fields": ["…"],
      "targets": {
        "all": false,
        "products": [],
        "categories": [21]
      }
    },
    "published": {
      "version": 1,
      "fields": ["…"],
      "targets": {
        "all": false,
        "products": [],
        "categories": [21]
      }
    },
    "dirty": true,
    "published_at": "2026-11-21T09:14:02",
    "created_at": "2026-11-20T16:41:37",
    "modified_at": "2026-11-21T10:31:09"
  }
}

Fields as in Get Group.

Errors

Status Code When
401 / 403 plugixa_epo_forbidden The caller lacks the capability: You are not allowed to do that.
404 plugixa_epo_not_found No group has this id: Not found.
400 plugixa_epo_title_required title is empty: Give the group a name.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-store.example/wp-json/plugixa-epo/v1/groups/7" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"title":"Gift options","doc":{"fields":[{"id":"fk3q8x2ma","type":"radio","label":"Gift wrap","description":"","placeholder":"","required":true,"default":"ow1n5d2kq","price_type":"none","price":0,"min":null,"max":null,"step":null,"maxlength":null,"options":[{"id":"ow1n5d2kq","label":"No wrapping","price_type":"none","price":0,"meta":[]},{"id":"op7r2v9tc","label":"Gift wrap","price_type":"flat","price":4,"meta":[]}],"logic":{"enabled":false,"action":"show","match":"all","rules":[]},"meta":[]},{"id":"fm9d4c7wb","type":"textarea","label":"Card message","description":"Printed on a card in the box.","placeholder":"Happy birthday, Emma!","required":false,"default":"","price_type":"none","price":0,"min":null,"max":null,"step":null,"maxlength":150,"options":[],"logic":{"enabled":true,"action":"show","match":"all","rules":[{"field":"fk3q8x2ma","op":"equals","value":"op7r2v9tc"}]},"meta":[]},{"id":"fd2h6t1ys","type":"date","label":"Deliver on","description":"Leave empty for the first available day.","placeholder":"","required":false,"default":"","price_type":"none","price":0,"min":null,"max":null,"step":null,"maxlength":null,"options":[],"logic":{"enabled":false,"action":"show","match":"all","rules":[]},"meta":[]}],"targets":{"all":false,"products":[],"categories":[21]}}}'
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-epo/v1/groups/7');
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([
        'title' => 'Gift options',
        'doc'   => [
            'fields'  => [
                [
                    'id'          => 'fk3q8x2ma',
                    'type'        => 'radio',
                    'label'       => 'Gift wrap',
                    'description' => '',
                    'placeholder' => '',
                    'required'    => true,
                    'default'     => 'ow1n5d2kq',
                    'price_type'  => 'none',
                    'price'       => 0,
                    'min'         => null,
                    'max'         => null,
                    'step'        => null,
                    'maxlength'   => null,
                    'options'     => [
                        [
                            'id'         => 'ow1n5d2kq',
                            'label'      => 'No wrapping',
                            'price_type' => 'none',
                            'price'      => 0,
                            'meta'       => [],
                        ],
                        [
                            'id'         => 'op7r2v9tc',
                            'label'      => 'Gift wrap',
                            'price_type' => 'flat',
                            'price'      => 4,
                            'meta'       => [],
                        ],
                    ],
                    'logic'       => [
                        'enabled' => false,
                        'action'  => 'show',
                        'match'   => 'all',
                        'rules'   => [],
                    ],
                    'meta'        => [],
                ],
                [
                    'id'          => 'fm9d4c7wb',
                    'type'        => 'textarea',
                    'label'       => 'Card message',
                    'description' => 'Printed on a card in the box.',
                    'placeholder' => 'Happy birthday, Emma!',
                    'required'    => false,
                    'default'     => '',
                    'price_type'  => 'none',
                    'price'       => 0,
                    'min'         => null,
                    'max'         => null,
                    'step'        => null,
                    'maxlength'   => 150,
                    'options'     => [],
                    'logic'       => [
                        'enabled' => true,
                        'action'  => 'show',
                        'match'   => 'all',
                        'rules'   => [
                            [
                                'field' => 'fk3q8x2ma',
                                'op'    => 'equals',
                                'value' => 'op7r2v9tc',
                            ],
                        ],
                    ],
                    'meta'        => [],
                ],
                [
                    'id'          => 'fd2h6t1ys',
                    'type'        => 'date',
                    'label'       => 'Deliver on',
                    'description' => 'Leave empty for the first available day.',
                    'placeholder' => '',
                    'required'    => false,
                    'default'     => '',
                    'price_type'  => 'none',
                    'price'       => 0,
                    'min'         => null,
                    'max'         => null,
                    'step'        => null,
                    'maxlength'   => null,
                    'options'     => [],
                    'logic'       => [
                        'enabled' => false,
                        'action'  => 'show',
                        'match'   => 'all',
                        'rules'   => [],
                    ],
                    'meta'        => [],
                ],
            ],
            'targets' => [
                'all'        => false,
                'products'   => [],
                'categories' => [21],
            ],
        ],
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-store.example/wp-json/plugixa-epo/v1/groups/7', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ title: 'Gift options', doc: { fields: [{ id: 'fk3q8x2ma', type: 'radio', label: 'Gift wrap', description: '', placeholder: '', required: true, default: 'ow1n5d2kq', price_type: 'none', price: 0, min: null, max: null, step: null, maxlength: null, options: [{ id: 'ow1n5d2kq', label: 'No wrapping', price_type: 'none', price: 0, meta: [] }, { id: 'op7r2v9tc', label: 'Gift wrap', price_type: 'flat', price: 4, meta: [] }], logic: { enabled: false, action: 'show', match: 'all', rules: [] }, meta: [] }, { id: 'fm9d4c7wb', type: 'textarea', label: 'Card message', description: 'Printed on a card in the box.', placeholder: 'Happy birthday, Emma!', required: false, default: '', price_type: 'none', price: 0, min: null, max: null, step: null, maxlength: 150, options: [], logic: { enabled: true, action: 'show', match: 'all', rules: [{ field: 'fk3q8x2ma', op: 'equals', value: 'op7r2v9tc' }] }, meta: [] }, { id: 'fd2h6t1ys', type: 'date', label: 'Deliver on', description: 'Leave empty for the first available day.', placeholder: '', required: false, default: '', price_type: 'none', price: 0, min: null, max: null, step: null, maxlength: null, options: [], logic: { enabled: false, action: 'show', match: 'all', rules: [] }, meta: [] }], targets: { all: false, products: [], categories: [21] } } }),
});
const { data } = await response.json();

Quick Links

Share