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

# API para crear plantillas de informe goAML

> Con Didit, crea una plantilla reutilizable de encabezado de informe goAML por jurisdicción, validada con los campos obligatorios antes de usarla.



Prompt de la API para crear una plantilla de informe
        Copiar el prompt al portapapeles



      
      

\<pre>

\`Create a FIU report template through the Management API.

Endpoint:
POST https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/

Authentication:
Use the x-api-key header with my Didit API key.

Request body:
\{
"name": "US SAR default",         // required
"jurisdiction": "US",               // required, ISO 3166-1 alpha-2, upper-cased on save
"report_type": "SAR",               // required: SAR|STR|CTR|TTR|UTR|IFT|CBR|TFR
"field_config": {
"rentity_id": "FIU-US-00123",     // obligatory - reporting entity ID from your FIU
"submission_code": "E",           // obligatory - E (electronic) or M (manual)
"currency_code_local": "USD",     // obligatory
"enabled_fields": ["reporting_person", "location"]  // optional blocks to include by default
}
}

Validation:
\- jurisdiction must be a recognized ISO2 code.
\- field_config is checked against the template-level obligatory goAML fields - exactly rentity_id, submission_code, and currency_code_local (3-letter). Missing fields return a 400 listing exactly which ones, and the template cannot be saved until they are filled in.
\- The remaining report header fields (action, submission_date, at least one transaction, jurisdiction) are per-filing values, enforced later when the REPORT is validated/finalized - not on the template.

Example call:
curl -X POST "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "US SAR default", "jurisdiction": "US", "report_type": "SAR", "field_config": {"rentity_id": "FIU-US-00123", "submission_code": "E", "currency_code_local": "USD"}}'

Response 201: ReportTemplateDetail.

Failure modes:
\- 400 - unrecognized jurisdiction, or field_config missing obligatory fields ({"errors": ["rentity_id", ...]}).
\- 401/403 - auth/permission errors (requires write:cases).

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

Pegar en

Crea una plantilla de encabezado de goAML reutilizable. Para poder guardarse, una plantilla debe superar la validación de campos obligatorios (`rentity_id`, `submission_code`, `currency_code_local`), tanto al crearla como cada vez que se edita. Los campos de encabezado propios de cada presentación, como `action` y `submission_date`, se exigen cuando se valida o se finaliza el propio informe, no en la plantilla.## Relacionado- [Listar plantillas de informe](https://docs.didit.me/es/management-api/report-templates/list.md)
- [Crear un informe a partir de un caso](https://docs.didit.me/es/management-api/regulatory-reports/create-for-case.md)


## OpenAPI

````yaml es/openapi-25.json POST /v3/organization/{organization_id}/application/{application_id}/report-templates/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API de verificación de identidad. Autentícate con el encabezado x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/organization/{organization_id}/application/{application_id}/report-templates/:
    post:
      tags:
        - Report Templates
      summary: Crear plantilla de informe
      description: >-
        Crea una plantilla de encabezado goAML reutilizable por jurisdicción y
        por tipo de informe. Se rechaza con 400 si falta en field_config alguno
        de los campos obligatorios a nivel de plantilla (rentity_id,
        submission_code, currency_code_local); una plantilla no válida no se
        puede guardar ni usar para crear un informe. Los campos de encabezado
        propios de cada presentación (action, submission_date, transactions) se
        exigen, en cambio, al validar o finalizar el informe.
      operationId: create_report_template
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID de la organización.
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID de la aplicación.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - jurisdiction
                - report_type
              properties:
                name:
                  type: string
                jurisdiction:
                  type: string
                  minLength: 2
                  maxLength: 2
                  description: >-
                    Código de país ISO 3166-1 alfa-2, convertido a mayúsculas al
                    guardar.
                report_type:
                  type: string
                  enum:
                    - SAR
                    - STR
                    - CTR
                    - TTR
                    - UTR
                    - IFT
                    - CBR
                    - TFR
                field_config:
                  type: object
                  description: >-
                    Valores predeterminados reutilizables del encabezado de
                    goAML. Campos obligatorios a nivel de plantilla: rentity_id,
                    submission_code y currency_code_local (3 letras).
                    Opcionales: enabled_fields (qué bloques opcionales del
                    informe incluir), además de los valores predeterminados de
                    reporting_person, location, reason y action. Los campos del
                    encabezado de cada declaración (action, submission_date,
                    transactions, jurisdiction) se exigen cuando el informe se
                    valida o se finaliza, no en la plantilla.
            example:
              name: US SAR default
              jurisdiction: US
              report_type: SAR
              field_config:
                rentity_id: FIU-US-00123
                submission_code: E
                currency_code_local: USD
      responses:
        '201':
          description: Plantilla creada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportTemplateDetail'
        '400':
          description: >-
            Jurisdicción no reconocida, o field_config no supera la validación
            de campos obligatorios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name": "US SAR default", "jurisdiction": "US", "report_type": "SAR", "field_config": {"rentity_id": "FIU-US-00123", "submission_code": "E", "currency_code_local": "USD"}}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            client = Didit()

            result = client.report_templates.create(
                name="US SAR default",
                jurisdiction="US",
                report_type="SAR",
                field_config={"rentity_id": "FIU-US-00123", "submission_code": "E", "currency_code_local": "USD"},
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            // and DIDIT_APPLICATION_ID.
            const didit = new Didit();

            const result = await didit.reportTemplates.create({
              name: "US SAR default",
              jurisdiction: "US",
              report_type: "SAR",
              field_config: { rentity_id: "FIU-US-00123", submission_code: "E", currency_code_local: "USD" },
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.ReportTemplates.Create(ctx, didit.ReportTemplatesCreateParams{\n\tName:         \"US SAR default\",\n\tJurisdiction: \"US\",\n\tReportType:   \"SAR\",\n\tFieldConfig:  didit.Some(map[string]any{\"rentity_id\": \"FIU-US-00123\", \"submission_code\": \"E\", \"currency_code_local\": \"USD\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.util.Map;

            import me.didit.Didit;

            import me.didit.types.ReportTemplatesCreateParams;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            Didit client = new Didit();


            var result =
            client.reportTemplates().create(ReportTemplatesCreateParams.builder()
                    .name("US SAR default")
                    .jurisdiction("US")
                    .reportType(ReportTemplatesCreateParams.ReportType.of("SAR"))
                    .fieldConfig(Map.of("rentity_id", "FIU-US-00123", "submission_code", "E", "currency_code_local", "USD"))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            // and DIDIT_APPLICATION_ID.
            $didit = new DiditClient();

            $result = $didit->reportTemplates->create([
                'name' => 'US SAR default',
                'jurisdiction' => 'US',
                'report_type' => 'SAR',
                'field_config' => ['rentity_id' => 'FIU-US-00123', 'submission_code' => 'E', 'currency_code_local' => 'USD'],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            didit = Didit::Client.new

            result = didit.report_templates.create(
              name: "US SAR default",
              jurisdiction: "US",
              report_type: "SAR",
              field_config: { rentity_id: "FIU-US-00123", submission_code: "E", currency_code_local: "USD" }
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Collections.Generic;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            using var client = new DiditClient();


            var result = await client.ReportTemplates.CreateAsync(new
            ReportTemplatesCreateParams

            {
                Name = "US SAR default",
                Jurisdiction = "US",
                ReportType = "SAR",
                FieldConfig = new Dictionary<string, object> { ["rentity_id"] = "FIU-US-00123", ["submission_code"] = "E", ["currency_code_local"] = "USD" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    ReportTemplateDetail:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
        jurisdiction:
          type: string
          minLength: 2
          maxLength: 2
          description: Código de país ISO 3166-1 alfa-2.
        report_type:
          type: string
          enum:
            - SAR
            - STR
            - CTR
            - TTR
            - UTR
            - IFT
            - CBR
            - TFR
        report_type_display:
          type: string
        field_config:
          type: object
          description: >-
            Valores predeterminados reutilizables del encabezado de goAML.
            Campos obligatorios a nivel de plantilla: rentity_id,
            submission_code y currency_code_local (3 letras). Opcionales:
            enabled_fields (qué bloques opcionales del informe incluir), además
            de los valores predeterminados de reporting_person, location, reason
            y action. Los campos del encabezado de cada declaración (action,
            submission_date, transactions, jurisdiction) se exigen cuando el
            informe se valida o se finaliza, no en la plantilla.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        La clave de API de tu aplicación, que encontrarás en Developers -> API
        keys en la Business Console. La clave principal tiene acceso completo.
        Una clave con nombre puede tener un alcance limitado: ninguno, lectura o
        escritura por recurso, limitada a algunos flujos o a sesiones aprobadas,
        a una lista de direcciones IP y a una fecha de caducidad. 401 significa
        que la clave es incorrecta, se revocó o expiró; 403 significa que no se
        envió ninguna clave, que la clave no tiene acceso a este recurso o
        acción, o que la solicitud provino de una dirección fuera de su lista de
        IP; 404 en una ruta de sesión significa que la sesión está fuera de los
        flujos o estados de la clave. Una clave sin acceso a contenido
        multimedia recibe las URL de imágenes, videos y PDF como null, y una
        clave sin permiso de escritura en sesiones recibe los enlaces y tokens
        de sesión como null. Consulta https://docs.didit.me/console/api-keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.