التحقق من حقيقة المستند
curl --request POST \
--url https://api.truthlocks.com/v1/truth/document/verify \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', document_hash: '<string>'})
};
fetch('https://api.truthlocks.com/v1/truth/document/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/truth/document/verify"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_hash": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/truth/document/verify"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"document_hash\": \"<string>\"\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))
}{
"verification_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_hash": "<string>",
"status": "pending",
"results": [
{}
],
"verifications": [
{}
],
"claims": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"payload": {},
"evidence": [
{}
],
"status": "pending",
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestations": [
{
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"witness_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_hash": "<string>",
"signature": "<string>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z"
}
],
"verified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}مطالبات ووثائق الحقيقة
سجل تجزئة المستند (تجريبي)
مدخلات خط أنابيب المستندات الحالية وقيود التنفيذ.
POST
/
v1
/
truth
/
document
/
verify
التحقق من حقيقة المستند
curl --request POST \
--url https://api.truthlocks.com/v1/truth/document/verify \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', document_hash: '<string>'})
};
fetch('https://api.truthlocks.com/v1/truth/document/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/truth/document/verify"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_hash": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/truth/document/verify"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"document_hash\": \"<string>\"\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))
}{
"verification_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_hash": "<string>",
"status": "pending",
"results": [
{}
],
"verifications": [
{}
],
"claims": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"payload": {},
"evidence": [
{}
],
"status": "pending",
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestations": [
{
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"witness_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_hash": "<string>",
"signature": "<string>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z"
}
],
"verified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}يحاكي التنفيذ الحالي الاستخراج والتحقق بالذكاء الاصطناعي. لا يعتبر حكمه وثقته المولدان دليلًا على صحة المستند. لا تستخدم نقطة النهاية هذه للموافقة على الهويات، أو إثبات الامتثال، أو مصادقة المستندات.
agent_id و document_hash، مع document_type و file_name و metadata الاختيارية. يجب أن يكون الوكيل موجودًا ونشطًا. لا يقبل لا بايتات المستند في document_b64، أو يقوم بالتعرف الضوئي على الحروف (OCR)، أو يقارن ملفًا محملًا بالتجزئة المقدمة.
ينشئ المعالج سجله بشكل متزامن. استخدم معرف المستند المعروض مع الحصول على المستند. تصف تجزئات الاستخراج التي تم إنشاؤها محتوى محاكى، وليس بايتات الملف المستخرجة. تحتوي توقيعات إيصالات خط الأنابيب حاليًا على علامات نظام بدلاً من التوقيعات التشفيرية.
للتحقق من السجل المشفر، استخدم Verify Attestation مع شهادة موقّعة حقيقية والحمولة الأصلية أو تجزئة المستند. يتحقق ذلك من السلامة وحالة السجل، وليس ما إذا كانت المطالبات الواقعية للمستند صحيحة.الجسم
application/json

