Contents
Get Current Session - Plugixa POS for WooCommerce
GET /plugixa-pos/v1/sessions/current
The register’s open cash session. data is null when the register is closed.
Needs a user with the plugixa_pos_sell 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
GET https://your-site.example/wp-json/plugixa-pos/v1/sessions/current?register_id=1
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
register_id |
integer |
Yes | The register. |
Responses
200 OK.
{
"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"
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The session’s id |
data.register_id |
integer |
Its register |
data.opened_by |
integer |
User who opened it |
data.closed_by |
integer|null |
User who closed it |
data.opening_float |
integer |
Opening float in minor units (cents): 15000 is 150.00 |
data.expected |
object|null |
When closed: expected amount per payment method, decimal strings |
data.counted |
object|null |
When closed: counted amount per method |
data.difference |
integer|null |
When closed: counted minus expected, minor units |
data.status |
string |
open or closed |
data.opened_at |
string |
UTC, Y-m-d H:i:s |
data.closed_at |
string|null |
UTC, Y-m-d H:i:s |
Errors
| Status | Code | When |
|---|---|---|
403 |
plugixa_pos_register_forbidden |
The register is missing or archived, or the user may not use it. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-pos/v1/sessions/current?register_id=1" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/sessions/current?register_id=1');
curl_setopt_array($ch, [
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-site.example/wp-json/plugixa-pos/v1/sessions/current?register_id=1', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share