Cadastro 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)
Cadastro de Consumidor
Cria uma nova conta de consumidor. Nenhuma autenticação é necessária.
POST
/
v1
/
consumer
/
signup
Cadastro 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 uma nova conta de consumidor (B2C). Cria um locatário pessoal, organização e usuário. O campo company_name é opcional — se omitido, o padrão é o nome do usuário + ‘s Workspace’. Após o cadastro, um link de verificação de e-mail é enviado. Entregas pendentes na caixa de entrada (credenciais emitidas antes do cadastro) são automaticamente reivindicadas.
Respostas
Corpo
application/json

