Contents
On this page

Publish Group - Plugixa Extra Product Options

POST /plugixa-epo/v1/groups/{id}/publish

Check the draft and make it the published copy customers see. Product pages show it on the next request. See Option groups.

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.

Request

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

Path parameters

Name Type Description
id integer The group’s id

Request body

No body.

Responses

200 OK. data is the group, now published with dirty: false.

{
  "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": false,
    "published_at": "2026-11-21T09:14:02",
    "created_at": "2026-11-20T16:41:37",
    "modified_at": "2026-11-21T09:14:02"
  }
}

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.
422 plugixa_epo_not_publishable The draft has problems: Fix these before publishing. data.problems lists them, each { field, message }, for example { "field": "fm9d4c7wb", "message": "Field 2 needs a label." }. field is empty for a problem of the whole group, such as Add at least one field.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-store.example/wp-json/plugixa-epo/v1/groups/7/publish" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-epo/v1/groups/7/publish');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$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/publish', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share