curl --request POST \
--url https://api.anycheck.ai/templates \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Company Registration Verification",
"description": "Template for extracting company registration data",
"schema": {
"company_name": {
"type": "string",
"required": true
},
"registration_number": {
"type": "string",
"required": true
},
"address": {
"type": "string",
"required": false
}
},
"custom_id": "comp-reg-v1",
"instruction": "Focus on extracting company name and registration number accurately",
"config": {},
"type": "CUSTOM"
}
'import requests
url = "https://api.anycheck.ai/templates"
payload = {
"name": "Company Registration Verification",
"description": "Template for extracting company registration data",
"schema": {
"company_name": {
"type": "string",
"required": True
},
"registration_number": {
"type": "string",
"required": True
},
"address": {
"type": "string",
"required": False
}
},
"custom_id": "comp-reg-v1",
"instruction": "Focus on extracting company name and registration number accurately",
"config": {},
"type": "CUSTOM"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Company Registration Verification',
description: 'Template for extracting company registration data',
schema: {
company_name: {type: 'string', required: true},
registration_number: {type: 'string', required: true},
address: {type: 'string', required: false}
},
custom_id: 'comp-reg-v1',
instruction: 'Focus on extracting company name and registration number accurately',
config: {},
type: 'CUSTOM'
})
};
fetch('https://api.anycheck.ai/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://api.anycheck.ai/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' => 'Company Registration Verification',
'description' => 'Template for extracting company registration data',
'schema' => [
'company_name' => [
'type' => 'string',
'required' => true
],
'registration_number' => [
'type' => 'string',
'required' => true
],
'address' => [
'type' => 'string',
'required' => false
]
],
'custom_id' => 'comp-reg-v1',
'instruction' => 'Focus on extracting company name and registration number accurately',
'config' => [
],
'type' => 'CUSTOM'
]),
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://api.anycheck.ai/templates"
payload := strings.NewReader("{\n \"name\": \"Company Registration Verification\",\n \"description\": \"Template for extracting company registration data\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"custom_id\": \"comp-reg-v1\",\n \"instruction\": \"Focus on extracting company name and registration number accurately\",\n \"config\": {},\n \"type\": \"CUSTOM\"\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://api.anycheck.ai/templates")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Company Registration Verification\",\n \"description\": \"Template for extracting company registration data\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"custom_id\": \"comp-reg-v1\",\n \"instruction\": \"Focus on extracting company name and registration number accurately\",\n \"config\": {},\n \"type\": \"CUSTOM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anycheck.ai/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\": \"Company Registration Verification\",\n \"description\": \"Template for extracting company registration data\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"custom_id\": \"comp-reg-v1\",\n \"instruction\": \"Focus on extracting company name and registration number accurately\",\n \"config\": {},\n \"type\": \"CUSTOM\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "KTP Verification",
"description": "Template for KTP document verification and data extraction",
"custom_id": "<string>",
"instruction": "<string>",
"schema": {
"name": {
"type": "string",
"required": true
},
"nik": {
"type": "string",
"required": true
},
"birth_date": {
"type": "date",
"required": true
}
},
"config": {},
"type": "CUSTOM",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Create template
Create a new custom verification template
curl --request POST \
--url https://api.anycheck.ai/templates \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Company Registration Verification",
"description": "Template for extracting company registration data",
"schema": {
"company_name": {
"type": "string",
"required": true
},
"registration_number": {
"type": "string",
"required": true
},
"address": {
"type": "string",
"required": false
}
},
"custom_id": "comp-reg-v1",
"instruction": "Focus on extracting company name and registration number accurately",
"config": {},
"type": "CUSTOM"
}
'import requests
url = "https://api.anycheck.ai/templates"
payload = {
"name": "Company Registration Verification",
"description": "Template for extracting company registration data",
"schema": {
"company_name": {
"type": "string",
"required": True
},
"registration_number": {
"type": "string",
"required": True
},
"address": {
"type": "string",
"required": False
}
},
"custom_id": "comp-reg-v1",
"instruction": "Focus on extracting company name and registration number accurately",
"config": {},
"type": "CUSTOM"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Company Registration Verification',
description: 'Template for extracting company registration data',
schema: {
company_name: {type: 'string', required: true},
registration_number: {type: 'string', required: true},
address: {type: 'string', required: false}
},
custom_id: 'comp-reg-v1',
instruction: 'Focus on extracting company name and registration number accurately',
config: {},
type: 'CUSTOM'
})
};
fetch('https://api.anycheck.ai/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://api.anycheck.ai/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' => 'Company Registration Verification',
'description' => 'Template for extracting company registration data',
'schema' => [
'company_name' => [
'type' => 'string',
'required' => true
],
'registration_number' => [
'type' => 'string',
'required' => true
],
'address' => [
'type' => 'string',
'required' => false
]
],
'custom_id' => 'comp-reg-v1',
'instruction' => 'Focus on extracting company name and registration number accurately',
'config' => [
],
'type' => 'CUSTOM'
]),
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://api.anycheck.ai/templates"
payload := strings.NewReader("{\n \"name\": \"Company Registration Verification\",\n \"description\": \"Template for extracting company registration data\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"custom_id\": \"comp-reg-v1\",\n \"instruction\": \"Focus on extracting company name and registration number accurately\",\n \"config\": {},\n \"type\": \"CUSTOM\"\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://api.anycheck.ai/templates")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Company Registration Verification\",\n \"description\": \"Template for extracting company registration data\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"custom_id\": \"comp-reg-v1\",\n \"instruction\": \"Focus on extracting company name and registration number accurately\",\n \"config\": {},\n \"type\": \"CUSTOM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anycheck.ai/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\": \"Company Registration Verification\",\n \"description\": \"Template for extracting company registration data\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"custom_id\": \"comp-reg-v1\",\n \"instruction\": \"Focus on extracting company name and registration number accurately\",\n \"config\": {},\n \"type\": \"CUSTOM\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "KTP Verification",
"description": "Template for KTP document verification and data extraction",
"custom_id": "<string>",
"instruction": "<string>",
"schema": {
"name": {
"type": "string",
"required": true
},
"nik": {
"type": "string",
"required": true
},
"birth_date": {
"type": "date",
"required": true
}
},
"config": {},
"type": "CUSTOM",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
API key for service-to-service authentication
Body
Template name
"Company Registration Verification"
Template description
"Template for extracting company registration data"
Data extraction schema definition
{
"company_name": { "type": "string", "required": true },
"registration_number": { "type": "string", "required": true },
"address": { "type": "string", "required": false }
}
Custom identifier for the template
"comp-reg-v1"
Special instructions for template processing
"Focus on extracting company name and registration number accurately"
Template configuration settings
Template type. Users can only create CUSTOM templates. PREBUILT templates are managed by AnyCheck admin (defaults to CUSTOM)
CUSTOM, PREBUILT Response
Template created successfully
Unique template identifier
Template name
"KTP Verification"
Template description
"Template for KTP document verification and data extraction"
Custom identifier for the template
Special instructions for template processing
Data extraction schema definition
{
"name": { "type": "string", "required": true },
"nik": { "type": "string", "required": true },
"birth_date": { "type": "date", "required": true }
}
Template configuration settings
Template type - custom or prebuilt
CUSTOM, PREBUILT "CUSTOM"
Template creation timestamp
Last update timestamp
Was this page helpful?