---
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`

## 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/{batch_id}/document/{document_id}/chat`
- Auth: HTTP bearer

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