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

# Get Block Receipts

> Get all transaction receipts for a block



## OpenAPI

````yaml GET /api/v1/customer/{chain}/blocks/receipts
openapi: 3.1.0
info:
  title: SonarX EVM API - Blocks
  description: >-
    Query block data, receipts, and transaction counts for EVM-compatible
    networks.
  version: 1.0.0
servers:
  - url: https://api-gateway.sonarx.com
    description: Production API
security:
  - apiKey: []
tags:
  - name: Blocks
    description: Query block data, receipts, and transaction counts
paths:
  /api/v1/customer/{chain}/blocks/receipts:
    get:
      tags:
        - Blocks
      summary: Get Block Receipts
      description: Get all transaction receipts for a block.
      operationId: getBlockReceipts
      parameters:
        - $ref: '#/components/parameters/ChainPath'
        - name: block_number
          in: query
          description: Block number to query (>= 0)
          required: true
          schema:
            type: integer
            minimum: 0
            example: 81901165
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: Block receipts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockReceiptsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    ChainPath:
      name: chain
      in: path
      description: The blockchain network to query
      required: true
      schema:
        type: string
        enum:
          - polygon
        example: polygon
    Limit:
      name: limit
      in: query
      description: Maximum number of results (1-50)
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 50
        default: 10
    Offset:
      name: offset
      in: query
      description: Number of results to skip for pagination
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
  schemas:
    BlockReceiptsResponse:
      type: object
      properties:
        block_number:
          type: integer
        offset:
          type: integer
        limit:
          type: integer
        result:
          type: array
          items:
            $ref: '#/components/schemas/TransactionReceipt'
        count:
          type: integer
      example:
        block_number: 81901165
        offset: 0
        limit: 10
        result:
          - block_number: 81901165
            timestamp: 1768922302
            datetime: '2026-01-20T15:18:22'
            transaction_hash: '0x6a9cb0071fe44d7cf50962bc9ea05dfe45662d34c71f4f8b12fb3918f62f9692'
            transaction_index: 0
            cumulative_gas_used: 124608
            gas_used: 124608
            contract_address: null
            status: false
            effective_gas_price: 1227576058762
            version: 0
          - block_number: 81901165
            timestamp: 1768922302
            datetime: '2026-01-20T15:18:22'
            transaction_hash: '0xffac055a26c586c5007fb6218dd74296468eacf7491b9ac8f5c83060c4cefe53'
            transaction_index: 1
            cumulative_gas_used: 164131
            gas_used: 39523
            contract_address: null
            status: true
            effective_gas_price: 958895963074
            version: 0
        count: 2
    TransactionReceipt:
      type: object
      properties:
        block_number:
          type: integer
        timestamp:
          type: integer
        datetime:
          type: string
          format: date-time
        transaction_hash:
          type: string
        transaction_index:
          type: integer
        cumulative_gas_used:
          type: integer
        gas_used:
          type: integer
        contract_address:
          type: string
          nullable: true
        status:
          type: boolean
        effective_gas_price:
          type: integer
        version:
          type: integer
      example:
        block_number: 81901165
        timestamp: 1768922302
        datetime: '2026-01-20T15:18:22'
        transaction_hash: '0xffac055a26c586c5007fb6218dd74296468eacf7491b9ac8f5c83060c4cefe53'
        transaction_index: 1
        cumulative_gas_used: 164131
        gas_used: 39523
        contract_address: null
        status: true
        effective_gas_price: 958895963074
        version: 0
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Error message
      required:
        - detail
  responses:
    BadRequest:
      description: Bad Request - Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingBlockNumber:
              summary: Missing block number
              value:
                detail: block_number is required
            mixedRangeParams:
              summary: Mixed block and datetime parameters
              value:
                detail: >-
                  Cannot mix block and datetime parameters. Use either
                  from_block/to_block or from_datetime/to_datetime, not both
            missingRangeParams:
              summary: No range parameters provided
              value:
                detail: >-
                  Either block range (from_block/to_block) or datetime range
                  (from_datetime/to_datetime) must be provided
            incompleteBlockRange:
              summary: Incomplete block range
              value:
                detail: Both from_block and to_block must be provided together
            incompleteDatetimeRange:
              summary: Incomplete datetime range
              value:
                detail: Both from_datetime and to_datetime must be provided together
            invalidBlockOrder:
              summary: Invalid block range order
              value:
                detail: to_block must be >= from_block
            blockRangeTooLarge:
              summary: Block range exceeds limit
              value:
                detail: Block range cannot exceed 100 blocks
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Invalid API key
    NotFound:
      description: Not Found - Resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Block not found
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: Internal server error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: API key for authentication. Contact SonarX to obtain your API key.

````