Obter cliente
curl --request GET \
--url https://api.upag.io/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/customers/{customerId}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Clientes
Obter cliente
Consulta um cliente pelo ID
GET
https://api.upag.io
/
v1
/
customers
/
{customerId}
Obter cliente
curl --request GET \
--url https://api.upag.io/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/customers/{customerId}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Permissão:
customer.read. Apenas chave secreta (sk_…).
Os exemplos usam o sandbox (
https://api.upag.dev/v1). Em produção use https://api.upag.io/v1 com sk_live_….Endpoint
curl https://api.upag.dev/v1/customers/8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83 \
-H "Authorization: Bearer sk_test_your_api_key"
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const customer = await upag.customers.retrieve('8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83');
Parâmetros
string (uuid)
required
ID do cliente.
Resposta
200 OK
Response
{
"id": "8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83",
"name": "Maria Souza",
"email": "maria@example.com",
"document": { "number": "12345678909", "type": "cpf" },
"phone": { "countryCode": "55", "areaCode": "11", "number": "999998888" },
"address": {
"street": "Avenida Paulista",
"number": "1578",
"complement": null,
"neighborhood": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"zip": "01310200"
},
"createdAt": "2026-07-27T18:04:11.482Z",
"updatedAt": "2026-07-27T18:04:11.482Z"
}
Erros
| Status | Mensagem | Causa |
|---|---|---|
404 | Customer not found | Cliente inexistente, excluído ou de outra conta |
422 | VALIDATION_FAILED | customerId não é UUID |