Contents
On this page

Create Register - Plugixa POS for WooCommerce

POST /plugixa-pos/v1/registers

Add a register. It gets the next free code (R4, R5…).

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/registers

Request body

Content type: application/json

Field Type Required Description
name string Yes 1 to 190 characters.
outlet_id integer No The store. Without it, the default store. The store must be active.
{
  "name": "Terrace counter",
  "outlet_id": 1
}

Responses

201 Created. data is the register.

{
  "success": true,
  "data": {
    "id": 4,
    "outlet_id": 1,
    "code": "R4",
    "name": "Terrace counter",
    "settings": [],
    "status": "active",
    "created_at": "2026-11-19 15:30:00",
    "updated_at": "2026-11-19 15:30:00"
  }
}
Field Type Meaning
data.id integer The register’s id
data.outlet_id integer Its store
data.code string Short code (R1, R2…), given in order of creation, printed on receipts
data.name string Name
data.settings object Register settings, such as favourites (product ids)
data.status string active or archived

Errors

Status Code When
409 plugixa_pos_no_outlet The store is missing or archived, or no store exists.
500 plugixa_pos_register_create The register could not be created.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share