Validate e-invoice
About this tool
How to use it
- Choose this tool.
- Add the e-invoice file (XML or PDF with the data attached).
- Choose which set of rules to check against.
- Press Generate.
- Read the list of errors and warnings.
What you get back
Try Validate e-invoice in the Studio
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/einvoice-validate" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'attachment=factur-x.xml' \
-F 'rules=en16931' \
-F 'tolerance=0'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.einvoiceValidate({
"file": 'document.pdf',
"attachment": "factur-x.xml",
"rules": "en16931",
"tolerance": 0
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->einvoiceValidate([
'file' => 'document.pdf',
'attachment' => 'factur-x.xml',
'rules' => 'en16931',
'tolerance' => 0,
]);
echo $result->requestId;