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

# Zlecenie raportu

> Tworzy zlecenie raportu KRZ lub MSiG dla wybranego zakresu dat (maksymalny zakres zależy od konfiguracji — patrz limit w abonamencie). Raporty są generowane asynchronicznie; status sprawdzaj endpointem `/v1/reports/status/{job_id}`. Funkcja wymaga planu Pro lub wyższego.



## OpenAPI

````yaml /openapi.json post /v1/reports/submit
openapi: 3.1.0
info:
  title: krdata API
  description: >

    krdata udostępnia dane z polskich rejestrów gospodarczych (KRS, CRBR, KRZ,
    MSiG, biała lista VAT)

    w postaci jednego, spójnego API.


    Uwierzytelnianie odbywa się przez klucz API przekazywany w nagłówku
    `x-api-key`.

    Limity zapytań oraz dzienne pule (PDF, WPV, raporty) wynikają z wybranego
    abonamentu —

    szczegóły zwraca endpoint `GET /v1/usage/summary`.
  version: 0.1.0
servers:
  - url: https://api.krdata.pl
    description: Production
security: []
paths:
  /v1/reports/submit:
    post:
      tags:
        - Reports
      summary: Zlecenie raportu
      description: >-
        Tworzy zlecenie raportu KRZ lub MSiG dla wybranego zakresu dat
        (maksymalny zakres zależy od konfiguracji — patrz limit w abonamencie).
        Raporty są generowane asynchronicznie; status sprawdzaj endpointem
        `/v1/reports/status/{job_id}`. Funkcja wymaga planu Pro lub wyższego.
      operationId: reports-submit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomReportSubmit'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomReportJob'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CustomReportSubmit:
      properties:
        source:
          type: string
          title: Source
        from_date:
          type: string
          format: date
          title: From Date
        to_date:
          type: string
          format: date
          title: To Date
        format:
          type: string
          title: Format
          default: json
        filter_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Filter Id
      type: object
      required:
        - source
        - from_date
        - to_date
      title: CustomReportSubmit
    CustomReportJob:
      properties:
        id:
          type: string
          title: Id
        status:
          type: string
          title: Status
        source:
          type: string
          title: Source
        from_date:
          type: string
          format: date
          title: From Date
        to_date:
          type: string
          format: date
          title: To Date
        output_format:
          type: string
          title: Output Format
        filter_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Filter Id
        row_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Row Count
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        created_at:
          type: string
          format: date-time
          title: Created At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - id
        - status
        - source
        - from_date
        - to_date
        - output_format
        - created_at
        - expires_at
      title: CustomReportJob
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````