إنشاء إيصال وكيل
curl --request POST \
--url https://api.truthlocks.com/v1/agent-receipts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '<string>'})
};
fetch('https://api.truthlocks.com/v1/agent-receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agent-receipts"
payload = { "agent_id": "<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/agent-receipts"
payload := strings.NewReader("{\n \"agent_id\": \"<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))
}{
"receipt_id": "<string>",
"agent_id": "<string>",
"version": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"signature": "<string>",
"signing_envelope": {
"version": "<string>",
"key_id": "<string>",
"algorithm": "<string>",
"payload": "<string>"
},
"metadata": {}
}إيصالات الوكيل (MAIP)
إنشاء إيصال وكيل
يخزن إيصال إجراء MAIP موقعًا من الإصدار 2 لوكيل نشط. هذا منفصل عن واجهة برمجة تطبيقات الإيصالات العامة. يتم توقيع بيانات تعريف التكامل؛ لم يتم إثبات تضمين الشفافية.
POST
/
v1
/
agent-receipts
إنشاء إيصال وكيل
curl --request POST \
--url https://api.truthlocks.com/v1/agent-receipts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '<string>'})
};
fetch('https://api.truthlocks.com/v1/agent-receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agent-receipts"
payload = { "agent_id": "<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/agent-receipts"
payload := strings.NewReader("{\n \"agent_id\": \"<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))
}{
"receipt_id": "<string>",
"agent_id": "<string>",
"version": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"signature": "<string>",
"signing_envelope": {
"version": "<string>",
"key_id": "<string>",
"algorithm": "<string>",
"payload": "<string>"
},
"metadata": {}
}يخزن إيصال إجراء MAIP موقعًا من الإصدار 2 لوكيل نشط. هذا منفصل عن واجهة برمجة تطبيقات الإيصالات العامة. يتم توقيع بيانات تعريف التكامل؛ لم يتم إثبات تضمين الشفافية.
استخدم مفتاح واجهة برمجة تطبيقات مساحة العمل أو رمز الحامل. قم بترميز المعرف الكامل
maip-receipt: كجزء واحد من مسار عنوان URL.الجسم
application/json

