---
title: "Check if a PDF is an invoice"
method: POST
path: "/api/v1/invoice-extraction/validate"
tags: ["InvoiceExtraction"]
---

# Check if a PDF is an invoice

`POST /api/v1/invoice-extraction/validate`

## Request

- Base URL: `https://api.partner.cubee.cz`
- URL: `https://api.partner.cubee.cz/api/v1/invoice-extraction/validate`
- Auth: none required

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.

## Request body `multipart/form-data`

- object
  - `file` string, binary

## Response `200`

OK

- InvoiceValidationResponseModel: 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.
  - `fileName` string, nullable: Original file name of the uploaded document.
  - `isEnergyInvoice` boolean: True if the document is an energy supply invoice / vyúčtování / výkup (electricity or gas).
  - `confidence` number, double: Model confidence in `isEnergyInvoice`, 0.0–1.0.
  - `supplier` string, nullable: Supplier name if recognised, otherwise empty.
  - `energyType` string, nullable: electricity | gas | both | "" (unknown / not an invoice).
  - `method` string, nullable: How the verdict was reached: "text" (page-1 text, the cheap path) or "document" (image fallback for scans).

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-11-03** `50555858fb42`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cubee/apis/partner-api/changes/api/v1/invoice-extraction/validate/post.md)

---

[API](https://skmtc.dev/cubee/apis/partner-api.md) - [All operations](https://skmtc.dev/cubee/apis/partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cubee/apis/partner-api/revisions/50555858fb42?raw)
