---
title: "Mapping Chat"
method: POST
path: "/api/batch/{batch_id}/document/{document_id}/chat"
tags: ["Batch Processing"]
---

# Mapping Chat

`POST /api/batch/{batch_id}/document/{document_id}/chat`

AI chat assistant for finding and searching values in mapped documents.

Processes natural language queries like:
- "Find all total amounts"
- "Show me invoice dates"
- "Find the grand total"
- "Search for company names"

Returns matching values with context and similarity scores.

## Path parameters

- `batch_id` string, required
- `document_id` string, required

## Request body

- MappingChatRequest — Request model for mapping chat
  - `batch_id` string, required
  - `document_id` string, required
  - `aggregated_data` object, required
  - `user_query` string, required
  - `openai_api_key` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

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