Home
API Endpoint
All you need to do is send a POST request to /api/invoice with the following JSON data.
{
"filename": "optional_invoice_filename.pdf", // Optional: Specify desired filename for the generated invoice file
"metadata": {
"invoiceNumber": "16",
"referenceNumber": "REF-001", // Optional: Provide a reference number for the invoice
"invoiceDate": "2023-05-21",
"dueDate": "2023-06-21",
"vatRate": 20, // Optional: Specify the VAT rate for the invoice (Value between 0 and 100)
"surchargeRate": "0.25", // Optional: Specify a surcharge rate for an overdue payment
"productType": "goods" // Optional: Specify the type of products for the invoice (goods or services)
},
"company": {
"name": "ABC Company",
"registryNumber": "123456789",
"streetAddress": "123 Main Street",
"city": "New York",
"county": "Example County",
"postcode": "12345",
"email": "company@example.com",
"logo": {
"src": "https://example.com/logo.png" // Optional: Specify the URL of the company's logo image
"position": "right" // Optional: Specify where the logo should be positioned (left, center, right)
},
"url": "https://example.com", // Optional: Specify the company's website URL
"bankAccount": {
"iban": "1234567890",
"swift": "ABCDUS12345"
}
},
"client": {
"name": "XYZ Client",
"registryNumber": "987654321",
"streetAddress": "456 Market Street",
"city": "Los Angeles",
"county": "Example County",
"postcode": "67890",
"email": "client@example.com"
},
"items": [
{
"description": "Product A",
"quantity": 2,
"unitPrice": 10.99
},
{
"description": "Product B",
"quantity": 1,
"unitPrice": 5.99
}
]
}