Contents
On this page

Open Session - Plugixa POS for WooCommerce

POST /plugixa-pos/v1/sessions/open

Open the register for the day with the cash in the drawer. A register has one open session at a time.

Needs a user with the plugixa_pos_manage_sessions 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. The user must also be allowed to use the register (register access).

Request

POST https://your-site.example/wp-json/plugixa-pos/v1/sessions/open

Request body

Content type: application/json

Field Type Required Description
register_id integer Yes The register.
opening_float string No Cash in the drawer, decimal string. Defaults to 0.
{
  "register_id": 1,
  "opening_float": "150.00"
}

Responses

201 Created. data is the session, fields as in Get Current Session.

{
  "success": true,
  "data": {
    "id": 85,
    "register_id": 1,
    "opened_by": 87,
    "closed_by": null,
    "opening_float": 15000,
    "expected": null,
    "counted": null,
    "difference": null,
    "status": "open",
    "opened_at": "2026-11-16 08:47:00",
    "closed_at": null,
    "updated_at": "2026-11-16 08:47:00"
  }
}

Errors

Status Code When
403 plugixa_pos_register_forbidden The register is missing or archived, or the user may not use it.
409 plugixa_pos_session_open The register already has an open session.
422 plugixa_pos_invalid_amount The float is negative.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share