更新实体
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
}
实体
更新实体
PATCH
/
api
/
entity
/
v1
/
entities
/
{entityId}
更新实体
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
}
部分更新 KYC 数据、地址和自定义字段。仅更改所发送的字段。需要在 If-Match 中提供当前版本,以避免覆盖并发更改。
- 缺少 If-Match 时返回 400;值已过期时返回 412 VERSION_CONFLICT。请重新读取实体,并使用新的 ETag 重试。
- type、externalId、birthdate、nationality、birthCountry、incorporationDate 和 incorporationCountry 不能通过此 endpoint 更改。
- 文件通过 Documents endpoint 管理,而不是在此处。
- 编辑实体数据不会重置证明审核。
- 实体处于 IN_REVIEW 状态时被锁定(409 ENTITY_IN_REVIEW);处于 REJECTED、BLOCKED 和 CLOSED 状态的实体不能编辑(409 ENTITY_NOT_EDITABLE)。
code 的 application/problem+json。完整目录:实体状态与错误码。授权
请求头
请求体
application/json
响应
OK。
最后修改于 2026年11月10日

