Contents
On this page
Verify Journal - Plugixa POS for WooCommerce
POST /plugixa-pos/v1/fiscal/verify
Recompute the register’s journal chain and the technical (audit) log chain, and say whether both are intact. The check itself is written to the audit log.
Needs a user with the plugixa_pos_fiscal_audit 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/fiscal/verify
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
register_id |
integer |
Yes | The register. |
{
"register_id": 1
}
Responses
200 OK. data.ok is true when both chains are intact.
With Pro French fiscal compliance, more checks are added through the plugixa_pos_fiscal_verify filter.
{
"success": true,
"data": {
"ok": true,
"rows": 396,
"broken_at": null,
"reason": null,
"audit": {
"ok": true,
"rows": 90,
"broken_at": null,
"reason": null
}
}
}
| Field | Type | Meaning |
|---|---|---|
data.ok |
boolean |
Both chains intact |
data.rows |
integer |
Journal entries checked |
data.broken_at |
integer|null |
First sequence number where the journal chain breaks |
data.reason |
string|null |
gap (a missing number), prev_hash (the link to the entry before is wrong) or hash (the entry was changed) |
data.audit |
object |
The same four fields for the audit log |
Errors
This endpoint has no errors of its own.
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/fiscal/verify" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"register_id":1}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/fiscal/verify');
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,
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/fiscal/verify', {
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 }),
});
const { data } = await response.json();
Quick Links
Share