create_invoice
Generate and manage invoices by entering client and item details, setting payment terms, and customizing reminders. Automatically send invoices via email and create payment QR codes. Supports multiple currencies and VAT configurations.
Instructions
Create a new invoice. Ask for additional information if needed, for example:
- If the client is not found, ask for the client details and create a new client if necessary.
- If pyament reminder should be sent, ask for the reminder settings.
- If the invoice type is GOODS, ask for the delivery date.
- If the invoice type is SERVICES, ask for the service start and end dates.
- If the invoice should be sent to the client, ask for the email data.
Args:
client_id: ID of the client for the invoice
items: List of invoice items, each containing name, quantity, rate, vatRate and total.
Example: [{"name": "Software Development", "quantity": 3, "rate": 30000, "vatRate": 19, "total": 1071}] // VAT rates might be 0, 7, 19. By default it's 19. Rate and total are in cents.
invoice_number: Optional invoice number (will be auto-generated if not provided)
issued: Issue date in YYYY-MM-DD format
due_to: Due date in YYYY-MM-DD format
currency: Invoice currency (EUR, USD), by default it's EUR
payment_terms: Payment terms text
notes: Additional notes
language: Invoice language (en, de)
invoice_type: Type of invoice (SERVICES, GOODS)
is_vat_included: Whether prices include VAT
bank_name: Name of the bank (gets from company details if exists)
iban: IBAN for payments (gets from company details if exists)
bic: BIC/SWIFT code (gets from company details if exists)
create_qr: Whether to create payment QR code (only if BIC and IBAN provided)
color_schema: Invoice style color (hex code)
font: Invoice font (e.g. "Plus Jakarta Sans", "Inter")
is_to_send: Whether to send invoice automatically to client
mailing_data: Email data if is_to_send is True. Example: {
"emailSubject": "Invoice No.{invoice_number} for {client_name}",
"emailBody": "Dear {client_name},...",
"customClientEmail": "client@example.com" // email to send the invoice to, if not provided, it will be sent to the client email address
}
settings_on_overdue: Configuration for overdue notifications. Example: {
"isToAutosendNotification": true, // whether to send notification automatically
"customEmailSubject": "Reminder: Invoice {invoice_number} is overdue", // custom email subject
"customEmailBody": "Dear {client_name},...", // custom email body
"notifyAfterDays": [1, 3], // days to notify after the due date
"notifyInParticularDays": [] // days to notify in particular dates [2025-05-23", "2025-05-24"]
}
service_start_date: Service period start date (YYYY-MM-DD) by default it's today, should be provided if invoice_type is SERVICES
service_end_date: Service period end date (YYYY-MM-DD) by default it's one month from today, should be provided if invoice_type is SERVICES
delivery_date: Delivery date for goods (YYYY-MM-DD) by default it's today, should be provided if invoice_type is GOODS
Returns:
Information about the created invoice and always include the generated invoice pdf url from reportUrl field
Input Schema
Name | Required | Description | Default |
---|---|---|---|
bank_name | No | ||
bic | No | ||
client_id | Yes | ||
color_schema | No | #FFFFFF | |
create_qr | No | ||
currency | No | EUR | |
delivery_date | No | ||
due_to | No | ||
font | No | Plus Jakarta Sans | |
iban | No | ||
invoice_number | No | ||
invoice_type | No | SERVICES | |
is_to_send | No | ||
is_vat_included | No | ||
issued | No | ||
items | Yes | ||
language | No | en | |
mailing_data | No | ||
notes | No | ||
payment_terms | No | ||
service_end_date | No | ||
service_start_date | No | ||
settings_on_overdue | No |
Input Schema (JSON Schema)
{
"properties": {
"bank_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Bank Name"
},
"bic": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Bic"
},
"client_id": {
"title": "Client Id",
"type": "string"
},
"color_schema": {
"default": "#FFFFFF",
"title": "Color Schema",
"type": "string"
},
"create_qr": {
"default": false,
"title": "Create Qr",
"type": "boolean"
},
"currency": {
"default": "EUR",
"title": "Currency",
"type": "string"
},
"delivery_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Delivery Date"
},
"due_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Due To"
},
"font": {
"default": "Plus Jakarta Sans",
"title": "Font",
"type": "string"
},
"iban": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Iban"
},
"invoice_number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Invoice Number"
},
"invoice_type": {
"default": "SERVICES",
"title": "Invoice Type",
"type": "string"
},
"is_to_send": {
"default": false,
"title": "Is To Send",
"type": "boolean"
},
"is_vat_included": {
"default": false,
"title": "Is Vat Included",
"type": "boolean"
},
"issued": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued"
},
"items": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Items",
"type": "array"
},
"language": {
"default": "en",
"title": "Language",
"type": "string"
},
"mailing_data": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Mailing Data"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Notes"
},
"payment_terms": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Payment Terms"
},
"service_end_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Service End Date"
},
"service_start_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Service Start Date"
},
"settings_on_overdue": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Settings On Overdue"
}
},
"required": [
"client_id",
"items"
],
"title": "create_invoiceArguments",
"type": "object"
}