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

# Document Realtime

## Retrieve realtime documents for a company

Request official documents directly from the Handelsregister in real-time. This endpoint fetches documents on-demand from the official register, ensuring you always receive the most current version available.

**Cost:** 10 credits

### Available Document Types

You can retrieve several types of official documents by specifying the `document_category` parameter:

* **current\_printout (AD)** - Current register extract showing the company's current state (PDF)
* **chronological\_printout (CD)** - Complete historical extract showing all changes (PDF)
* **historical\_printout (HD)** - Historical snapshot from a previous point in time (PDF)
* **shareholder\_list (GV)** - Official shareholder list (Gesellschafterliste) (PDF)
* **articles\_of\_association (UT)** - Company articles/bylaws (Satzung/Gesellschaftsvertrag) (PDF)
* **structured\_information (SI)** - Structured company data (XML format)

Most documents are returned as PDF files that can be downloaded and archived, except for structured\_information which is provided in XML format for programmatic processing. These are the same official documents you would receive from the Handelsregister portal, but accessible via API.

### Use Cases

**Legal Documentation:** Lawyers and notaries use this endpoint to obtain official, certified register extracts for transactions, litigation, or regulatory filings. The current printout (AD) is commonly required for contracts and due diligence.

**Compliance Archiving:** Maintain audit trails by periodically downloading and archiving official documents. Keep historical snapshots for regulatory compliance and documentation requirements.

**Automated Verification:** Integrate document retrieval into your workflows to automatically obtain proof of registration, current ownership, or corporate structure whenever needed for client onboarding or transaction processing.


## OpenAPI

````yaml GET /v1/document
openapi: 3.1.0
info:
  title: OpenRegister API
  version: 2.5.0
  description: >
    API for accessing comprehensive company data from official registers.

    This API provides access to company information, shareholder data, financial
    reports, and contact details.
servers:
  - url: https://api.openregister.de
    description: Production
security:
  - BearerAuth: []
paths:
  /v1/document:
    get:
      tags:
        - v1
      summary: Fetch a document in realtime.
      operationId: getRealtimeDocument
      parameters:
        - name: company_id
          in: query
          required: true
          schema:
            type: string
        - name: document_category
          in: query
          required: true
          schema:
            type: string
            enum:
              - current_printout
              - chronological_printout
              - historical_printout
              - structured_information
              - shareholder_list
              - articles_of_association
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealtimeDocumentResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Openregister from 'openregister';

            const client = new Openregister({
              apiKey: process.env['OPENREGISTER_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.document.getRealtimeV1({
              company_id: 'company_id',
              document_category: 'current_printout',
            });

            console.log(response.category);
        - lang: Python
          source: |-
            import os
            from openregister import Openregister

            client = Openregister(
                api_key=os.environ.get("OPENREGISTER_API_KEY"),  # This is the default and can be omitted
            )
            response = client.document.get_realtime_v1(
                company_id="company_id",
                document_category="current_printout",
            )
            print(response.category)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/oregister/openregister-go\"\n\t\"github.com/oregister/openregister-go/option\"\n)\n\nfunc main() {\n\tclient := openregister.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Document.GetRealtimeV1(context.TODO(), openregister.DocumentGetRealtimeV1Params{\n\t\tCompanyID:        \"company_id\",\n\t\tDocumentCategory: openregister.DocumentGetRealtimeV1ParamsDocumentCategoryCurrentPrintout,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Category)\n}\n"
        - lang: CLI
          source: |-
            openregister document get-realtime-v1 \
              --api-key 'My API Key' \
              --company-id company_id \
              --document-category current_printout
components:
  schemas:
    RealtimeDocumentResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
        category:
          type: string
          enum:
            - current_printout
            - chronological_printout
            - historical_printout
            - structured_information
            - shareholder_list
            - articles_of_association
        file_date:
          type: string
          nullable: true
        file_name:
          type: string
          nullable: true
      required:
        - url
        - category
        - file_date
        - file_name
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        API Key Authentication
        Provide your API key as a Bearer token in the Authorization header.

````