---
title: "Match Schema To Extracted"
method: POST
path: "/api/batch/match-schema"
tags: ["Batch Processing"]
---

# Match Schema To Extracted

`POST /api/batch/match-schema`

## Request

- Base URL: `https://api.qomplement.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.qomplement.com/api/batch/match-schema`
- Auth: HTTP bearer

Re-structure already-extracted document text using a schema.
Uses the same GPT-4o-mini flow as initial schema-based extraction,
but runs on the stored OCR text instead of re-running OCR.

## Request body

- MatchSchemaRequest: Request to re-structure extracted text using a schema
  - `document_id` string, required
  - `batch_id` string, required
  - `schema_fields` object[], required
  - `page_numbers` integer[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-09** `6fe617c112ef`: 1 info
  - the endpoint scheme security `HTTPBearer` was added to the API

[Operation history](https://skmtc.dev/qomplement/apis/qomplement-api/changes/api/batch/match-schema/post.md)

---

[API](https://skmtc.dev/qomplement/apis/qomplement-api.md) - [All operations](https://skmtc.dev/qomplement/apis/qomplement-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qomplement/apis/qomplement-api/revisions/6fe617c112ef?raw)
