curl --request PUT \
--url https://api.anycheck.ai/templates/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Updated Company Registration Verification",
"description": "Updated template for extracting company registration data",
"custom_id": "comp-reg-v2",
"instruction": "Focus on extracting company name, registration number, and founding date accurately",
"schema": {
"company_name": {
"type": "string",
"required": true
},
"registration_number": {
"type": "string",
"required": true
},
"founding_date": {
"type": "date",
"required": true
},
"address": {
"type": "string",
"required": false
}
},
"config": {}
}
'import requests
url = "https://api.anycheck.ai/templates/{id}"
payload = {
"name": "Updated Company Registration Verification",
"description": "Updated template for extracting company registration data",
"custom_id": "comp-reg-v2",
"instruction": "Focus on extracting company name, registration number, and founding date accurately",
"schema": {
"company_name": {
"type": "string",
"required": True
},
"registration_number": {
"type": "string",
"required": True
},
"founding_date": {
"type": "date",
"required": True
},
"address": {
"type": "string",
"required": False
}
},
"config": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Company Registration Verification',
description: 'Updated template for extracting company registration data',
custom_id: 'comp-reg-v2',
instruction: 'Focus on extracting company name, registration number, and founding date accurately',
schema: {
company_name: {type: 'string', required: true},
registration_number: {type: 'string', required: true},
founding_date: {type: 'date', required: true},
address: {type: 'string', required: false}
},
config: {}
})
};
fetch('https://api.anycheck.ai/templates/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Company Registration Verification',
'description' => 'Updated template for extracting company registration data',
'custom_id' => 'comp-reg-v2',
'instruction' => 'Focus on extracting company name, registration number, and founding date accurately',
'schema' => [
'company_name' => [
'type' => 'string',
'required' => true
],
'registration_number' => [
'type' => 'string',
'required' => true
],
'founding_date' => [
'type' => 'date',
'required' => true
],
'address' => [
'type' => 'string',
'required' => false
]
],
'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://api.anycheck.ai/templates/{id}"
payload := strings.NewReader("{\n \"name\": \"Updated Company Registration Verification\",\n \"description\": \"Updated template for extracting company registration data\",\n \"custom_id\": \"comp-reg-v2\",\n \"instruction\": \"Focus on extracting company name, registration number, and founding date accurately\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"founding_date\": {\n \"type\": \"date\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"config\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.anycheck.ai/templates/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Company Registration Verification\",\n \"description\": \"Updated template for extracting company registration data\",\n \"custom_id\": \"comp-reg-v2\",\n \"instruction\": \"Focus on extracting company name, registration number, and founding date accurately\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"founding_date\": {\n \"type\": \"date\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anycheck.ai/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Company Registration Verification\",\n \"description\": \"Updated template for extracting company registration data\",\n \"custom_id\": \"comp-reg-v2\",\n \"instruction\": \"Focus on extracting company name, registration number, and founding date accurately\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"founding_date\": {\n \"type\": \"date\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"config\": {}\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"
}Update template
Update a custom template (only custom templates can be updated)
curl --request PUT \
--url https://api.anycheck.ai/templates/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Updated Company Registration Verification",
"description": "Updated template for extracting company registration data",
"custom_id": "comp-reg-v2",
"instruction": "Focus on extracting company name, registration number, and founding date accurately",
"schema": {
"company_name": {
"type": "string",
"required": true
},
"registration_number": {
"type": "string",
"required": true
},
"founding_date": {
"type": "date",
"required": true
},
"address": {
"type": "string",
"required": false
}
},
"config": {}
}
'import requests
url = "https://api.anycheck.ai/templates/{id}"
payload = {
"name": "Updated Company Registration Verification",
"description": "Updated template for extracting company registration data",
"custom_id": "comp-reg-v2",
"instruction": "Focus on extracting company name, registration number, and founding date accurately",
"schema": {
"company_name": {
"type": "string",
"required": True
},
"registration_number": {
"type": "string",
"required": True
},
"founding_date": {
"type": "date",
"required": True
},
"address": {
"type": "string",
"required": False
}
},
"config": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Company Registration Verification',
description: 'Updated template for extracting company registration data',
custom_id: 'comp-reg-v2',
instruction: 'Focus on extracting company name, registration number, and founding date accurately',
schema: {
company_name: {type: 'string', required: true},
registration_number: {type: 'string', required: true},
founding_date: {type: 'date', required: true},
address: {type: 'string', required: false}
},
config: {}
})
};
fetch('https://api.anycheck.ai/templates/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Company Registration Verification',
'description' => 'Updated template for extracting company registration data',
'custom_id' => 'comp-reg-v2',
'instruction' => 'Focus on extracting company name, registration number, and founding date accurately',
'schema' => [
'company_name' => [
'type' => 'string',
'required' => true
],
'registration_number' => [
'type' => 'string',
'required' => true
],
'founding_date' => [
'type' => 'date',
'required' => true
],
'address' => [
'type' => 'string',
'required' => false
]
],
'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://api.anycheck.ai/templates/{id}"
payload := strings.NewReader("{\n \"name\": \"Updated Company Registration Verification\",\n \"description\": \"Updated template for extracting company registration data\",\n \"custom_id\": \"comp-reg-v2\",\n \"instruction\": \"Focus on extracting company name, registration number, and founding date accurately\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"founding_date\": {\n \"type\": \"date\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"config\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.anycheck.ai/templates/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Company Registration Verification\",\n \"description\": \"Updated template for extracting company registration data\",\n \"custom_id\": \"comp-reg-v2\",\n \"instruction\": \"Focus on extracting company name, registration number, and founding date accurately\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"founding_date\": {\n \"type\": \"date\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anycheck.ai/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Company Registration Verification\",\n \"description\": \"Updated template for extracting company registration data\",\n \"custom_id\": \"comp-reg-v2\",\n \"instruction\": \"Focus on extracting company name, registration number, and founding date accurately\",\n \"schema\": {\n \"company_name\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"registration_number\": {\n \"type\": \"string\",\n \"required\": true\n },\n \"founding_date\": {\n \"type\": \"date\",\n \"required\": true\n },\n \"address\": {\n \"type\": \"string\",\n \"required\": false\n }\n },\n \"config\": {}\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
Path Parameters
Resource UUID
Body
Updated template name
"Updated Company Registration Verification"
Updated template description
"Updated template for extracting company registration data"
Updated custom identifier
"comp-reg-v2"
Updated special instructions
"Focus on extracting company name, registration number, and founding date accurately"
Updated data extraction schema
{
"company_name": { "type": "string", "required": true },
"registration_number": { "type": "string", "required": true },
"founding_date": { "type": "date", "required": true },
"address": { "type": "string", "required": false }
}
Updated template configuration settings
Response
Template updated 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?