Clientes
Consulte um cliente
Busque um cliente pelo identificador.
cURL
curl --fail-with-body --request GET \
'https://api.sinnu.com.br/api/customers/ID_DO_RECURSO/' \
--header "Authorization: Bearer $SINNU_API_KEY"const apiKey = process.env.SINNU_API_KEY;
if (!apiKey) throw new Error("Configure SINNU_API_KEY no servidor.");
const response = await fetch("https://api.sinnu.com.br/api/customers/ID_DO_RECURSO/", {
method: "GET",
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(response.status === 204 ? null : await response.json());{
"id": "00000000-0000-4000-8000-000000000002",
"name": "Cliente de exemplo",
"email": "cliente@example.com",
"phone": "11999999999",
"document": null,
"type": "pf",
"createdAt": "2026-09-01T12:00:00.000Z",
"address": null,
"notes": null
}O recurso precisa pertencer à empresa vinculada à chave de API.
Autorizações
Resposta
200 - application/json
Cliente da sua empresa. Expõe apenas os dados principais de cadastro e um único documento principal (CPF ou CNPJ).
⌘I
cURL
curl --fail-with-body --request GET \
'https://api.sinnu.com.br/api/customers/ID_DO_RECURSO/' \
--header "Authorization: Bearer $SINNU_API_KEY"const apiKey = process.env.SINNU_API_KEY;
if (!apiKey) throw new Error("Configure SINNU_API_KEY no servidor.");
const response = await fetch("https://api.sinnu.com.br/api/customers/ID_DO_RECURSO/", {
method: "GET",
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(response.status === 204 ? null : await response.json());{
"id": "00000000-0000-4000-8000-000000000002",
"name": "Cliente de exemplo",
"email": "cliente@example.com",
"phone": "11999999999",
"document": null,
"type": "pf",
"createdAt": "2026-09-01T12:00:00.000Z",
"address": null,
"notes": null
}