cURL
curl --request PUT \
--url https://sandbox-api.superpagamentos.com/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "Pedro",
"lastName": "Alecrim",
"email": "email@email.com",
"phoneNumber": "00000000000",
"document": "00000000000",
"birthdate": "1994-10-04",
"address": {
"zipcode": 87654321,
"street": "Rua B",
"streetNumber": 200,
"complement": "Casa 10",
"reference": "Ao lado da padaria",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP"
}
}
'import requests
url = "https://sandbox-api.superpagamentos.com/customers/{customerId}"
payload = {
"firstName": "Pedro",
"lastName": "Alecrim",
"email": "email@email.com",
"phoneNumber": "00000000000",
"document": "00000000000",
"birthdate": "1994-10-04",
"address": {
"zipcode": 87654321,
"street": "Rua B",
"streetNumber": 200,
"complement": "Casa 10",
"reference": "Ao lado da padaria",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'Pedro',
lastName: 'Alecrim',
email: 'email@email.com',
phoneNumber: '00000000000',
document: '00000000000',
birthdate: '1994-10-04',
address: {
zipcode: 87654321,
street: 'Rua B',
streetNumber: 200,
complement: 'Casa 10',
reference: 'Ao lado da padaria',
neighborhood: 'Jardins',
city: 'São Paulo',
state: 'SP'
}
})
};
fetch('https://sandbox-api.superpagamentos.com/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.superpagamentos.com/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Pedro',
'lastName' => 'Alecrim',
'email' => 'email@email.com',
'phoneNumber' => '00000000000',
'document' => '00000000000',
'birthdate' => '1994-10-04',
'address' => [
'zipcode' => 87654321,
'street' => 'Rua B',
'streetNumber' => 200,
'complement' => 'Casa 10',
'reference' => 'Ao lado da padaria',
'neighborhood' => 'Jardins',
'city' => 'São Paulo',
'state' => 'SP'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.superpagamentos.com/customers/{customerId}"
payload := strings.NewReader("{\n \"firstName\": \"Pedro\",\n \"lastName\": \"Alecrim\",\n \"email\": \"email@email.com\",\n \"phoneNumber\": \"00000000000\",\n \"document\": \"00000000000\",\n \"birthdate\": \"1994-10-04\",\n \"address\": {\n \"zipcode\": 87654321,\n \"street\": \"Rua B\",\n \"streetNumber\": 200,\n \"complement\": \"Casa 10\",\n \"reference\": \"Ao lado da padaria\",\n \"neighborhood\": \"Jardins\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\"\n }\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))
}HttpResponse<String> response = Unirest.put("https://sandbox-api.superpagamentos.com/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Pedro\",\n \"lastName\": \"Alecrim\",\n \"email\": \"email@email.com\",\n \"phoneNumber\": \"00000000000\",\n \"document\": \"00000000000\",\n \"birthdate\": \"1994-10-04\",\n \"address\": {\n \"zipcode\": 87654321,\n \"street\": \"Rua B\",\n \"streetNumber\": 200,\n \"complement\": \"Casa 10\",\n \"reference\": \"Ao lado da padaria\",\n \"neighborhood\": \"Jardins\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.superpagamentos.com/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Pedro\",\n \"lastName\": \"Alecrim\",\n \"email\": \"email@email.com\",\n \"phoneNumber\": \"00000000000\",\n \"document\": \"00000000000\",\n \"birthdate\": \"1994-10-04\",\n \"address\": {\n \"zipcode\": 87654321,\n \"street\": \"Rua B\",\n \"streetNumber\": 200,\n \"complement\": \"Casa 10\",\n \"reference\": \"Ao lado da padaria\",\n \"neighborhood\": \"Jardins\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cccfaed0-f346-4543-81ee-57b41db2aafa",
"firstName": "Pedro",
"lastName": "Alecrim",
"email": "email@email.com",
"phoneNumber": "00000000000",
"document": "00000000000",
"birthdate": "1994-10-04",
"address": {
"statusId": "APPROVED",
"zipcode": 87654321,
"street": "Rua B",
"streetNumber": 200,
"complement": "Casa 10",
"reference": "Ao lado da padaria",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP"
},
"statusId": "APPROVED",
"createdAt": "2025-05-31T22:41:16.755Z"
},
"message": "Cliente atualizado com sucesso"
}Clientes
Atualizar cliente
Atualiza os dados de um cliente específico. Nenhum campo é obrigatório, exceto quando o cliente não possui um endereço cadastrado e deseja cadastrar um novo endereço - neste caso, todos os campos do endereço são obrigatórios.
PUT
/
customers
/
{customerId}
cURL
curl --request PUT \
--url https://sandbox-api.superpagamentos.com/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "Pedro",
"lastName": "Alecrim",
"email": "email@email.com",
"phoneNumber": "00000000000",
"document": "00000000000",
"birthdate": "1994-10-04",
"address": {
"zipcode": 87654321,
"street": "Rua B",
"streetNumber": 200,
"complement": "Casa 10",
"reference": "Ao lado da padaria",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP"
}
}
'import requests
url = "https://sandbox-api.superpagamentos.com/customers/{customerId}"
payload = {
"firstName": "Pedro",
"lastName": "Alecrim",
"email": "email@email.com",
"phoneNumber": "00000000000",
"document": "00000000000",
"birthdate": "1994-10-04",
"address": {
"zipcode": 87654321,
"street": "Rua B",
"streetNumber": 200,
"complement": "Casa 10",
"reference": "Ao lado da padaria",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'Pedro',
lastName: 'Alecrim',
email: 'email@email.com',
phoneNumber: '00000000000',
document: '00000000000',
birthdate: '1994-10-04',
address: {
zipcode: 87654321,
street: 'Rua B',
streetNumber: 200,
complement: 'Casa 10',
reference: 'Ao lado da padaria',
neighborhood: 'Jardins',
city: 'São Paulo',
state: 'SP'
}
})
};
fetch('https://sandbox-api.superpagamentos.com/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.superpagamentos.com/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Pedro',
'lastName' => 'Alecrim',
'email' => 'email@email.com',
'phoneNumber' => '00000000000',
'document' => '00000000000',
'birthdate' => '1994-10-04',
'address' => [
'zipcode' => 87654321,
'street' => 'Rua B',
'streetNumber' => 200,
'complement' => 'Casa 10',
'reference' => 'Ao lado da padaria',
'neighborhood' => 'Jardins',
'city' => 'São Paulo',
'state' => 'SP'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.superpagamentos.com/customers/{customerId}"
payload := strings.NewReader("{\n \"firstName\": \"Pedro\",\n \"lastName\": \"Alecrim\",\n \"email\": \"email@email.com\",\n \"phoneNumber\": \"00000000000\",\n \"document\": \"00000000000\",\n \"birthdate\": \"1994-10-04\",\n \"address\": {\n \"zipcode\": 87654321,\n \"street\": \"Rua B\",\n \"streetNumber\": 200,\n \"complement\": \"Casa 10\",\n \"reference\": \"Ao lado da padaria\",\n \"neighborhood\": \"Jardins\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\"\n }\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))
}HttpResponse<String> response = Unirest.put("https://sandbox-api.superpagamentos.com/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Pedro\",\n \"lastName\": \"Alecrim\",\n \"email\": \"email@email.com\",\n \"phoneNumber\": \"00000000000\",\n \"document\": \"00000000000\",\n \"birthdate\": \"1994-10-04\",\n \"address\": {\n \"zipcode\": 87654321,\n \"street\": \"Rua B\",\n \"streetNumber\": 200,\n \"complement\": \"Casa 10\",\n \"reference\": \"Ao lado da padaria\",\n \"neighborhood\": \"Jardins\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.superpagamentos.com/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Pedro\",\n \"lastName\": \"Alecrim\",\n \"email\": \"email@email.com\",\n \"phoneNumber\": \"00000000000\",\n \"document\": \"00000000000\",\n \"birthdate\": \"1994-10-04\",\n \"address\": {\n \"zipcode\": 87654321,\n \"street\": \"Rua B\",\n \"streetNumber\": 200,\n \"complement\": \"Casa 10\",\n \"reference\": \"Ao lado da padaria\",\n \"neighborhood\": \"Jardins\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cccfaed0-f346-4543-81ee-57b41db2aafa",
"firstName": "Pedro",
"lastName": "Alecrim",
"email": "email@email.com",
"phoneNumber": "00000000000",
"document": "00000000000",
"birthdate": "1994-10-04",
"address": {
"statusId": "APPROVED",
"zipcode": 87654321,
"street": "Rua B",
"streetNumber": 200,
"complement": "Casa 10",
"reference": "Ao lado da padaria",
"neighborhood": "Jardins",
"city": "São Paulo",
"state": "SP"
},
"statusId": "APPROVED",
"createdAt": "2025-05-31T22:41:16.755Z"
},
"message": "Cliente atualizado com sucesso"
}Authorizations
Token JWT gerado na rota de autenticação (/auth). Deve ser enviado no formato: Bearer
Path Parameters
Identificador único do cliente
Body
application/json
Nome do cliente
Example:
"Pedro"
Sobrenome do cliente
Example:
"Alecrim"
Email do cliente
Example:
"email@email.com"
Número de telefone do cliente
Example:
"00000000000"
CPF ou CNPJ do cliente
Example:
"00000000000"
Data de nascimento do cliente no formato yyyy-mm-dd
Example:
"1994-10-04"
Endereço do cliente. Se o cliente não possuir um endereço cadastrado, todos os campos são obrigatórios para cadastrar um novo endereço.
Show child attributes
Show child attributes
⌘I