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

# Match Schema To Extracted

`POST /api/batch/match-schema`

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

---

[API](https://skmtc.net/qomplement/apis/fastapi.md) · [All operations](https://skmtc.net/qomplement/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qomplement/fastapi/revisions/b6c76b02a94a/schema)
