Create Document
create_documentCreate invoices, proformas, or delivery notices in Oblio by providing required client, series, issue date, and products. Optionally collect payments or reference existing documents.
Instructions
Creates an invoice (factura), proforma, or delivery notice (aviz) in Oblio via POST /api/docs/{type}. Required fields: cif, client (with at least name), seriesName, issueDate, and at least one product. Optional: inline payment via collect, reference to existing proforma/notice via referenceDocument, stock deduction via useStock, auto e-Factura submission via spvExtern, and idempotencyKey to prevent duplicates. Returns: seriesName, number, and a link to view/download the created document.
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": {
"type": "<type>",
"data": "<data>"
},
"name": "create_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Document type to create: "invoice" (factura), "proforma", or "notice" (aviz) | |
| data | Yes |