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

Parameters: verify_einvoice
NameTypeDescription
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
curl https://cotlet.dev/api/v1/fatture-in-cloud/invoices/1/einvoices/verify \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("fatture-in-cloud", "verify_einvoice", {"invoice_id":1})
Node.js
const result = await cotlet.call('fatture-in-cloud', 'verify_einvoice', {"invoice_id":1});
CLI
cotlet call fatture-in-cloud verify_einvoice --data '{"invoice_id":1}'

Example response

JSON

{
  "invoice_id": 88120,
  "valid": false,
  "validation_result": [
    {
      "field": "Data",
      "message": "Invalid date."
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.