Contents
Get Fiscal Device - Plugixa POS for WooCommerce
GET /plugixa-pos/v1/fiscal/devices/{id}
One device and where its chain stands.
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.
Request
GET https://your-site.example/wp-json/plugixa-pos/v1/fiscal/devices/1
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The device’s id |
Responses
200 OK.
{
"success": true,
"data": {
"id": 1,
"code": "D1",
"register_id": 1,
"last_seq": 1,
"last_hash": "cd75c28d88f899eeb2aae16eee0ac34afeffa1fd554732e8a938e0c8d61f0224",
"status": "active"
}
}
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_pos_not_found |
Not enrolled, or its register is not one the user may use. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-pos/v1/fiscal/devices/1" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/fiscal/devices/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/fiscal/devices/1', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share