> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beltic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Document Template

> Retrieve a specific document template by its unique identifier. Returns the template configuration.

**Response Includes:**
- Template metadata (name, description, status)
- Complete configuration (JSON schema, extraction config, fraud config)
- Status flag (is_active)
- Timestamps (created_at, updated_at)

**Validation Fields in Schema:**
- Date validations are represented as boolean fields containing `beltic:validation`
- `field_ref` points to a sibling date field within the same object scope



## OpenAPI

````yaml GET /v1/document-templates/{id}
openapi: 3.1.0
info:
  title: Beltic Document API
  version: 1.0.0
  description: >-
    # The Beltic Document API provides a comprehensive solution for document
    processing with AI-powered data extraction and fraud detection capabilities.


    ## Key Features


    - **Template-Based Processing**: Create reusable document templates with
    predefined schemas and processing configurations

    - **Ad-Hoc Processing**: Process documents without templates using custom
    configurations

    - **AI Data Extraction**: Intelligent document data extraction powered by AI

    - **Fraud Detection**: Document authenticity verification and fraud analysis

    - **Secure File Handling**: Pre-signed URLs for secure file uploads


    ## Workflow


    1. **Create a Document Template**: Define a template with extraction schema
    and fraud detection settings

    2. **Create a Document**: Initialize a document with either a template
    reference or ad-hoc configuration

    3. **Upload File**: Use the pre-signed URL to upload your document file

    4. **Automatic Processing**: Once uploaded, the document is automatically
    processed with extraction and fraud detection

    5. **Retrieve Results**: Fetch the document to access extracted data and
    fraud analysis results


    ## Authentication


    All endpoints require authentication. Include your API key in the
    `X-Api-Key` header:

    ```

    X-Api-Key: YOUR_API_KEY

    ```


    ## Response Format


    All responses follow the JSON:API specification for consistent data
    structures.
  contact:
    name: Beltic API Support
    email: engineering@beltic.com
servers:
  - url: https://api.beltic.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Document Templates
    description: >-
      Manage document templates for repeatable processing workflows. Templates
      define the structure and processing configuration for documents including
      JSON schemas for data extraction and fraud detection settings.
  - name: Documents
    description: >-
      Create and manage documents for processing. Documents can be associated
      with a template for standardized processing, or configured ad-hoc with
      custom settings. The workflow involves creating a document record,
      uploading the file via pre-signed URL, and automatically processing the
      document with AI-powered extraction and fraud detection. Documents track
      their processing status and store extracted data and fraud analysis
      results.
  - name: Webhooks
    description: >-
      Configure webhook endpoints to receive real-time notifications when
      document status changes. Webhooks support automatic retries with
      exponential backoff and provide options for manual resend and DLQ
      reprocessing.
externalDocs:
  description: Beltic Platform Documentation
  url: https://docs.beltic.com
paths:
  /v1/document-templates/{id}:
    get:
      tags:
        - Document Templates
      summary: Get document template
      description: >-
        Retrieve a specific document template by its unique identifier. Returns
        the template configuration.


        **Response Includes:**

        - Template metadata (name, description, status)

        - Complete configuration (JSON schema, extraction config, fraud config)

        - Status flag (is_active)

        - Timestamps (created_at, updated_at)


        **Validation Fields in Schema:**

        - Date validations are represented as boolean fields containing
        `beltic:validation`

        - `field_ref` points to a sibling date field within the same object
        scope
      parameters:
        - schema:
            type: string
            format: uuid
            description: Template ID
          required: true
          description: Template ID
          name: id
          in: path
      responses:
        '200':
          description: Template found successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - document-template
                      id:
                        type: string
                        format: uuid
                        description: Template unique identifier
                        example: 123e4567-e89b-12d3-a456-426614174000
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                          description:
                            type:
                              - string
                              - 'null'
                          extraction_config:
                            type: object
                            properties:
                              enabled:
                                type: boolean
                              schema: {}
                              extraction_rules:
                                type: string
                            required:
                              - enabled
                          fraud_config:
                            type: object
                            properties:
                              enabled:
                                type: boolean
                              requires_digital_signature:
                                type: boolean
                            required:
                              - enabled
                          status:
                            type: string
                            enum:
                              - published
                          is_active:
                            type: boolean
                          created_at:
                            type: string
                          updated_at:
                            type: string
                        required:
                          - name
                          - extraction_config
                          - fraud_config
                      relationships:
                        type: object
                        properties: {}
                    required:
                      - type
                      - id
                      - attributes
                required:
                  - data
        '404':
          description: Template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        title:
                          type: string
                        detail:
                          type: string
                      required:
                        - status
                        - title
                        - detail
                required:
                  - errors
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: |-
        API key for authentication.
        Access https://console.beltic.com/ to obtain your API key.

````