Verify e-invoice XML
Check an invoice's e-invoice XML for errors before sending it to SDI.
GET https://cotlet.dev/api/v1/fatture-in-cloud/invoices/{invoice_id}/einvoices/verify
read
Runs the XML checks and returns validation errors, for example a problem in a date field. Sends nothing to SDI and changes nothing. Fix errors by editing the invoice in Fatture in Cloud, then verify again.
Parameters
| Name | Type | Description |
|---|---|---|
| company_id integer | integer | Company ID. Optional when your account has one company. |
| invoice_id integer required | integer | Invoice ID from list_invoices or create_invoice. |
Request
curl https://cotlet.dev/api/v1/fatture-in-cloud/invoices/1/einvoices/verify \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("fatture-in-cloud", "verify_einvoice", {"invoice_id":1}) const result = await cotlet.call('fatture-in-cloud', 'verify_einvoice', {"invoice_id":1}); cotlet call fatture-in-cloud verify_einvoice --data '{"invoice_id":1}' Example response
{
"invoice_id": 88120,
"valid": false,
"validation_result": [
{
"field": "Data",
"message": "Invalid date."
}
]
}