الحصول على التحقق من المستندات
curl --request GET \
--url https://api.truthlocks.com/v1/truth/document/{documentId} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/truth/document/{documentId}', 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/{documentId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/truth/document/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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
}مطالبات ووثائق الحقيقة
الحصول على التحقق من المستندات
استرداد حالة التحقق ونتيجته لمستند مقدم
GET
/
v1
/
truth
/
document
/
{documentId}
الحصول على التحقق من المستندات
curl --request GET \
--url https://api.truthlocks.com/v1/truth/document/{documentId} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/truth/document/{documentId}', 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/{documentId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/truth/document/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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
}يعرض الحالة الحالية ونتائج التحقق لمستند تم تقديمه مسبقًا. عند اكتمال المعالجة، يتضمن الرد حكم الذكاء الاصطناعي و (إذا كان ذلك ممكنًا) حكم الإنسان، بالإضافة إلى المطالبة بالحقيقة ومعرفات الإيصال المرتبطة.
المصادقة
يتطلب رأسX-API-Key أو رمز Bearer JWT. يتم اشتقاق مساحة العمل من بيانات الاعتماد الموثقة؛ لا ترسل X-Tenant-ID.
الاستجابة
حالة المعالجة الحالية. أحد الخيارات: -
processing — يتم معالجة المستند
تم تحليلها - verified — تم اجتياز المستند للتحقق - disputed — المستند
لديه إشارات متضاربة - rejected — فشل المستند في التحقق
(تم اكتشاف تلاعب أو تزوير أو عدم صلاحية)تحديد نموذج الذكاء الاصطناعي. أحد الخيارات التالية:
authentic، suspicious، forged،
inconclusive. null أثناء المعالجة.تحديد المراجع البشري، إذا تم تشغيل المراجعة البشرية. أحد الخيارات التالية:
authentic، suspicious، forged، inconclusive. null إذا لم يكن بعد
تمت مراجعته أو لم تكن المراجعة البشرية مطلوبة.قائمة معرفات الإيصالات التي تم سكها أثناء عملية التحقق. عادةً
يتضمن إيصال التحقق، وإذا كان ذلك ممكنًا، مراجعة بشرية
الإيصال.

