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

# Pobieranie raportu

> Pobiera plik gotowego raportu niestandardowego (JSON lub CSV). Raport jest dostępny do upływu `expires_at`.



## OpenAPI

````yaml /openapi.json get /v1/reports/download/{job_id}
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/download/{job_id}:
    get:
      tags:
        - Reports
      summary: Pobieranie raportu
      description: >-
        Pobiera plik gotowego raportu niestandardowego (JSON lub CSV). Raport
        jest dostępny do upływu `expires_at`.
      operationId: reports-download
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/ReportKrzRow'
                  - type: array
                    items:
                      $ref: '#/components/schemas/ReportMsigRow'
                  - type: array
                    items:
                      $ref: '#/components/schemas/ReportKrsChangeRow'
                title: Response 200 Reports-Download
            text/csv:
              schema:
                type: string
                format: binary
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ReportKrzRow:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        announcement_date:
          type: string
          format: date
          title: Announcement Date
        signature:
          anyOf:
            - type: string
            - type: 'null'
          title: Signature
        number:
          anyOf:
            - type: string
            - type: 'null'
          title: Number
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        court:
          anyOf:
            - type: string
            - type: 'null'
          title: Court
        court_division:
          anyOf:
            - type: string
            - type: 'null'
          title: Court Division
        rodzaj_sprawy:
          anyOf:
            - type: string
            - type: 'null'
          title: Rodzaj Sprawy
        subcategory:
          anyOf:
            - type: string
            - type: 'null'
          title: Subcategory
        debtor_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Kind
        debtor_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Name
        debtor_pesel:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Pesel
        debtor_birth_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Debtor Birth Date
        debtor_nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Nip
        debtor_krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Krs
        debtor_legal_form:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Legal Form
        debtor_miejscowosc:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Miejscowosc
        debtor_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Country
        advisors:
          items:
            $ref: '#/components/schemas/ReportKrzAdvisor'
          type: array
          title: Advisors
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
        tresc_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Tresc Text
      type: object
      required:
        - id
        - announcement_date
        - advisors
        - attributes
      title: ReportKrzRow
    ReportMsigRow:
      properties:
        id:
          type: integer
          title: Id
        signature_type:
          type: string
          title: Signature Type
        monitor_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Monitor Number
        number_of_notice:
          anyOf:
            - type: string
            - type: 'null'
          title: Number Of Notice
        sequence_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sequence Number
        date_of_publication:
          type: string
          format: date
          title: Date Of Publication
        signature_of_case:
          anyOf:
            - type: string
            - type: 'null'
          title: Signature Of Case
        signature_krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Signature Krs
        page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page
        chapter_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chapter Name
        chapter_root:
          anyOf:
            - type: string
            - type: 'null'
          title: Chapter Root
        entity_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Name
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
        text_position:
          anyOf:
            - type: string
            - type: 'null'
          title: Text Position
        text_body:
          anyOf:
            - type: string
            - type: 'null'
          title: Text Body
      type: object
      required:
        - id
        - signature_type
        - date_of_publication
      title: ReportMsigRow
    ReportKrsChangeRow:
      properties:
        id:
          type: integer
          title: Id
        changed_on:
          type: string
          format: date
          title: Changed On
        krs:
          type: string
          title: Krs
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        category:
          type: string
          title: Category
        change_type:
          type: string
          title: Change Type
        operation:
          type: string
          title: Operation
        label:
          type: string
          title: Label
        entity_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Label
        old_value:
          anyOf:
            - {}
            - type: 'null'
          title: Old Value
        new_value:
          anyOf:
            - {}
            - type: 'null'
          title: New Value
      type: object
      required:
        - id
        - changed_on
        - krs
        - category
        - change_type
        - operation
        - label
      title: ReportKrsChangeRow
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReportKrzAdvisor:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        name_normalized:
          anyOf:
            - type: string
            - type: 'null'
          title: Name Normalized
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
        legal_form:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Form
        company_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Company Id
        event_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Code
        event_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Label
      type: object
      title: ReportKrzAdvisor
    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

````