> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brazilpix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询余额冻结列表

> 返回账户的余额冻结记录（MED、司法或行政）。可选择按冻结状态筛选。

**所需权限：** `BALANCE_BLOCK:READ` 或 `FULL_ACCESS`



## OpenAPI

````yaml openapi.cn.json GET /balance-blocks
openapi: 3.0.0
info:
  title: Brazil Pix API
  description: Brazil Pix Payment API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.brazilpix.com/v2
security: []
paths:
  /balance-blocks:
    get:
      tags:
        - External API - Balance Blocks
      summary: 查询余额冻结列表
      description: |-
        返回账户的余额冻结记录（MED、司法或行政）。可选择按冻结状态筛选。

        **所需权限：** `BALANCE_BLOCK:READ` 或 `FULL_ACCESS`
      operationId: ExternalBalanceBlocksController_findAll
      parameters:
        - name: status
          in: query
          required: false
          description: 按状态筛选冻结记录。省略时返回账户的全部冻结记录。
          schema:
            type: string
            enum:
              - awaiting_response
              - defended
              - approved
              - rejected
        - $ref: '#/components/parameters/SubAccount'
      responses:
        '200':
          description: 账户的余额冻结列表
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllExternalBalanceBlocksOutput'
        '401':
          description: Unauthorized - Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    SubAccount:
      name: X-Sub-Account
      in: header
      required: false
      description: >-
        执行操作的子账户的 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`。
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9_-]{1,31}$
        example: loja-centro
  schemas:
    GetAllExternalBalanceBlocksOutput:
      type: object
      properties:
        items:
          description: 账户的余额冻结列表
          type: array
          items:
            $ref: '#/components/schemas/ExternalBalanceBlockOutput'
        total:
          type: integer
          description: 返回的冻结记录总数
          example: 3
      required:
        - items
        - total
    UnauthorizedErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication token is required
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: InternalError
        message:
          type: string
          example: An unexpected error occurred
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
          example: 2771463d58840c8e116dc6dda1e1e5d0
      required:
        - statusCode
        - error
        - message
        - timestamp
    ExternalBalanceBlockOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: 冻结 ID
        transactionId:
          type: string
          format: uuid
          description: 被冻结交易的 ID
        externalReference:
          type: string
          nullable: true
          description: 原始交易的外部参考（如有）
        e2eId:
          type: string
          nullable: true
          description: 原始交易的 PIX 网络端到端 ID（如有）
        amount:
          type: number
          description: 冻结金额（BRL）
          example: 150.5
        status:
          type: string
          enum:
            - awaiting_response
            - defended
            - approved
            - rejected
          description: 冻结状态
          example: awaiting_response
        blockType:
          type: string
          enum:
            - med
            - judicial
            - administrative
          description: 冻结类型
          example: med
        referenceNumber:
          type: string
          description: 冻结参考编号
        reason:
          type: string
          description: 冻结原因
        resolutionReason:
          type: string
          nullable: true
          description: 处理结果原因（冻结已处理后才存在）
        resolvedAt:
          type: string
          format: date-time
          nullable: true
          description: 处理时间，ISO 8601 格式（冻结已处理后才存在）
        createdAt:
          type: string
          format: date-time
          description: 创建时间，ISO 8601 格式
      required:
        - id
        - transactionId
        - amount
        - status
        - blockType
        - referenceNumber
        - reason
        - createdAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 通过 POST /auth（client_id + client_secret）获取的访问令牌。有效期 300 秒。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.