Validate Xml
validate_xmlValidate an XML document with xmlvalid: well-formedness, an XSD, DTD or RelaxNG schema, and for e-invoices the Schematron business rules of EN 16931, Peppol BIS, XRechnung, Factur-X and national formats. Pass the document as xml (its text) or url (a public http(s) address), and a schema: a catalog slug from search_schemas, a saved schema ("@orders-v3"), or "auto" to use the e-invoice profile the document names. Without a schema only well-formedness is checked. Returns valid, errors and warnings with line, column, message, rule and a help_url explaining each. Counts as one API validation of the key's monthly quota.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A public http(s) URL of the document, fetched by xmlvalid. | |
| xml | No | The XML document itself. Use url instead for a document on the web. | |
| name | No | A file name to show in the result, such as invoice-42.xml. | |
| wait | No | Seconds to wait for the result before returning a pending status to poll with get_validation. | |
| schema | No | A catalog slug (see search_schemas), "@<name>" for a saved schema, or "auto" for the e-invoice profile the document names. Leave out to check well-formedness only. | |
| rules_version | No | Pin Schematron rule sets to releases, as rule-set@version, comma-separated (peppol-bis-3-ubl@3.0.21): the call fails with rules_version_mismatch when one has moved on. The result's rule_sets lists the releases that ran. |