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

> Zwraca dane jednoosobowej działalności gospodarczej z Centralnej Ewidencji i Informacji o Działalności Gospodarczej — nazwa firmy, dane właściciela, adres działalności, kody PKD, status oraz daty cyklu życia. Wymagany co najmniej jeden identyfikator: `id` (UUID), `nip` lub `regon`. W rzadkich przypadkach kolizji NIP może zwrócić więcej niż jeden rekord. Każdy zwrócony rekord = 1 jednostka puli **Rejestr firm i osób**.



## OpenAPI

````yaml /openapi.json get /v1/ceidg/record
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/ceidg/record:
    get:
      tags:
        - CEIDG
      summary: Pobieranie rekordu
      description: >-
        Zwraca dane jednoosobowej działalności gospodarczej z Centralnej
        Ewidencji i Informacji o Działalności Gospodarczej — nazwa firmy, dane
        właściciela, adres działalności, kody PKD, status oraz daty cyklu życia.
        Wymagany co najmniej jeden identyfikator: `id` (UUID), `nip` lub
        `regon`. W rzadkich przypadkach kolizji NIP może zwrócić więcej niż
        jeden rekord. Każdy zwrócony rekord = 1 jednostka puli **Rejestr firm i
        osób**.
      operationId: ceidg-record
      parameters:
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Id
        - name: nip
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 10
                maxLength: 10
                pattern: ^\d{10}$
              - type: 'null'
            title: Nip
        - name: regon
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^\d{9}(\d{5})?$
              - type: 'null'
            title: Regon
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CeidgRecord'
                title: Response Ceidg-Record
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CeidgRecord:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        identifiers:
          $ref: '#/components/schemas/Identifiers'
        name:
          type: string
          title: Name
        name_normalized:
          anyOf:
            - type: string
            - type: 'null'
          title: Name Normalized
        owner_first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner First Name
        owner_last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Last Name
        owner_name_normalized:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Name Normalized
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        www:
          anyOf:
            - type: string
            - type: 'null'
          title: Www
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        wojewodztwo:
          anyOf:
            - type: string
            - type: 'null'
          title: Wojewodztwo
        powiat:
          anyOf:
            - type: string
            - type: 'null'
          title: Powiat
        gmina:
          anyOf:
            - type: string
            - type: 'null'
          title: Gmina
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
        building:
          anyOf:
            - type: string
            - type: 'null'
          title: Building
        premises:
          anyOf:
            - type: string
            - type: 'null'
          title: Premises
        pkd_main:
          anyOf:
            - $ref: '#/components/schemas/PkdCode'
            - type: 'null'
        pkd_other:
          anyOf:
            - items:
                $ref: '#/components/schemas/PkdCode'
              type: array
            - type: 'null'
          title: Pkd Other
        pkd_year:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pkd Year
        started_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Started At
        suspended_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Suspended At
        resumed_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Resumed At
        ended_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Ended At
        krz_records_count:
          type: integer
          title: Krz Records Count
          default: 0
      type: object
      required:
        - id
        - identifiers
        - name
      title: CeidgRecord
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Identifiers:
      properties:
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
        regon:
          anyOf:
            - type: string
            - type: 'null'
          title: Regon
        registry_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Registry Type
      type: object
      title: Identifiers
    PkdCode:
      properties:
        code:
          type: string
          title: Code
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      required:
        - code
      title: PkdCode
    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

````