Creating Invoices via API
Programmatic creation of incoming and outgoing invoices via REST API. Allows external systems (e-shops, CRM, ERP) to automatically create invoices in FaktApp without manual entry.
Screenshots and a more detailed guide are coming soon.
API key authentication
All API calls require authentication using an API key. The key is sent in the 'jv-api-key' HTTP header. You obtain the API key in the application administration. All endpoints use the POST method and accept/return data in JSON format.
Creating an incoming invoice
Endpoint POST /api/create-incoming-invoice accepts JSON with 'InvoiceData' field containing serialized invoice data (invoice number, supplier, buyer, amounts, dates, bank details). After submission, the system creates or updates the invoice in the database. The response contains 'success' and 'message' fields. After creation, AI extraction from the attached document is automatically triggered.
Creating an outgoing invoice
Endpoint POST /api/create-outgoing-invoice accepts JSON with 'Document' (binary PDF document) and 'InvoiceData' (serialized invoice data) fields. The system creates the outgoing invoice, automatically generates ISDOC or ZUGFeRD PDF based on the buyer's country, and triggers the OnInvoiceDocumentGenerated event for potential automatic dispatch to external systems.
Uploading an invoice document
Endpoint POST /api/load-invoices accepts binary file content ('Content' field) and file name ('FileName' field). The system creates a new invoice with the uploaded document. This endpoint is suitable for bulk uploading PDF documents, for example from accounting software or email attachments.
Generating invoice from external system (Makej)
Endpoint POST /api/generate-employee-invoice-makej accepts invoice data from the Makej system. The system automatically: generates an invoice number (format YY-MM-DD-NNN), creates a variable symbol, sets the status to 'Pending Approval', assigns the supplier from the company profile, finds the matching bank account by currency, generates an ISDOC PDF, and sends an email notification about the new invoice.
