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

> Didit Management APIで、法域ごとに再利用できるgoAMLレポートヘッダーのテンプレートを作成します。テンプレートは使用前に必須フィールドに照らして検証されます。



レポートテンプレート作成APIプロンプト
        プロンプトをクリップボードにコピー



      
      

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



      
      

貼り付け先

再利用可能なgoAMLヘッダーテンプレートを作成します。テンプレートを保存するには、必須フィールドの検証(`rentity_id`、`submission_code`、`currency_code_local`)に合格する必要があります。この検証は作成時に加え、編集するたびにも再度行われます。`action`や`submission_date`など届出ごとのヘッダーフィールドは、テンプレートではなく、レポート自体の検証時または確定時に必須となります。## 関連ページ- [レポートテンプレートの一覧取得](https://docs.didit.me/ja/management-api/report-templates/list.md)
- [ケースからレポートを作成](https://docs.didit.me/ja/management-api/regulatory-reports/create-for-case.md)


## OpenAPI

````yaml ja/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。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: レポートテンプレートを作成
      description: >-
        管轄区域ごと、レポート種別ごとに再利用可能なgoAMLヘッダーテンプレートを作成します。テンプレートレベルの必須フィールド（rentity_id、submission_code、currency_code_local）のいずれかがfield_configにない場合は400で拒否されます。無効なテンプレートは保存できず、レポートの作成にも使用できません。提出ごとのヘッダーフィールド（action、submission_date、transactions）は、代わりにレポートの検証時または確定時に必須チェックされます。
      operationId: create_report_template
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 組織のUUIDです。
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: アプリケーションのUUID。
      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: ISO 3166-1 alpha-2国コード。保存時に大文字に変換されます。
                report_type:
                  type: string
                  enum:
                    - SAR
                    - STR
                    - CTR
                    - TTR
                    - UTR
                    - IFT
                    - CBR
                    - TFR
                field_config:
                  type: object
                  description: >-
                    再利用可能なgoAMLヘッダーのデフォルト値。テンプレートレベルの必須フィールド：rentity_id、submission_code、currency_code_local（3文字）。任意：enabled_fields（含める任意のレポートブロック）と、reporting_person、location、reason、actionのデフォルト値。提出ごとのヘッダーフィールド（action、submission_date、transactions、jurisdiction）の必須チェックは、テンプレートではなく、レポートの検証時または確定時に行われます。
            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: テンプレートが作成されました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportTemplateDetail'
        '400':
          description: 認識できない法域、またはfield_configが必須フィールドの検証に失敗しました。
          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: ISO 3166-1 alpha-2国コード。
        report_type:
          type: string
          enum:
            - SAR
            - STR
            - CTR
            - TTR
            - UTR
            - IFT
            - CBR
            - TFR
        report_type_display:
          type: string
        field_config:
          type: object
          description: >-
            再利用可能なgoAMLヘッダーのデフォルト値。テンプレートレベルの必須フィールド：rentity_id、submission_code、currency_code_local（3文字）。任意：enabled_fields（含める任意のレポートブロック）と、reporting_person、location、reason、actionのデフォルト値。提出ごとのヘッダーフィールド（action、submission_date、transactions、jurisdiction）の必須チェックは、テンプレートではなく、レポートの検証時または確定時に行われます。
        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: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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