---
title: "Process QR code from file"
method: POST
path: "/api/invoices/process-qr"
tags: ["invoices"]
---

# Process QR code from file

`POST /api/invoices/process-qr`

Process a PDF/image file to extract QR code data.

Translates VBA: Module1.RunQR + ProcessFatura

NOTE: QR reading (PyMuPDF + pyzbar) is CPU-heavy and synchronous.
We run it in a thread pool to avoid blocking the asyncio event loop,
which would stall all other requests on this worker.

## Headers

- `x-api-token` string, nullable

## Response `200`

Successful Response

- QRProcessResult — Result from QR code processing.
  - `A` string, nullable
  - `B` string, nullable
  - `F` string, date, nullable
  - `G` string, nullable
  - `H` string, nullable
  - `I7` number, nullable
  - `I8` number, nullable
  - `N` number, nullable
  - `O` number, nullable
  - `P` number, nullable
  - `raw_qr` string, nullable
  - `success` boolean
  - `error_message` string, nullable
  - `invoices` QRInvoiceItem[], nullable
    - `A` string, nullable
    - `B` string, nullable
    - `D` string, nullable
    - `F` string, date, nullable
    - `G` string, nullable
    - `H` string, nullable
    - `I7` number, nullable
    - `I8` number, nullable
    - `N` number, nullable
    - `O` number, nullable
    - `P` number, nullable
    - `raw_qr` string, nullable
    - `already_exists` boolean
    - `success` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
