Record a purchase invoice
record_purchase_invoiceRecords a supplier invoice (bill) against one purchase order, with its lines and charges. Returns the invoice id and sku_url.
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": {
"purchase_order_id": "<purchase_order_id>",
"supplier_invoice_number": "<supplier_invoice_number>",
"purchase_invoice_date": "<purchase_invoice_date>"
},
"name": "record_purchase_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | unpaid, paid or partially_paid. | |
| dry_run | No | Validate only; saves nothing. | |
| due_date | No | ||
| currency_id | No | ||
| financial_lines | No | PO charges: [{id, quantity, amount, link_type: App\Models\PurchaseOrder}]. | |
| idempotency_key | No | A repeat with this key replays the first result. | |
| purchase_order_id | Yes | ||
| purchase_invoice_date | Yes | ISO date. | |
| purchase_invoice_lines | No | Lines: [{purchase_order_line_id, quantity_invoiced, unit_price (gross)}]. | |
| supplier_invoice_number | Yes | The supplier's invoice number exactly as printed. |