تسجيل المستهلك
curl --request POST \
--url https://api.truthlocks.com/v1/consumer/signup \
--header 'Content-Type: application/json' \
--data '
{
"country_code": "NG",
"email": "jsmith@example.com",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({country_code: 'NG', email: 'jsmith@example.com', password: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/signup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/signup"
payload = {
"country_code": "NG",
"email": "jsmith@example.com",
"password": "<string>"
}
headers = {"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/consumer/signup"
payload := strings.NewReader("{\n \"country_code\": \"NG\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created"
}المستهلك (B2C)
تسجيل المستهلك
ينشئ حساب مستهلك جديد. لا يتطلب مصادقة.
POST
/
v1
/
consumer
/
signup
تسجيل المستهلك
curl --request POST \
--url https://api.truthlocks.com/v1/consumer/signup \
--header 'Content-Type: application/json' \
--data '
{
"country_code": "NG",
"email": "jsmith@example.com",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({country_code: 'NG', email: 'jsmith@example.com', password: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/signup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/signup"
payload = {
"country_code": "NG",
"email": "jsmith@example.com",
"password": "<string>"
}
headers = {"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/consumer/signup"
payload := strings.NewReader("{\n \"country_code\": \"NG\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "created"
}تسجيل حساب مستهلك جديد (B2C). ينشئ مستأجرًا شخصيًا، ومؤسسة، ومستخدمًا. حقل company_name اختياري - إذا تم حذفه، فإنه يتم تعيينه افتراضيًا إلى اسم المستخدم + ‘s Workspace’. بعد التسجيل، يتم إرسال رابط التحقق من البريد الإلكتروني. يتم المطالبة تلقائيًا بالتسليمات المعلقة في صندوق الوارد (الاعتمادات التي تم إنشاؤها قبل التسجيل).
الاستجابات
الجسم
application/json

