> ## 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 Stored

## Retrieve stored documents for a company

Access documents that have been previously retrieved and stored in our database. This endpoint is faster and more cost-effective for accessing historical documents or documents that have already been fetched. For the most current documents, use the [realtime document endpoint](/endpoint/document-realtime) instead.

**Cost:** 10 credits


## OpenAPI

````yaml GET /v1/document/{document_id}
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/{document_id}:
    get:
      tags:
        - v1
      summary: Get document information
      operationId: getDocumentV1
      parameters:
        - name: document_id
          in: path
          required: true
          description: |
            Unique document identifier.
            Example: a6daa905-a87e-451c-9df6-35051eec8b61
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved document information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '400':
          description: Bad Request - Invalid parameters provided
        '401':
          description: Unauthorized - Authentication required
        '402':
          description: Payment Required - Insufficient credits for this request
        '404':
          description: Not Found - Document not found
        '429':
          description: Too Many Requests - Rate limit exceeded
        '500':
          description: >-
            Internal Server Error - An error occurred while processing the
            request
      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 document = await client.document.getCachedV1('document_id');

            console.log(document.id);
        - 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
            )
            document = client.document.get_cached_v1(
                "document_id",
            )
            print(document.id)
        - 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\tdocument, err := client.Document.GetCachedV1(context.TODO(), \"document_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", document.ID)\n}\n"
        - lang: CLI
          source: |-
            openregister document get-cached-v1 \
              --api-key 'My API Key' \
              --document-id document_id
components:
  schemas:
    Document:
      type: object
      properties:
        id:
          description: >-
            The unique identifier for the document. E.g.
            "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          type: string
        name:
          description: The name of the document. E.g. "Musterprotokoll vom 01.01.2022"
          type: string
        date:
          description: The date of the document. E.g. "2022-01-01"
          type: string
        url:
          description: >-
            The URL of the document. It can be downloaded from there. Only valid
            for 15 minutes after the request.
          type: string
          format: uri
        type:
          description: The type of document.
          type: string
          enum:
            - articles_of_association
            - sample_protocol
            - shareholder_list
      required:
        - id
        - name
        - date
        - url
        - type
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        API Key Authentication
        Provide your API key as a Bearer token in the Authorization header.

````