تقييم المخاطر
curl --request POST \
--url https://api.truthlocks.com/v1/risk/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"subject_id": "<string>",
"risk_score": 50
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({subject_id: '<string>', risk_score: 50})
};
fetch('https://api.truthlocks.com/v1/risk/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/evaluate"
payload = {
"subject_id": "<string>",
"risk_score": 50
}
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/risk/evaluate"
payload := strings.NewReader("{\n \"subject_id\": \"<string>\",\n \"risk_score\": 50\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))
}{
"decision_id": "<string>",
"signal_id": "<string>",
"decision": "allow",
"policy_id": "<string>",
"receipt_id": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}تقييم المخاطر
تقييم المخاطر
نقطة نهاية موحدة لتقييم المخاطر. تستقبل إشارة، وتقيمها مقابل سياسات المستأجر الخاص بك، وتنشئ قرار مخاطر موقعًا، وتصدر اختياريًا إيصال fraud_decision_receipt لعدم الإنكار.
POST
/
v1
/
risk
/
evaluate
تقييم المخاطر
curl --request POST \
--url https://api.truthlocks.com/v1/risk/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"subject_id": "<string>",
"risk_score": 50
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({subject_id: '<string>', risk_score: 50})
};
fetch('https://api.truthlocks.com/v1/risk/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/risk/evaluate"
payload = {
"subject_id": "<string>",
"risk_score": 50
}
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/risk/evaluate"
payload := strings.NewReader("{\n \"subject_id\": \"<string>\",\n \"risk_score\": 50\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))
}{
"decision_id": "<string>",
"signal_id": "<string>",
"decision": "allow",
"policy_id": "<string>",
"receipt_id": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}كيف يعمل التقييم
- يتم استيعاب الإشارة في
risk_signals - يتم تقييم قواعد سياستك النشطة (أعلى أولوية مطابقة تفوز)
- يتم إنشاء سجل
risk_decisionبالنتيجة - إذا تم توفير
mint_receipt: trueوissuer_id/kid، يتم سكfraud_decision_receiptعبر خدمة الشهادة
نتائج القرار
| الإجراء | المعنى |
|---|---|
allow | لم تتطابق أي سياسة أو كانت النتيجة أقل من جميع العتبات |
challenge | مطلوب MFA أو مصادقة تصعيدية |
block | رفض الإجراء بالكامل |
review | التوجيه إلى قائمة انتظار مراجعة الاحتيال اليدوية |
أنواع الإيصالات المضمنة
| نوع الإيصال | الغرض |
|---|---|
fraud_decision_receipt | يسجل قرار السماح/التحدي/الحظر/المراجعة |
ato_alert_receipt | يسجل أحداث تنبيه ATO |
risk_block_receipt | يثبت أن إجراءً ما قد تم حظره |
deepfake_detection_receipt | يسجل نتائج فحص التزييف العميق |
الاستجابة
الجسم
application/json

