WyzBooks WyzBooks v26.4.140658

REST API

WyzBooks includes an HTTP REST API that runs on localhost for external tools, testing, and automation. The API reads and writes the same data file as the desktop app.

Enabling the API

Go to Settings → Advanced and enable the REST API Server toggle. The API starts immediately on the configured port (default 3141). A status indicator shows Running or Stopped, and a link to the API documentation appears when running.

The API can also be started independently from the command line without launching the Electron app:

npm run api

API Documentation

When the API is running, full interactive documentation is available at:

http://127.0.0.1:3141/api/docs

The documentation is generated from an OpenAPI 3.0 specification (also available at /api/docs/openapi.json) and provides a Swagger UI where you can explore and test all endpoints.

Available Endpoints

The API provides 18 route groups covering all major data operations:

  • Accounts — List, create, update, and delete accounts. Filter by type or subtype.
  • Contacts — List, create, update, and delete customers and vendors.
  • Invoices — List, create, update, and delete invoices with line items.
  • Payments — Record, update, and delete customer payments. Auto-triggers A/R reconciliation.
  • Items — Manage the products and services catalog.
  • Journals — Create and manage journal entries with balanced debit/credit lines.
  • Bank Transactions — List, create, update, and delete bank and credit card register entries.
  • Reports — Generate any of the 17 financial reports with date range parameters. POST /reports/:key/compare accepts QB CSV content and returns matched/mismatched/qbOnly/wbOnly arrays with a summary. Supports 14 report types.
  • Import — Import IIF files, CSV transactions, and CSV enrichment data via the API.
  • Reconciliation — Run A/R reconciliation and bank reconciliation operations.
  • Bills & Terms — Manage vendor bills and payment terms.
  • Audit — Read audit log entries.
  • Data — Bulk data operations: GET /data/export returns data + prefs as JSON, GET /data/export/file downloads a .wyzbooks file, POST /data/import replaces data, POST /data/reset clears data and/or prefs.
  • Console — Browser-based debug console for inspecting server state.
  • System — Health check, version info, and system diagnostics.
  • Sync — Cloud Sync endpoints: SSE stream for real-time updates, push changes, and catch-up for reconnections. Used internally by the Cloud Sync client. Additional endpoints: GET /api/v1/sync/checksum returns per-collection SHA-256 checksums for divergence detection; GET /api/v1/sync/prefs and POST /api/v1/sync/prefs read and write synced preferences and INI theme sections.
  • MessagesDELETE /api/v1/messages/clear clears the server's cloud message queue.

Port Configuration

The default port is 3141. You can change it in Settings → Advanced (range: 1024–65535). If the API is already running, changing the port restarts the server on the new port automatically.

Cloud Sync Integration

When Cloud Sync is active, API mutations (invoice updates, journal entries, payments) automatically increment the sync version and broadcast changes to connected desktop clients via SSE. This means changes made through the API (e.g., from the Mobile PWA) appear on desktop instances in real time without manual sync.

Security

Tip

The API listens on 127.0.0.1 (localhost) only and is not accessible from other machines on your network. There is no authentication — any process on your Mac can access the API when it is running.

The API is designed for local automation, development, and testing. Do not expose it to the internet.