curl --request PATCH \
--url https://api.example.com/dict-hub/v1/entries/019606d4-6e7f-8091-2c34-567890123def \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--header 'X-Reason: USER_REQUESTED' \
--data '{
"account": {
"branch": "0001",
"number": "0007654321",
"openingDate": "2010-01-10",
"participant": "12345678",
"type": "CACC"
},
"metadata": {
"source": "mobile"
},
"owner": {
"name": "João Silva",
"tradeName": "Silva ME"
}
}'import requests
url = "https://api.example.com/dict-hub/v1/entries/{entry_id}"
payload = {
"account": {
"branch": "0001",
"number": "0007654321",
"openingDate": "2010-01-10",
"participant": "12345678",
"type": "CACC"
},
"metadata": { "source": "mobile" },
"owner": {
"name": "João Silva",
"tradeName": "Silva ME"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-Account-Id": "<x-account-id>",
"X-Reason": "<x-reason>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-Account-Id': '<x-account-id>',
'X-Reason': '<x-reason>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account: {
branch: '0001',
number: '0007654321',
openingDate: '2010-01-10',
participant: '12345678',
type: 'CACC'
},
metadata: {source: 'mobile'},
owner: {name: 'João Silva', tradeName: 'Silva ME'}
})
};
fetch('https://api.example.com/dict-hub/v1/entries/{entry_id}', 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.example.com/dict-hub/v1/entries/{entry_id}",
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([
'account' => [
'branch' => '0001',
'number' => '0007654321',
'openingDate' => '2010-01-10',
'participant' => '12345678',
'type' => 'CACC'
],
'metadata' => [
'source' => 'mobile'
],
'owner' => [
'name' => 'João Silva',
'tradeName' => 'Silva ME'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Account-Id: <x-account-id>",
"X-Reason: <x-reason>"
],
]);
$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.example.com/dict-hub/v1/entries/{entry_id}"
payload := strings.NewReader("{\n \"account\": {\n \"branch\": \"0001\",\n \"number\": \"0007654321\",\n \"openingDate\": \"2010-01-10\",\n \"participant\": \"12345678\",\n \"type\": \"CACC\"\n },\n \"metadata\": {\n \"source\": \"mobile\"\n },\n \"owner\": {\n \"name\": \"João Silva\",\n \"tradeName\": \"Silva ME\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("X-Reason", "<x-reason>")
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.example.com/dict-hub/v1/entries/{entry_id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Account-Id", "<x-account-id>")
.header("X-Reason", "<x-reason>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"branch\": \"0001\",\n \"number\": \"0007654321\",\n \"openingDate\": \"2010-01-10\",\n \"participant\": \"12345678\",\n \"type\": \"CACC\"\n },\n \"metadata\": {\n \"source\": \"mobile\"\n },\n \"owner\": {\n \"name\": \"João Silva\",\n \"tradeName\": \"Silva ME\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dict-hub/v1/entries/{entry_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Account-Id"] = '<x-account-id>'
request["X-Reason"] = '<x-reason>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": {\n \"branch\": \"0001\",\n \"number\": \"0007654321\",\n \"openingDate\": \"2010-01-10\",\n \"participant\": \"12345678\",\n \"type\": \"CACC\"\n },\n \"metadata\": {\n \"source\": \"mobile\"\n },\n \"owner\": {\n \"name\": \"João Silva\",\n \"tradeName\": \"Silva ME\"\n }\n}"
response = http.request(request)
puts response.read_body{
"account": {
"branch": "0001",
"number": "0007654321",
"openingDate": "2010-01-10T03:00:00Z",
"participant": "12345678",
"type": "CACC"
},
"createdAt": "2019-11-18T03:00:00Z",
"holderId": "019606e5-7f80-9102-3d45-678901234ef0",
"id": "019606c3-5d6e-7f80-1b23-456789012cde",
"keyCreationDate": "2019-11-18T03:00:00Z",
"keyOwnershipDate": "2019-11-18T03:00:00Z",
"keyType": "CPF",
"keyValue": "52998224725",
"metadata": {
"field": "field-example"
},
"organizationId": "019606d4-6e7f-8091-2c34-567890123def",
"owner": {
"document": "52998224725",
"name": "João Silva",
"personType": "NATURAL",
"tradeName": "Silva ME"
},
"requestId": "a946d533-7f22-42a5-9a9b-e87cd55c0f4d",
"status": "ACTIVE",
"updatedAt": "2019-11-18T03:00:00Z"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"code": "PIX-0032",
"title": "Idempotency Unavailable",
"message": "The request was not processed because the idempotency store is unavailable. Please retry."
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Atualizar um registro de chave Pix
Atualiza um registro Pix existente (JSON Merge Patch RFC 7386). Somente informações da conta, nome e nome comercial podem ser alterados.
curl --request PATCH \
--url https://api.example.com/dict-hub/v1/entries/019606d4-6e7f-8091-2c34-567890123def \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--header 'X-Reason: USER_REQUESTED' \
--data '{
"account": {
"branch": "0001",
"number": "0007654321",
"openingDate": "2010-01-10",
"participant": "12345678",
"type": "CACC"
},
"metadata": {
"source": "mobile"
},
"owner": {
"name": "João Silva",
"tradeName": "Silva ME"
}
}'import requests
url = "https://api.example.com/dict-hub/v1/entries/{entry_id}"
payload = {
"account": {
"branch": "0001",
"number": "0007654321",
"openingDate": "2010-01-10",
"participant": "12345678",
"type": "CACC"
},
"metadata": { "source": "mobile" },
"owner": {
"name": "João Silva",
"tradeName": "Silva ME"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-Account-Id": "<x-account-id>",
"X-Reason": "<x-reason>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-Account-Id': '<x-account-id>',
'X-Reason': '<x-reason>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account: {
branch: '0001',
number: '0007654321',
openingDate: '2010-01-10',
participant: '12345678',
type: 'CACC'
},
metadata: {source: 'mobile'},
owner: {name: 'João Silva', tradeName: 'Silva ME'}
})
};
fetch('https://api.example.com/dict-hub/v1/entries/{entry_id}', 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.example.com/dict-hub/v1/entries/{entry_id}",
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([
'account' => [
'branch' => '0001',
'number' => '0007654321',
'openingDate' => '2010-01-10',
'participant' => '12345678',
'type' => 'CACC'
],
'metadata' => [
'source' => 'mobile'
],
'owner' => [
'name' => 'João Silva',
'tradeName' => 'Silva ME'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Account-Id: <x-account-id>",
"X-Reason: <x-reason>"
],
]);
$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.example.com/dict-hub/v1/entries/{entry_id}"
payload := strings.NewReader("{\n \"account\": {\n \"branch\": \"0001\",\n \"number\": \"0007654321\",\n \"openingDate\": \"2010-01-10\",\n \"participant\": \"12345678\",\n \"type\": \"CACC\"\n },\n \"metadata\": {\n \"source\": \"mobile\"\n },\n \"owner\": {\n \"name\": \"João Silva\",\n \"tradeName\": \"Silva ME\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("X-Reason", "<x-reason>")
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.example.com/dict-hub/v1/entries/{entry_id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Account-Id", "<x-account-id>")
.header("X-Reason", "<x-reason>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"branch\": \"0001\",\n \"number\": \"0007654321\",\n \"openingDate\": \"2010-01-10\",\n \"participant\": \"12345678\",\n \"type\": \"CACC\"\n },\n \"metadata\": {\n \"source\": \"mobile\"\n },\n \"owner\": {\n \"name\": \"João Silva\",\n \"tradeName\": \"Silva ME\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dict-hub/v1/entries/{entry_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Account-Id"] = '<x-account-id>'
request["X-Reason"] = '<x-reason>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": {\n \"branch\": \"0001\",\n \"number\": \"0007654321\",\n \"openingDate\": \"2010-01-10\",\n \"participant\": \"12345678\",\n \"type\": \"CACC\"\n },\n \"metadata\": {\n \"source\": \"mobile\"\n },\n \"owner\": {\n \"name\": \"João Silva\",\n \"tradeName\": \"Silva ME\"\n }\n}"
response = http.request(request)
puts response.read_body{
"account": {
"branch": "0001",
"number": "0007654321",
"openingDate": "2010-01-10T03:00:00Z",
"participant": "12345678",
"type": "CACC"
},
"createdAt": "2019-11-18T03:00:00Z",
"holderId": "019606e5-7f80-9102-3d45-678901234ef0",
"id": "019606c3-5d6e-7f80-1b23-456789012cde",
"keyCreationDate": "2019-11-18T03:00:00Z",
"keyOwnershipDate": "2019-11-18T03:00:00Z",
"keyType": "CPF",
"keyValue": "52998224725",
"metadata": {
"field": "field-example"
},
"organizationId": "019606d4-6e7f-8091-2c34-567890123def",
"owner": {
"document": "52998224725",
"name": "João Silva",
"personType": "NATURAL",
"tradeName": "Silva ME"
},
"requestId": "a946d533-7f22-42a5-9a9b-e87cd55c0f4d",
"status": "ACTIVE",
"updatedAt": "2019-11-18T03:00:00Z"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"code": "PIX-0032",
"title": "Idempotency Unavailable",
"message": "The request was not processed because the idempotency store is unavailable. Please retry."
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Autorizações
JWT bearer token issued by the identity provider.
Cabeçalhos
Chave criada pelo cliente para repetir com segurança exatamente a mesma requisição.
1 - 64UUID da conta associada à operação.
"019606a1-3b4c-7d8e-9f01-234567890abc"
Motivo da operação. Para solicitação do cliente, use USER_REQUESTED.
"USER_REQUESTED"
Parâmetros de caminho
Entry ID (UUID format)
"019606c3-5d6e-7f80-1b23-456789012cde"
Corpo
Show child attributes
Show child attributes
Free-form, single-level key/value pairs persisted with the entry. Keys up to 100 characters, values up to 2000 characters, at most 25 entries; nested objects are rejected.
Show child attributes
Show child attributes
{ "source": "mobile" }
Show child attributes
Show child attributes
Resposta
OK
Show child attributes
Show child attributes
"2019-11-18T03:00:00Z"
"019606e5-7f80-9102-3d45-678901234ef0"
"019606c3-5d6e-7f80-1b23-456789012cde"
"2019-11-18T03:00:00Z"
"2019-11-18T03:00:00Z"
"CPF"
"52998224725"
"019606d4-6e7f-8091-2c34-567890123def"
Show child attributes
Show child attributes
"a946d533-7f22-42a5-9a9b-e87cd55c0f4d"
"ACTIVE"
"2019-11-18T03:00:00Z"
Show child attributes
Show child attributes
Esta página foi útil?

