Create a customer invoice
dolibarr_invoice_createGenerate a draft customer invoice and add line items. Drafts have no accounting effect; validate the invoice later to finalize it.
Instructions
Creates a draft customer invoice and adds its lines. A draft has no accounting effect; validate it with dolibarr_invoice_action. To bill a sales order use dolibarr_invoice_create_from_order instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"thirdparty_id": "<thirdparty_id>"
},
"name": "dolibarr_invoice_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Invoice date; default today. | |
| lines | No | ||
| note_public | No | Note visible to the third party (printed on documents). | |
| note_private | No | Internal note. | |
| ref_customer | No | ||
| custom_fields | No | Custom fields by code, e.g. {"region": "north"}. Get codes and allowed values from dolibarr_custom_field_list. | |
| thirdparty_id | Yes | ||
| payment_mode_id | No | From dolibarr_dictionary payment_types. | |
| payment_terms_id | No | From dolibarr_dictionary payment_terms. |