curl --request POST \
--url https://api.partner.cubee.cz/api/v1/invoice-extraction/validate \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'using RestSharp;
var options = new RestClientOptions("https://api.partner.cubee.cz/api/v1/invoice-extraction/validate");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.FormBoundary = "---011000010111000001101001";
request.AddFile("file", "example-file");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.partner.cubee.cz/api/v1/invoice-extraction/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.partner.cubee.cz/api/v1/invoice-extraction/validate"
files = { "file": ("example-file", open("example-file", "rb")) }
response = requests.post(url, files=files)
print(response.text){
"fileName": "vyuctovani-elektrina.pdf",
"isEnergyInvoice": true,
"confidence": 0.98,
"supplier": "innogy Energie, s.r.o.",
"energyType": "electricity",
"method": "text"
}Check if a PDF is an invoice
Cheap pre-flight check: is the uploaded PDF an energy invoice? Runs only the gate (no extraction), so a caller can reject obviously-wrong uploads before paying for a full extraction.
curl --request POST \
--url https://api.partner.cubee.cz/api/v1/invoice-extraction/validate \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'using RestSharp;
var options = new RestClientOptions("https://api.partner.cubee.cz/api/v1/invoice-extraction/validate");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.FormBoundary = "---011000010111000001101001";
request.AddFile("file", "example-file");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.partner.cubee.cz/api/v1/invoice-extraction/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.partner.cubee.cz/api/v1/invoice-extraction/validate"
files = { "file": ("example-file", open("example-file", "rb")) }
response = requests.post(url, files=files)
print(response.text){
"fileName": "vyuctovani-elektrina.pdf",
"isEnergyInvoice": true,
"confidence": 0.98,
"supplier": "innogy Energie, s.r.o.",
"energyType": "electricity",
"method": "text"
}Body
Response
OK
Result of the cheap pre-flight check on an uploaded PDF — "is this actually a Czech energy invoice?" — without running the full extraction. Lets a caller (e.g. the eshop) reject obviously-wrong uploads before paying for extraction.
Original file name of the uploaded document.
True if the document is an energy supply invoice / vyúčtování / výkup (electricity or gas).
Model confidence in isEnergyInvoice, 0.0–1.0.
Supplier name if recognised, otherwise empty.
electricity | gas | both | "" (unknown / not an invoice).
How the verdict was reached: "text" (page-1 text, the cheap path) or "document" (image fallback for scans).
Was this page helpful?