---
title: "Detect Mappings Stream"
method: POST
path: "/api/pdf/detect-mappings-stream"
tags: ["PDF Form Processing"]
---

# Detect Mappings Stream

`POST /api/pdf/detect-mappings-stream`

## 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/pdf/detect-mappings-stream`
- Auth: none declared

Stream field mappings in real-time using Server-Sent Events.

As each field is filled by the parallel agents, events are sent to the client.
This provides real-time UI updates during the form filling process.

## Request body

- PdfRoutesDetectMappingsRequest: Request model for mapping detection - supports multiple documents
  - `pdf_content` string, required
  - `document_data` object, nullable
  - `documents` PdfRoutesDocumentData[], nullable
    - `id` string, required
    - `name` string, required
    - `extracted_data` object, nullable
  - `field_schema` SchemaField[], nullable
    - `name` string, required
    - `type` string
    - `description` string
  - `schema` SchemaField[], nullable
    - `name` string, required
    - `type` string
    - `description` string
  - `high_precision` boolean
  - `field_descriptions` object, nullable
  - `custom_fields` object[], nullable
  - `agent_rules` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[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)
