Actualizar una entidad
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
Actualizar una entidad
PATCH
/
api
/
entity
/
v1
/
entities
/
{entityId}
Actualizar una entidad
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
}
Actualiza parcialmente los datos KYC, la dirección y los campos personalizados. Solo se modifican los campos enviados. Requiere la versión actual en If-Match para evitar sobrescribir cambios concurrentes.
- Si falta If-Match devuelve 400; un valor obsoleto devuelve 412 VERSION_CONFLICT. Lee la entidad de nuevo y reintenta con el nuevo ETag.
- type, externalId, birthdate, nationality, birthCountry, incorporationDate e incorporationCountry no se pueden cambiar mediante este endpoint.
- Los documentos se gestionan con los endpoints de Documents, no aquí.
- Editar los datos de la entidad no restablece las revisiones de pruebas.
- Mientras la entidad está en IN_REVIEW queda bloqueada (409 ENTITY_IN_REVIEW); las entidades REJECTED, BLOCKED y CLOSED no se pueden editar (409 ENTITY_NOT_EDITABLE).
application/problem+json con un code estable. Catálogo completo: Estados de entidades y códigos de error.Autorizaciones
Encabezados
Token de acceso Bearer para la autenticación. Este token se obtiene de los endpoints Get Access Token o Refresh Access Token. Tu cuenta de comerciante y el usuario que actúa se determinan a partir de él.
Ejemplo:
"Bearer <your_access_token>"
Parámetros de ruta
Cuerpo
application/json
Respuesta
OK.
Última modificación el 10 de noviembre de 2026

