/v1/consumer/me
curl --request PUT \
--url https://api.truthlocks.com/v1/consumer/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>",
"name": "<string>",
"region_code": "<string>",
"settings": "<unknown>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language: '<string>',
name: '<string>',
region_code: '<string>',
settings: '<unknown>'
})
};
fetch('https://api.truthlocks.com/v1/consumer/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/me"
payload = {
"language": "<string>",
"name": "<string>",
"region_code": "<string>",
"settings": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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/me"
payload := strings.NewReader("{\n \"language\": \"<string>\",\n \"name\": \"<string>\",\n \"region_code\": \"<string>\",\n \"settings\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}Consumidor (B2C)
Atualizar perfil do consumidor
PUT
/
v1
/
consumer
/
me
/v1/consumer/me
curl --request PUT \
--url https://api.truthlocks.com/v1/consumer/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>",
"name": "<string>",
"region_code": "<string>",
"settings": "<unknown>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language: '<string>',
name: '<string>',
region_code: '<string>',
settings: '<unknown>'
})
};
fetch('https://api.truthlocks.com/v1/consumer/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/me"
payload = {
"language": "<string>",
"name": "<string>",
"region_code": "<string>",
"settings": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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/me"
payload := strings.NewReader("{\n \"language\": \"<string>\",\n \"name\": \"<string>\",\n \"region_code\": \"<string>\",\n \"settings\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}Atualiza valores não vazios de
name, region_code e language. Os nomes são limitados a 200 caracteres. Os valores de região suportados são US, EU, AF, GB, CA, AU e SG; os idiomas suportados são en, es, fr, de e zh.
A região é uma preferência de conta: configurá-la não migra dados existentes nem fornece garantia de residência. Notificações settings não são suportadas por este manipulador; enviá-las retorna HTTP 501 e deixa as configurações inalteradas. O sucesso retorna {"status":"updated"}.
