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

# Order extract

> Submit a Transparenzregister extract request and return an extract resource with processing status.

Sandbox integration testing (recommended for all non-production testing):
- Send `X-Credential-Name: sandbox`.
- Do not send `company_id` (an empty body `{}` is valid).
- OpenRegister uses the Transparenzregister test environment and built-in test authentication.
- The request is submitted with the fixed test EKRN `DE727032388716`.
- The response has `company_id: null`.

Production usage:
- Always set `X-Credential-Name` to `default` or another stored credential name.
- `company_id` is required and must resolve to exactly one Transparenzregister legal entity.


## Order a Transparenzregister extract

Places an order for a Transparenzregister extract and returns a `TransparenzregisterExtract` resource with processing status. Use the returned `id` as the polling handle.

The typical flow is:

1. Store your credentials with the [credentials endpoint](/api/endpoint/transparenzregister-credentials)
2. Order an extract here with `company_id` (production) or sandbox mode (see below)
3. Poll the [get extract endpoint](/api/endpoint/transparenzregister-extract-get) with the returned `id` until `status` is `completed` or `failed`

At the Transparenzregister (EiS), requests are asynchronous: search → submit request → order documents → download. OpenRegister coordinates that workflow internally; you only poll until `status` leaves `processing`.

### Sandbox mode (integration testing)

Send header `X-Credential-Name: sandbox` and omit `company_id` (an empty body `{}` is valid). OpenRegister uses the EiS test environment at `https://test2.api.transparenzregister.de` with the built-in test user `testnutzer-eis@transparenzregister.de`. The request uses the fixed test EKRN `DE727032388716`; the response has `company_id: null`. **Cost:** 0 credits.

### Production mode

Always set `X-Credential-Name` — use `default` or another stored credential name you use in production. `company_id` is **required** and must resolve to exactly one Transparenzregister legal entity.

### Error cases

| Status | Cause                                                                                                                                                  |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`  | Invalid parameters (e.g. reserved credential name where not allowed, invalid `company_id`)                                                             |
| `401`  | Authentication required                                                                                                                                |
| `402`  | Transparenzregister API access requires a paid API plan                                                                                                |
| `403`  | Transparenzregister rejected authentication for the selected credential mode (EiS: account not unlocked, identification incomplete, or account locked) |
| `404`  | Company not found, credentials not found, or no Transparenzregister match for the company                                                              |
| `409`  | Multiple Transparenzregister companies matched — request cannot be disambiguated                                                                       |
| `429`  | Production extract quota exceeded for the rolling 30-day window                                                                                        |
| `500`  | Internal server error                                                                                                                                  |

**Cost:** 25 credits (0 credits when `X-Credential-Name: sandbox`)

### Notes

* The returned `id` (e.g. `tre_12345678`) is stable — store it to retrieve the extract later.


## OpenAPI

````yaml POST /v1/transparenzregister/extracts
openapi: 3.1.0
info:
  title: OpenRegister API
  version: 2.0.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/transparenzregister/extracts:
    post:
      tags:
        - v1
      summary: Submit Transparenzregister extract request
      description: >
        Submit a Transparenzregister extract request and return an extract
        resource with processing status.


        Sandbox integration testing (recommended for all non-production
        testing):

        - Send `X-Credential-Name: sandbox`.

        - Do not send `company_id` (an empty body `{}` is valid).

        - OpenRegister uses the Transparenzregister test environment and
        built-in test authentication.

        - The request is submitted with the fixed test EKRN `DE727032388716`.

        - The response has `company_id: null`.


        Production usage:

        - Always set `X-Credential-Name` to `default` or another stored
        credential name.

        - `company_id` is required and must resolve to exactly one
        Transparenzregister legal entity.
      operationId: createTransparenzregisterExtract
      parameters:
        - name: X-Credential-Name
          in: header
          required: false
          description: >
            Name identifying which credentials to use. Always send this header
            in production (typically `default` or another stored name).

            Reserved values:

            - default: use persisted default credentials for the current user.

            - sandbox: use OpenRegister's built-in Transparenzregister test
            client, test authentication, and fixed test EKRN.

            Any other value selects persisted credentials with the same name for
            the current user.

            Example: "client_a"
          schema:
            type: string
            default: default
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransparenzregisterExtractCreate'
      responses:
        '201':
          description: Extract request submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransparenzregisterExtractCreated'
        '400':
          description: Bad Request - Invalid company ID or parameters
        '401':
          description: Unauthorized - Authentication required
        '402':
          description: >-
            Payment Required - Transparenzregister API access requires a paid
            API plan
        '403':
          description: >-
            Forbidden - Transparenzregister rejected authentication for the
            selected credential mode
        '404':
          description: >-
            Not Found - Company not found, credentials not found, or no
            Transparenzregister match for the company
        '409':
          description: >-
            Conflict - Multiple Transparenzregister companies matched and the
            request cannot be disambiguated
        '429':
          description: >-
            Too Many Requests - Production extract quota exceeded for the
            rolling 30-day window
        '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 response = await
            client.transparenzregister.extract.createV1();


            console.log(response.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
            )
            response = client.transparenzregister.extract.create_v1()
            print(response.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\tresponse, err := client.Transparenzregister.Extract.NewV1(context.TODO(), openregister.TransparenzregisterExtractNewV1Params{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.ID)\n}\n"
        - lang: CLI
          source: |-
            openregister transparenzregister:extract create-v1 \
              --api-key 'My API Key'
components:
  schemas:
    TransparenzregisterExtractCreate:
      type: object
      description: |
        Request body for creating a Transparenzregister extract.
      properties:
        company_id:
          type: string
          description: |
            Unique company identifier.
            Required unless `X-Credential-Name` is set to `sandbox`.
            In sandbox mode this field should be omitted.
            Example: DE-HRB-F1103-267645
    TransparenzregisterExtractCreated:
      type: object
      description: >
        Response from creating a Transparenzregister extract.

        Only fields known at creation time are present.

        Poll `GET /v1/transparenzregister/extracts/{extract_id}` to retrieve
        report and documents.
      properties:
        id:
          type: string
          description: >
            Stable extract identifier. Use this to poll the get-extract
            endpoint.

            Example: "tre_12345678"
        status:
          type: string
          enum:
            - processing
          description: |
            Always `processing` on create.
            Poll the get-extract endpoint for terminal state.
        company_id:
          type: string
          nullable: true
          description: |
            Company identifier associated with this extract request.
            May be null when using sandbox credentials.
        ekrn:
          type: string
          nullable: true
          description: |
            EKRN used to request this extract.
        submitted_at:
          type: string
          format: date-time
          description: |
            Timestamp when extract submission started.
      required:
        - id
        - status
        - company_id
        - ekrn
        - submitted_at
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        API Key Authentication
        Provide your API key as a Bearer token in the Authorization header.

````