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

# Get receipt

> Read a hosted receipt by receipt ID.



## OpenAPI

````yaml /api-reference/hosted-receipts-openapi.yaml get /receipts/{receiptId}
openapi: 3.1.0
info:
  title: OpenFiskal hosted receipts API
  version: 1.0.0
  license:
    name: Proprietary
  description: |
    OpenFiskal exposes a hosted receipts API for retrieving, rendering, and
    delivering completed receipts.

    Authentication uses the same server-to-server bearer token and
    `X-OpenFiskal-Merchant` scoping model as the core fiscalization API.
servers:
  - url: https://api.openfiskal.com/v1
    description: Production
  - url: https://sandbox.api.openfiskal.com/v1
    description: Sandbox
security: []
tags:
  - name: Receipts
    description: Retrieve, render, and deliver hosted receipts.
paths:
  /receipts/{receiptId}:
    parameters:
      - $ref: '#/components/parameters/MerchantHeader'
    get:
      tags:
        - Receipts
      summary: Get receipt
      description: Read a hosted receipt by receipt ID.
      parameters:
        - $ref: '#/components/parameters/ReceiptId'
      responses:
        '200':
          description: Receipt returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Receipt'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - BearerAuth: []
components:
  parameters:
    MerchantHeader:
      name: X-OpenFiskal-Merchant
      in: header
      required: true
      schema:
        type: string
    ReceiptId:
      name: receiptId
      in: path
      required: true
      schema:
        type: string
  schemas:
    Receipt:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
        operation_id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
        register_id:
          type: string
        external_reference:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - available
            - archived
        currency:
          type: string
        issued_at:
          type: string
          format: date-time
        issuer:
          $ref: '#/components/schemas/ReceiptIssuer'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/ReceiptLineItem'
        totals:
          $ref: '#/components/schemas/ReceiptTotals'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/ReceiptPayment'
        fiscal:
          type: object
          additionalProperties: true
        links:
          $ref: '#/components/schemas/ReceiptLinks'
        metadata:
          type: object
          additionalProperties: true
      required:
        - id
        - operation_id
        - merchant_id
        - location_id
        - register_id
        - status
        - currency
        - issued_at
        - issuer
        - line_items
        - totals
        - payments
        - links
    ReceiptIssuer:
      type: object
      additionalProperties: false
      properties:
        legal_name:
          type: string
        tax_id:
          type:
            - string
            - 'null'
        location_name:
          type: string
        register_name:
          type: string
        address:
          type: object
          additionalProperties: false
          properties:
            line1:
              type: string
            city:
              type: string
            postal_code:
              type: string
            country_code:
              type: string
              description: ISO 3166-1 alpha-3 country code.
              minLength: 3
              maxLength: 3
              example: DEU
          required:
            - line1
            - city
            - postal_code
            - country_code
      required:
        - legal_name
        - location_name
        - register_name
        - address
    ReceiptLineItem:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
        description:
          type: string
        quantity:
          type: number
        unit_price:
          type: integer
        total_amount:
          type: integer
        tax_rate:
          type:
            - string
            - 'null'
        tax_amount:
          type:
            - integer
            - 'null'
      required:
        - description
        - quantity
        - unit_price
        - total_amount
    ReceiptTotals:
      type: object
      additionalProperties: false
      properties:
        total_gross:
          type: integer
        total_net:
          type: integer
        total_tax:
          type: integer
      required:
        - total_gross
        - total_net
        - total_tax
    ReceiptPayment:
      type: object
      additionalProperties: false
      properties:
        method:
          type: string
        amount:
          type: integer
        details:
          type: object
          additionalProperties: true
      required:
        - method
        - amount
    ReceiptLinks:
      type: object
      additionalProperties: false
      properties:
        self:
          type: string
          format: uri
        pdf:
          type: string
          format: uri
        hosted:
          type: string
          format: uri
      required:
        - self
        - pdf
        - hosted
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
        message:
          type: string
        retryable:
          type: boolean
        request_id:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - code
        - message
        - retryable
  responses:
    Unauthorized:
      description: Authentication is missing or invalid.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key does not have access to the requested resource.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: The caller exceeded the allowed request rate.
      headers:
        X-Request-Id:
          schema:
            type: string
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````