查询余额冻结列表
curl --request GET \
--url https://api.brazilpix.com/v2/balance-blocks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brazilpix.com/v2/balance-blocks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brazilpix.com/v2/balance-blocks', 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.brazilpix.com/v2/balance-blocks",
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>"
],
]);
$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.brazilpix.com/v2/balance-blocks"
req, _ := http.NewRequest("GET", url, nil)
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.brazilpix.com/v2/balance-blocks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brazilpix.com/v2/balance-blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.5,
"status": "awaiting_response",
"blockType": "med",
"referenceNumber": "<string>",
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"externalReference": "<string>",
"e2eId": "<string>",
"resolutionReason": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z"
}
],
"total": 3
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}余额冻结
查询余额冻结列表
返回账户的余额冻结记录(MED、司法或行政)。可选择按冻结状态筛选。
所需权限: BALANCE_BLOCK:READ 或 FULL_ACCESS
GET
/
balance-blocks
查询余额冻结列表
curl --request GET \
--url https://api.brazilpix.com/v2/balance-blocks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brazilpix.com/v2/balance-blocks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brazilpix.com/v2/balance-blocks', 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.brazilpix.com/v2/balance-blocks",
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>"
],
]);
$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.brazilpix.com/v2/balance-blocks"
req, _ := http.NewRequest("GET", url, nil)
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.brazilpix.com/v2/balance-blocks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brazilpix.com/v2/balance-blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.5,
"status": "awaiting_response",
"blockType": "med",
"referenceNumber": "<string>",
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"externalReference": "<string>",
"e2eId": "<string>",
"resolutionReason": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z"
}
],
"total": 3
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}授权
通过 POST /auth(client_id + client_secret)获取的访问令牌。有效期 300 秒。
请求头
执行操作的子账户的 reference。省略时,操作在主账户上执行;保留值 principal 同样解析为主账户,等同于省略该请求头。除 POST /auth 和 /sub-accounts 自身的端点(始终在主账户上操作)外,所有端点均接受该请求头。
可能的错误:404 SUB_ACCOUNT_NOT_FOUND、403 SUB_ACCOUNT_FORBIDDEN、403 SUB_ACCOUNT_SUSPENDED。
要求凭证已启用子账户访问(设置 → 集成 → API 凭证)。该项默认关闭,任何权限都无法替代,FULL_ACCESS 也不例外:未启用时响应为 403 SUB_ACCOUNT_FORBIDDEN。
Pattern:
^[a-z0-9][a-z0-9_-]{1,31}$示例:
"loja-centro"
查询参数
按状态筛选冻结记录。省略时返回账户的全部冻结记录。
可用选项:
awaiting_response, defended, approved, rejected