Headless API
The Headless API is a specialized set of HTTP endpoints designed for managing the FisCool driver programmatically, without user interaction via the GUI. This is ideal for integrated environments where the driver runs in the background and is managed entirely by the host application.
All endpoints are available under the /manage path and accept/return JSON.
Device Management
Save Fiscal Device
Adds or updates a fiscal device configuration.
Important: Before saving a device, call /manage/get_supported_devices to retrieve the valid manufacturer and model values. You must use the exact strings returned by that endpoint.
Note: Provide the id field only when editing an existing device. If id is missing or null, a new device will be created.
Request Body (DeviceConfig):
{
"id": "uuid-string",
"name": "My Printer",
"manufacturer": "Datecs",
"model": "DP25",
"connection_details": {
"type": "Serial",
"details": {
"port": "COM3",
"baud_rate": 115200
}
},
"notes": "Main register"
}
Connection Types & Platform Support
| Type | Platform Support | Description | JSON Details Structure |
|---|---|---|---|
Serial |
Windows Only | Used for physical COM ports and USB-to-Serial converters (VCP). |
|
Network |
Windows & Android | Used for devices connected via LAN or WiFi. |
|
Usb |
Android Only | Direct USB connection using Android USB Host API. |
|
Response:
{
"success": true,
"message": "Fiscal device saved successfully"
}
Delete Fiscal Device
Removes a fiscal device configuration.
Request Body:
{
"id": "uuid-string"
}
Response:
{
"success": true,
"message": "Fiscal device deleted successfully"
}
Save POS Terminal
Adds or updates a POS terminal configuration. Follows the same connection rules as fiscal devices.
Note: Provide the id field only when editing an existing device. If id is missing or null, a new device will be created.
Request Body (DeviceConfig):
{
"id": "uuid-string",
"name": "My POS",
"manufacturer": "VivaWallet",
"model": "Q30",
"connection_details": {
"type": "Network",
"details": {
"ip_address": "192.168.1.50",
"port": 2000
}
},
"notes": "Counter 1"
}
Response:
{
"success": true,
"message": "POS terminal saved successfully"
}
Delete POS Terminal
Removes a POS terminal configuration.
Request Body:
{
"id": "uuid-string"
}
Response:
{
"success": true,
"message": "POS terminal deleted successfully"
}
System & Configuration
Get Available COM Ports
Lists all available serial ports on the system (Windows only).
Response:
[
"COM1",
"COM3",
"COM4"
]
Get Supported Devices
Returns a list of supported manufacturers and models for both fiscal devices and POS terminals. Use these values when creating new devices.
Response (SupportedDevices):
{
"fiscal": {
"manufacturers": [
{
"value": "DATECS",
"label": "DATECS",
"models": ["DP25", "DP25 MX", "DP05", "DP150", "FP650", "FP700", "FP800", "WP50"],
"default_port": 3999,
"supports_serial": true,
"supports_network": true
},
{
"value": "Daisy",
"label": "Daisy",
"models": ["eXpert SX", "Expert L", "Perfect M", "Compact S", "Compact M"],
"default_port": null,
"supports_serial": true,
"supports_network": false
},
{
"value": "Tremol",
"label": "Tremol",
"models": ["A19 Plus", "M20", "M23", "S21", "S25", "Tremol S"],
"default_port": null,
"supports_serial": true,
"supports_network": true
}
]
},
"pos": {
"banks": ["Banca Transilvania", "BCR"],
"manufacturers": [
{
"value": "Ingenico",
"label": "Ingenico",
"models": ["Desk3200", "Desk3500"],
"default_port": null,
"supports_serial": true,
"supports_network": true
},
{
"value": "PAX",
"label": "PAX",
"models": ["A920", "A920 Pro"],
"default_port": null,
"supports_serial": true,
"supports_network": true
}
]
}
}
Get Notification Config
Retrieves the current notification settings.
Response (NotificationConfig):
{
"email_list": ["admin@example.com", "support@store.com"],
"send_z_report_email": true
}
Save Notification Config
Updates the notification settings.
Request Body (NotificationConfig):
{
"email_list": ["admin@example.com", "manager@example.com"],
"send_z_report_email": true
}
Response:
{
"success": true,
"message": "Notification config saved successfully"
}
Journal & Updates
Get Journal Entries
Retrieves operation logs/journal entries. Useful for auditing and history.
Request Body:
{
"start_time": 1672531200000,
"end_time": 1672617600000
}
Journal Entry Structure
| Field | Type | Description |
|---|---|---|
id | number | Unique incremental ID. |
timestamp | string | ISO 8601 timestamp. |
device_name | string | Name of the device that performed the action. |
action_type | string | The type of operation performed (see table below). |
success | boolean | Whether the operation was successful. |
receipt_data | object|null | The original receipt request data (if applicable). |
amount_cents | number|null | The monetary amount involved (if applicable). |
full_text | string|null | Raw text output from the device (e.g., reports). |
Action Types
| Action Type | Description | Relevant Data Fields |
|---|---|---|
PrintReceipt | Standard fiscal receipt printing. | receipt_data |
NonFiscalReceipt | Printing non-fiscal text/documents. | - |
ZReport | Daily Z Report (resets daily totals). | amount_cents, full_text |
XReport | X Report (read-only totals). | amount_cents, full_text |
Sale | Direct sale operation (POS). | amount_cents |
Settlement | POS Settlement/Batch Close. | - |
Deposit | Cash deposit into the drawer. | amount_cents |
Withdraw | Cash withdrawal from the drawer. | amount_cents |
FiscalMemoryReport | Report from fiscal memory. | - |
AnafExport | Exporting data for ANAF. | - |
ServiceConnection | Service/Maintenance connection. | - |
Response Example:
[
{
"id": 1024,
"timestamp": "2023-10-27T10:30:00Z",
"device_name": "Main Printer",
"device_id": "uuid-string",
"action_type": "PrintReceipt",
"description": "Printed receipt #123",
"success": true,
"error_message": null,
"receipt_data": { "items": [...] },
"amount_cents": 1500,
"full_text": null
}
]
Check for Updates
Checks if a new version of the driver is available.
Response (UpdateCheckResponse):
{
"has_update": true,
"latest_version": "1.2.0",
"versions": [
{
"version": "1.2.0",
"description": "Added support for new Datecs models",
"date": "2023-10-25",
"manifest_url": "https://...",
"is_current": false,
"is_newer": true
}
]
}
Install Update
Triggers the update installation process. Requires user confirmation on the host machine unless running in a fully silent mode (if supported).
Request Body:
{
"version": "1.2.0"
}
Response:
{
"success": true,
"message": "Update installation started"
}