Atualizar uma entidade
curl --request PATCH \
--url https://api.stage.localpayment.com/api/entity/v1/entities/{entityId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"website": "https://www.example.com/new",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999990099"
}
}
'import requests
url = "https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}"
payload = {
"website": "https://www.example.com/new",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999990099"
}
}
headers = {
"Authorization": "Bearer <token>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
website: 'https://www.example.com/new',
phone: {countryCode: '55', areaCode: '11', number: '999990099'}
})
};
fetch('https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}', 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://api.stage.localpayment.com/api/entity/v1/entities/{entityId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'website' => 'https://www.example.com/new',
'phone' => [
'countryCode' => '55',
'areaCode' => '11',
'number' => '999990099'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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://api.stage.localpayment.com/api/entity/v1/entities/{entityId}"
payload := strings.NewReader("{\n \"website\": \"https://www.example.com/new\",\n \"phone\": {\n \"countryCode\": \"55\",\n \"areaCode\": \"11\",\n \"number\": \"999990099\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("If-Match", "<if-match>")
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.patch("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}")
.header("Authorization", "Bearer <token>")
.header("If-Match", "<if-match>")
.header("Content-Type", "application/json")
.body("{\n \"website\": \"https://www.example.com/new\",\n \"phone\": {\n \"countryCode\": \"55\",\n \"areaCode\": \"11\",\n \"number\": \"999990099\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["If-Match"] = '<if-match>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website\": \"https://www.example.com/new\",\n \"phone\": {\n \"countryCode\": \"55\",\n \"areaCode\": \"11\",\n \"number\": \"999990099\"\n }\n}"
response = http.request(request)
puts response.read_body{
"internalId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"externalId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type": "COMPANY",
"status": "PENDING_KYC",
"name": "Example Company S.A.",
"lastname": null,
"birthdate": null,
"gender": null,
"nationality": null,
"birthCountry": null,
"residenceCountry": null,
"occupation": null,
"isPep": false,
"incorporationDate": "2020-01-15",
"incorporationCountry": "BRA",
"website": "https://www.example.com/new",
"legalRepresentativeName": "Jane Doe",
"email": "test@example.com",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999990099"
},
"address": {
"street": "Rua Exemplo",
"city": "São Paulo",
"state": "SP",
"zipCode": "01310-100",
"number": "100",
"comment": null,
"country": "BRA",
"line2": "Sala 100",
"line3": "Torre A"
},
"attributes": {
"emailPixKey": "test@example.com",
"socialMedia": "https://www.linkedin.com/company/example",
"numberOfEmployees": "11-50",
"countryTaxResidence": "BRA",
"sourceOfFundsAndIncome": "sales_of_goods_and_services",
"reasonForAccountOpening": "receive_payments_for_goods_and_services",
"estimatedAnnualRevenueUsd": "1m_to_10m",
"estimatedMonthlyVolumeUsd": "50000",
"businessActivityDescription": "Online retail of home goods. Receives payments from end customers in Brazil via PIX."
},
"documentationStatus": "NO_FILES",
"document": {
"documentId": "91eaf0c8-844b-42a1-a614-304edbcfa57d",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "CNPJ",
"id": "00000000000100",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": true,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:18:53Z",
"updatedAt": "2024-01-15T17:19:23Z"
},
"documents": [
{
"documentId": "a4f9d2ed-c365-4a0b-b775-9278c039af93",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "ARTICLES_OF_INCORPORATION",
"id": "ART-00000000000100",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": false,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:18:53Z",
"updatedAt": "2024-01-15T17:19:23Z"
},
{
"documentId": "5ca3e868-2b76-4390-b25a-5d10c0db8516",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "TAX_ID",
"id": "00.000.000/0001-00",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": false,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:18:54Z",
"updatedAt": "2024-01-15T17:19:23Z"
}
],
"version": 1,
"createdAt": "2024-01-15T17:18:53Z",
"updatedAt": "2024-01-15T17:19:23Z",
"customFieldSchemaVersion": 9
}
Entidades
Atualizar uma entidade
PATCH
/
api
/
entity
/
v1
/
entities
/
{entityId}
Atualizar uma entidade
curl --request PATCH \
--url https://api.stage.localpayment.com/api/entity/v1/entities/{entityId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"website": "https://www.example.com/new",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999990099"
}
}
'import requests
url = "https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}"
payload = {
"website": "https://www.example.com/new",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999990099"
}
}
headers = {
"Authorization": "Bearer <token>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
website: 'https://www.example.com/new',
phone: {countryCode: '55', areaCode: '11', number: '999990099'}
})
};
fetch('https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}', 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://api.stage.localpayment.com/api/entity/v1/entities/{entityId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'website' => 'https://www.example.com/new',
'phone' => [
'countryCode' => '55',
'areaCode' => '11',
'number' => '999990099'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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://api.stage.localpayment.com/api/entity/v1/entities/{entityId}"
payload := strings.NewReader("{\n \"website\": \"https://www.example.com/new\",\n \"phone\": {\n \"countryCode\": \"55\",\n \"areaCode\": \"11\",\n \"number\": \"999990099\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("If-Match", "<if-match>")
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.patch("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}")
.header("Authorization", "Bearer <token>")
.header("If-Match", "<if-match>")
.header("Content-Type", "application/json")
.body("{\n \"website\": \"https://www.example.com/new\",\n \"phone\": {\n \"countryCode\": \"55\",\n \"areaCode\": \"11\",\n \"number\": \"999990099\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["If-Match"] = '<if-match>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website\": \"https://www.example.com/new\",\n \"phone\": {\n \"countryCode\": \"55\",\n \"areaCode\": \"11\",\n \"number\": \"999990099\"\n }\n}"
response = http.request(request)
puts response.read_body{
"internalId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"externalId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type": "COMPANY",
"status": "PENDING_KYC",
"name": "Example Company S.A.",
"lastname": null,
"birthdate": null,
"gender": null,
"nationality": null,
"birthCountry": null,
"residenceCountry": null,
"occupation": null,
"isPep": false,
"incorporationDate": "2020-01-15",
"incorporationCountry": "BRA",
"website": "https://www.example.com/new",
"legalRepresentativeName": "Jane Doe",
"email": "test@example.com",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999990099"
},
"address": {
"street": "Rua Exemplo",
"city": "São Paulo",
"state": "SP",
"zipCode": "01310-100",
"number": "100",
"comment": null,
"country": "BRA",
"line2": "Sala 100",
"line3": "Torre A"
},
"attributes": {
"emailPixKey": "test@example.com",
"socialMedia": "https://www.linkedin.com/company/example",
"numberOfEmployees": "11-50",
"countryTaxResidence": "BRA",
"sourceOfFundsAndIncome": "sales_of_goods_and_services",
"reasonForAccountOpening": "receive_payments_for_goods_and_services",
"estimatedAnnualRevenueUsd": "1m_to_10m",
"estimatedMonthlyVolumeUsd": "50000",
"businessActivityDescription": "Online retail of home goods. Receives payments from end customers in Brazil via PIX."
},
"documentationStatus": "NO_FILES",
"document": {
"documentId": "91eaf0c8-844b-42a1-a614-304edbcfa57d",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "CNPJ",
"id": "00000000000100",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": true,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:18:53Z",
"updatedAt": "2024-01-15T17:19:23Z"
},
"documents": [
{
"documentId": "a4f9d2ed-c365-4a0b-b775-9278c039af93",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "ARTICLES_OF_INCORPORATION",
"id": "ART-00000000000100",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": false,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:18:53Z",
"updatedAt": "2024-01-15T17:19:23Z"
},
{
"documentId": "5ca3e868-2b76-4390-b25a-5d10c0db8516",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "TAX_ID",
"id": "00.000.000/0001-00",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": false,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:18:54Z",
"updatedAt": "2024-01-15T17:19:23Z"
}
],
"version": 1,
"createdAt": "2024-01-15T17:18:53Z",
"updatedAt": "2024-01-15T17:19:23Z",
"customFieldSchemaVersion": 9
}
Atualiza parcialmente os dados de KYC, o endereço e os campos personalizados. Apenas os campos enviados são alterados. Exige a versão atual em If-Match para evitar a sobrescrita de alterações concorrentes.
- A ausência de If-Match retorna 400; um valor desatualizado retorna 412 VERSION_CONFLICT. Leia a entidade novamente e tente de novo com o novo ETag.
- type, externalId, birthdate, nationality, birthCountry, incorporationDate e incorporationCountry não podem ser alterados por este endpoint.
- Os documentos são gerenciados com os endpoints de Documents, não aqui.
- Editar os dados da entidade não reinicia as revisões das provas.
- Enquanto a entidade estiver IN_REVIEW, ela fica bloqueada (409 ENTITY_IN_REVIEW); entidades REJECTED, BLOCKED e CLOSED não podem ser editadas (409 ENTITY_NOT_EDITABLE).
application/problem+json com um code estável. Catálogo completo: Entity Statuses and Error Codes.Autorizações
Cabeçalhos
Token de acesso Bearer para autenticação. Este token é obtido nos endpoints Obter token de acesso ou Renovar token de acesso. Sua conta de comerciante e o usuário que realiza a ação são identificados a partir dele.
Exemplo:
"Bearer <your_access_token>"
Parâmetros de caminho
Corpo
application/json
Resposta
OK.
Última modificação em 10 de novembro de 2026

