---
title: "GET /api/v1/template-preparation/detection"
method: GET
path: "/api/v1/template-preparation/detection"
tags: ["Template Preparation Browser"]
---

# GET /api/v1/template-preparation/detection

`GET /api/v1/template-preparation/detection`

## Request

- Base URL: `https://api.korala.ai`
- URL: `https://api.korala.ai/api/v1/template-preparation/detection`
- Auth: HTTP bearer

## Headers

- `authorization` string, required

## Response `200`

- TemplatePreparationDetectionDto
  - `status` FieldDetectionJobDto, required
    - `id` string, required: Job ID
    - `documentId` string: Document ID (if detecting for a document)
    - `templateId` string: Template ID (if detecting for a template)
    - `status` 'queued' | 'ocr_processing' | 'ai_processing' | 'completed' | 'failed', required: Current status of the field detection job
    - `ocrProcessingMs` number: OCR processing time in milliseconds
    - `aiProcessingMs` number: AI processing time in milliseconds
    - `proposedFieldCount` number: Number of proposed fields detected
    - `errorMessage` string: Error message if job failed
    - `createdAt` string, date-time, required: Job creation timestamp
    - `updatedAt` string, date-time, required: Job last update timestamp
  - `fields` ProposedFieldDto[], required
    - `id` string, required: Proposed field ID
    - `documentId` string: Document ID (if detecting for a document)
    - `templateId` string: Template ID (if detecting for a template)
    - `jobId` string, required: Parent job ID
    - `fieldType` 'signature' | 'initials' | 'date' | 'text' | 'checkbox' | 'dropdown' | 'radio', required
    - `pageNumber` number, required: Page number where field was detected
    - `xPosition` number, required: X position in PDF coordinates
    - `yPosition` number, required: Y position in PDF coordinates
    - `width` number, required: Field width in PDF coordinates
    - `height` number, required: Field height in PDF coordinates
    - `confidence` number, required: Confidence score 0-100
    - `detectionReason` string: Reason for detection
    - `contextText` string: Surrounding text context
    - `acroFieldName` string: Embedded AcroForm field this proposal came from (fillable PDFs). Accepted fields keep the link, so values fill the PDF form field at completion.
    - `acroOptionValue` string: For radio-group AcroForm fields: the option this proposal selects.
    - `options` string[]: Allowed values for dropdown fields
    - `maxLength` number: Character limit read from the embedded form field (comb boxes)
    - `groupKey` string: Semantic group key (radio options share the AcroForm field name); members are mutually exclusive when accepted
    - `fontSize` number: Point size the embedded form field draws its value at; absent when the form auto-sizes the text
    - `textColor` string: Text color of the embedded form field, as #rrggbb
    - `textAlign` 'left' | 'center' | 'right': Horizontal alignment of the value inside the field box
    - `fontFamily` string: Base font the embedded form field draws its value in
    - `multiline` boolean: Whether the embedded form field is multiline
    - `status` 'pending' | 'accepted' | 'rejected' | 'modified', required: Review status of the proposed field
    - `acceptedFieldId` string: ID of the accepted field (if accepted)
    - `reviewedAt` string, date-time: When the field was reviewed
    - `createdAt` string, date-time, required: Creation timestamp
    - `updatedAt` string, date-time, required: Last update timestamp

---

[API](https://skmtc.dev/korala/apis/korala-public-api.md) · [All operations](https://skmtc.dev/korala/apis/korala-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korala/apis/korala-public-api/revisions/5c4d7810c507?raw)
