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.

POST /manage/save_fiscal_device

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).
{
  "port": "COMx",
  "baud_rate": 115200
}
Network Windows & Android Used for devices connected via LAN or WiFi.
{
  "ip_address": "192.168.1.100",
  "port": 9100
}
Usb Android Only Direct USB connection using Android USB Host API.
{
  "device_selector": "vid:pid",
  "baud_rate": 115200
}

Response:

{
  "success": true,
  "message": "Fiscal device saved successfully"
}

Delete Fiscal Device

Removes a fiscal device configuration.

POST /manage/delete_fiscal_device

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.

POST /manage/save_pos_terminal

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.

POST /manage/delete_pos_terminal

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).

POST /manage/get_available_com_ports

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.

POST /manage/get_supported_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.

POST /manage/get_notification_config

Response (NotificationConfig):

{
  "email_list": ["admin@example.com", "support@store.com"],
  "send_z_report_email": true
}

Save Notification Config

Updates the notification settings.

POST /manage/save_notification_config

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.

POST /manage/get_journal_entries

Request Body:

{
  "start_time": 1672531200000,
  "end_time": 1672617600000
}
Journal Entry Structure
Field Type Description
idnumberUnique incremental ID.
timestampstringISO 8601 timestamp.
device_namestringName of the device that performed the action.
action_typestringThe type of operation performed (see table below).
successbooleanWhether the operation was successful.
receipt_dataobject|nullThe original receipt request data (if applicable).
amount_centsnumber|nullThe monetary amount involved (if applicable).
full_textstring|nullRaw text output from the device (e.g., reports).
Action Types
Action Type Description Relevant Data Fields
PrintReceiptStandard fiscal receipt printing.receipt_data
NonFiscalReceiptPrinting non-fiscal text/documents.-
ZReportDaily Z Report (resets daily totals).amount_cents, full_text
XReportX Report (read-only totals).amount_cents, full_text
SaleDirect sale operation (POS).amount_cents
SettlementPOS Settlement/Batch Close.-
DepositCash deposit into the drawer.amount_cents
WithdrawCash withdrawal from the drawer.amount_cents
FiscalMemoryReportReport from fiscal memory.-
AnafExportExporting data for ANAF.-
ServiceConnectionService/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.

POST /manage/check_for_updates

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).

POST /manage/install_update

Request Body:

{
  "version": "1.2.0"
}

Response:

{
  "success": true,
  "message": "Update installation started"
}