Contents
On this page

Update Webhook - Plugixa POS for WooCommerce

PUT /plugixa-pos/v1/webhooks/{id}

Change a webhook. Fields you leave out keep their value. 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/webhooks/1

Path parameters

Name Type Description
id integer The webhook’s id

Request body

Content type: application/json

Field Type Required Description
name string No Up to 120 characters.
url string No An https:// address on a public host. Private and local network addresses are refused.
events string[] No One or more of sale.completed, sale.refunded, layaway.payment, layaway.refunded, register.opened, register.closed, cash.movement, quote.created, quote.converted, stock.adjusted.
active boolean No Send or pause. Defaults to true.
{
  "active": false
}

Responses

200 OK.

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Accounting sync",
    "url": "https://hooks.example.com/pos",
    "events": ["sale.completed", "sale.refunded"],
    "active": false,
    "failure_count": 0,
    "last_status": 200,
    "last_sent_at": "2026-11-19 16:45:00",
    "signing": true,
    "deliveries": {
      "pending": 0,
      "delivered": 12,
      "failed": 0
    }
  }
}

Errors

Status Code When
404 plugixa_pos_not_found No webhook with that id.
422 plugixa_pos_invalid No name, or no known event.
422 plugixa_pos_webhook_url The address is not allowed. The message says why (not https, not found, private network).

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-pos/v1/webhooks/1" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"active":false}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/webhooks/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([
        'active' => false,
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/webhooks/1', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ active: false }),
});
const { data } = await response.json();

Quick Links

Share