cURL con datos ficticios
curl --request GET \
--url https://api.example.com/dict-hub/v1/keys/pix-demo@example.com \
--header 'Authorization: Bearer demo-access-token' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--header 'X-End-To-End-Id: E12345678202401011200abcdef12345'import requests
url = "https://api.example.com/dict-hub/v1/keys/{key}"
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Account-Id': '<x-account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/dict-hub/v1/keys/{key}', 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/keys/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Account-Id: <x-account-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/dict-hub/v1/keys/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/dict-hub/v1/keys/{key}")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dict-hub/v1/keys/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
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",
"endToEndId": "E12345678202401011200abcdef12345",
"keyOwnershipDate": "2019-11-18T03:00:00Z",
"keyType": "CPF",
"keyValue": "52998224725",
"person": {
"document": "52998224725",
"name": "João Silva",
"personType": "NATURAL",
"tradeName": "Silva ME"
}
}{
"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"
}
}Consultar una clave Pix
Se consulta el sistema DICT para obtener los detalles de una clave Pix durante la preparación de un pago. El servidor infiere el tipo de clave a partir de la forma del valor.
GET
/
keys
/
{key}
cURL con datos ficticios
curl --request GET \
--url https://api.example.com/dict-hub/v1/keys/pix-demo@example.com \
--header 'Authorization: Bearer demo-access-token' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--header 'X-End-To-End-Id: E12345678202401011200abcdef12345'import requests
url = "https://api.example.com/dict-hub/v1/keys/{key}"
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Account-Id': '<x-account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/dict-hub/v1/keys/{key}', 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/keys/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Account-Id: <x-account-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/dict-hub/v1/keys/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/dict-hub/v1/keys/{key}")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dict-hub/v1/keys/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
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",
"endToEndId": "E12345678202401011200abcdef12345",
"keyOwnershipDate": "2019-11-18T03:00:00Z",
"keyType": "CPF",
"keyValue": "52998224725",
"person": {
"document": "52998224725",
"name": "João Silva",
"personType": "NATURAL",
"tradeName": "Silva ME"
}
}{
"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"
}
}Autorizaciones
JWT bearer token issued by the identity provider.
Encabezados
UUID de la cuenta asociada a la operación.
Ejemplo:
"019606a1-3b4c-7d8e-9f01-234567890abc"
End-to-end correlation ID (exactly 32 characters)
Ejemplo:
"E12345678202401011200abcdef12345"
Parámetros de ruta
Pix key value (CPF, CNPJ, email, +E.164 phone, or EVP UUID)
Ejemplo:
"52998224725"
Respuesta
OK
Show child attributes
Show child attributes
Ejemplo:
"2019-11-18T03:00:00Z"
Ejemplo:
"CPF"
Ejemplo:
"52998224725"
Show child attributes
Show child attributes
Ejemplo:
"E12345678202401011200abcdef12345"
Ejemplo:
"2019-11-18T03:00:00Z"
¿Esta página le ayudó?

