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"}}'import os
import requests
resp = requests.post(
'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
json={
'name': 'US SAR default',
'jurisdiction': 'US',
'report_type': 'SAR',
'field_config': {'rentity_id': 'FIU-US-00123', 'submission_code': 'E', 'currency_code_local': 'USD'},
},
timeout=10,
)
resp.raise_for_status()
print(resp.json()['uuid'])const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', jurisdiction: '<string>', field_config: {}})
};
fetch('https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'jurisdiction' => '<string>',
'field_config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"field_config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"field_config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"field_config\": {}\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"jurisdiction": "<string>",
"report_type": "SAR",
"report_type_display": "<string>",
"field_config": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"errors": [
"<string>"
]
}Create Report Template
Create a reusable per-jurisdiction, per-report-type goAML header template. Rejected with 400 if any of the template-level obligatory fields (rentity_id, submission_code, currency_code_local) is missing from field_config; an invalid template cannot be saved or used to create a report. Per-filing header fields (action, submission_date, transactions) are enforced at report validate/finalize time instead.
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"}}'import os
import requests
resp = requests.post(
'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
json={
'name': 'US SAR default',
'jurisdiction': 'US',
'report_type': 'SAR',
'field_config': {'rentity_id': 'FIU-US-00123', 'submission_code': 'E', 'currency_code_local': 'USD'},
},
timeout=10,
)
resp.raise_for_status()
print(resp.json()['uuid'])const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', jurisdiction: '<string>', field_config: {}})
};
fetch('https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'jurisdiction' => '<string>',
'field_config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"field_config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"field_config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"jurisdiction\": \"<string>\",\n \"field_config\": {}\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"jurisdiction": "<string>",
"report_type": "SAR",
"report_type_display": "<string>",
"field_config": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"errors": [
"<string>"
]
}rentity_id, submission_code, currency_code_local) to be saved, both on create and again whenever it is edited. Per-filing header fields such as action and submission_date are enforced when the report itself is validated or finalized, not on the template.
Related
Authorizations
Path Parameters
Organization UUID.
Application UUID.
Body
ISO 3166-1 alpha-2 country code, upper-cased on save.
2SAR, STR, CTR, TTR, UTR, IFT, CBR, TFR Reusable goAML header defaults. Template-level obligatory fields: rentity_id, submission_code, and currency_code_local (3-letter). Optional: enabled_fields (which optional report blocks to include) plus reporting_person, location, reason, and action defaults. Per-filing header fields (action, submission_date, transactions, jurisdiction) are enforced when the report is validated or finalized, not on the template.
Response
Template created.
ISO 3166-1 alpha-2 country code.
2SAR, STR, CTR, TTR, UTR, IFT, CBR, TFR Reusable goAML header defaults. Template-level obligatory fields: rentity_id, submission_code, and currency_code_local (3-letter). Optional: enabled_fields (which optional report blocks to include) plus reporting_person, location, reason, and action defaults. Per-filing header fields (action, submission_date, transactions, jurisdiction) are enforced when the report is validated or finalized, not on the template.