更新文档
curl --request PATCH \
--url https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"issueDate": "2024-01-15",
"expirationDate": "2034-01-15",
"metadata": {
"tin": "formatted"
}
}
'import requests
url = "https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}"
payload = {
"issueDate": "2024-01-15",
"expirationDate": "2034-01-15",
"metadata": { "tin": "formatted" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
issueDate: '2024-01-15',
expirationDate: '2034-01-15',
metadata: {tin: 'formatted'}
})
};
fetch('https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}', 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}/documents/{docId}",
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([
'issueDate' => '2024-01-15',
'expirationDate' => '2034-01-15',
'metadata' => [
'tin' => 'formatted'
]
]),
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://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}"
payload := strings.NewReader("{\n \"issueDate\": \"2024-01-15\",\n \"expirationDate\": \"2034-01-15\",\n \"metadata\": {\n \"tin\": \"formatted\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"issueDate\": \"2024-01-15\",\n \"expirationDate\": \"2034-01-15\",\n \"metadata\": {\n \"tin\": \"formatted\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"issueDate\": \"2024-01-15\",\n \"expirationDate\": \"2034-01-15\",\n \"metadata\": {\n \"tin\": \"formatted\"\n }\n}"
response = http.request(request)
puts response.read_body{
"documentId": "5ca3e868-2b76-4390-b25a-5d10c0db8516",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "TAX_ID",
"id": "00.000.000/0001-00",
"issuingCountry": "BRA",
"issueDate": "2024-01-15",
"expirationDate": "2034-01-15",
"isPrimary": false,
"status": "PENDING",
"metadata": {
"tin": "formatted"
},
"proofs": [],
"createdAt": "2024-01-15T17:18:54Z",
"updatedAt": "2024-01-15T17:19:32Z"
}
文档
更新文档
PATCH
/
api
/
entity
/
v1
/
entities
/
{entityId}
/
documents
/
{docId}
更新文档
curl --request PATCH \
--url https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"issueDate": "2024-01-15",
"expirationDate": "2034-01-15",
"metadata": {
"tin": "formatted"
}
}
'import requests
url = "https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}"
payload = {
"issueDate": "2024-01-15",
"expirationDate": "2034-01-15",
"metadata": { "tin": "formatted" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
issueDate: '2024-01-15',
expirationDate: '2034-01-15',
metadata: {tin: 'formatted'}
})
};
fetch('https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}', 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}/documents/{docId}",
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([
'issueDate' => '2024-01-15',
'expirationDate' => '2034-01-15',
'metadata' => [
'tin' => 'formatted'
]
]),
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://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}"
payload := strings.NewReader("{\n \"issueDate\": \"2024-01-15\",\n \"expirationDate\": \"2034-01-15\",\n \"metadata\": {\n \"tin\": \"formatted\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"issueDate\": \"2024-01-15\",\n \"expirationDate\": \"2034-01-15\",\n \"metadata\": {\n \"tin\": \"formatted\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents/{docId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"issueDate\": \"2024-01-15\",\n \"expirationDate\": \"2034-01-15\",\n \"metadata\": {\n \"tin\": \"formatted\"\n }\n}"
response = http.request(request)
puts response.read_body{
"documentId": "5ca3e868-2b76-4390-b25a-5d10c0db8516",
"entityId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "TAX_ID",
"id": "00.000.000/0001-00",
"issuingCountry": "BRA",
"issueDate": "2024-01-15",
"expirationDate": "2034-01-15",
"isPrimary": false,
"status": "PENDING",
"metadata": {
"tin": "formatted"
},
"proofs": [],
"createdAt": "2024-01-15T17:18:54Z",
"updatedAt": "2024-01-15T17:19:32Z"
}
更新已声明文档的签发数据。type、id 和 isPrimary 不可修改。
- 更改文档数据会将其已通过(APPROVED)的证明重置为 PENDING:Localpayment 将重新审核这些证明。
- 如需更改类型或编号,请添加新文档并删除旧文档。
application/problem+json 格式,并附带稳定的 code。完整目录:实体状态和错误代码。授权
请求头
路径参数
请求体
application/json
响应
OK。
最后修改于 2026年11月10日

