Registro de consumidor
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"
}Consumidor (B2C)
Registro de consumidor
Crea una nueva cuenta de consumidor. No se requiere autenticación.
POST
/
v1
/
consumer
/
signup
Registro de consumidor
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"
}Registrar una nueva cuenta de consumidor (B2C). Crea un inquilino personal, una organización y un usuario. El campo company_name es opcional; si se omite, por defecto es el nombre del usuario + ‘s Workspace’. Después del registro, se envía un enlace de verificación por correo electrónico. Las entregas pendientes en la bandeja de entrada (credenciales emitidas antes del registro) se reclaman automáticamente.
Respuestas
Cuerpo
application/json

