{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dane-biznes-gov-pl/json-schema/dane-biznes-gov-pl-firmy-response-schema.json",
  "title": "FirmyResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dane-biznes-gov-pl-openapi.yml#/components/schemas/FirmyResponse",
  "type": "object",
  "properties": {
    "firmy": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FirmaCeidg"
      }
    },
    "count": {
      "type": "integer",
      "format": "int32"
    },
    "links": {
      "allOf": [
        {
          "$ref": "#/$defs/Nawigacja"
        }
      ]
    },
    "properties": {
      "allOf": [
        {
          "$ref": "#/$defs/Metadata"
        }
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Adres": {
      "type": "object",
      "properties": {
        "ulica": {
          "type": "string"
        },
        "budynek": {
          "type": "string"
        },
        "lokal": {
          "type": "string"
        },
        "miasto": {
          "type": "string"
        },
        "wojewodztwo": {
          "type": "string"
        },
        "powiat": {
          "type": "string"
        },
        "gmina": {
          "type": "string"
        },
        "kraj": {
          "type": "string"
        },
        "kod": {
          "type": "string"
        },
        "skrytkaPocztowa": {
          "type": "string"
        },
        "opisNietypowegoMiejsca": {
          "type": "string"
        },
        "adresat": {
          "type": "string"
        },
        "terc": {
          "type": "string"
        },
        "simc": {
          "type": "string"
        },
        "ulic": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "FirmaCeidg": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "nazwa": {
          "type": "string"
        },
        "adresDzialalnosci": {
          "allOf": [
            {
              "$ref": "#/$defs/Adres"
            }
          ]
        },
        "adresyDzialalnosciDodatkowe": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Adres"
          }
        },
        "adresKorespondencyjny": {
          "allOf": [
            {
              "$ref": "#/$defs/Adres"
            }
          ]
        },
        "wlasciciel": {
          "allOf": [
            {
              "$ref": "#/$defs/Osoba"
            }
          ]
        },
        "obywatelstwa": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Obywatelstwo"
          }
        },
        "rokPkd": {
          "type": "string"
        },
        "pkd": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PkdSzczegoly"
          }
        },
        "pkdGlowny": {
          "allOf": [
            {
              "$ref": "#/$defs/PkdSzczegoly"
            }
          ]
        },
        "spolki": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Spolka"
          }
        },
        "dataRozpoczecia": {
          "type": "string",
          "format": "date"
        },
        "dataZawieszenia": {
          "type": "string",
          "format": "date"
        },
        "dataZakonczenia": {
          "type": "string",
          "format": "date"
        },
        "dataWykreslenia": {
          "type": "string",
          "format": "date"
        },
        "dataWznowienia": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/Status"
            }
          ]
        },
        "numerStatusu": {
          "type": "integer",
          "format": "int32"
        },
        "telefon": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "www": {
          "type": "string"
        },
        "adresDoreczenElektronicznych": {
          "type": "string"
        },
        "innaFormaKonaktu": {
          "type": "string"
        },
        "wspolnoscMajatkowa": {
          "type": "integer",
          "format": "int32"
        },
        "wspolnoscMajatkowaDataUstania": {
          "type": "string",
          "format": "date"
        },
        "dataZgonu": {
          "type": "string",
          "format": "date"
        },
        "zarzadSukcesyjnyDataUstanowienia": {
          "type": "string",
          "format": "date"
        },
        "zarzadSukcesyjnyDataWygasniecia": {
          "type": "string",
          "format": "date"
        },
        "podstawyPrawneWykreslenia": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "zakazy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Zakaz"
          }
        },
        "upadlosci": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Upadlosc"
          }
        },
        "zarzadcaSukcesyjny": {
          "allOf": [
            {
              "$ref": "#/$defs/Sukcesja"
            }
          ]
        },
        "kwalifikacjeZawodowe": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KwalifikacjaZawodowa"
          }
        },
        "uprawnienia": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Uprawnienie"
          }
        },
        "ograniczenia": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Ograniczenie"
          }
        },
        "ograniczeniaZdolnosciPrawnej": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Kurator"
          }
        },
        "link": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Kurator": {
      "type": "object",
      "properties": {
        "ustanowienieKuratora": {
          "type": "string",
          "format": "date"
        },
        "trybRestrykcji": {
          "type": "string"
        },
        "dataRestrykcji": {
          "type": "string",
          "format": "date"
        },
        "wprowadzonePrzez": {
          "type": "string"
        },
        "imie": {
          "type": "string"
        },
        "nazwisko": {
          "type": "string"
        },
        "nip": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "KwalifikacjaZawodowa": {
      "type": "object",
      "properties": {
        "dataEgzaminu": {
          "type": "string",
          "format": "date"
        },
        "dataUniewaznienia": {
          "type": "string",
          "format": "date"
        },
        "rodzajKwalifikacji": {
          "type": "integer",
          "format": "int32"
        },
        "zawod": {
          "type": "string"
        },
        "wydanyPrzez": {
          "type": "string"
        },
        "symbolZawodu": {
          "type": "string"
        },
        "wprowadzonyPrzez": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Metadata": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "rights": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "datePublished": {
          "type": "string",
          "format": "date-time"
        },
        "dateModified": {
          "type": "string",
          "format": "date-time"
        },
        "expires": {
          "type": "string",
          "format": "date-time"
        },
        "keywords": {
          "type": "string"
        },
        "temporalCoverage": {
          "type": "string"
        },
        "contentType": {
          "type": "string"
        },
        "isPartOf": {
          "type": "string"
        },
        "updateFrequency": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Nawigacja": {
      "type": "object",
      "properties": {
        "next": {
          "type": "string"
        },
        "prev": {
          "type": "string"
        },
        "self": {
          "type": "string"
        },
        "first": {
          "type": "string"
        },
        "last": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Obywatelstwo": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string"
        },
        "kraj": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Ograniczenie": {
      "type": "object",
      "properties": {
        "dataOd": {
          "type": "string",
          "format": "date"
        },
        "dataDo": {
          "type": "string",
          "format": "date"
        },
        "nazwa": {
          "type": "string"
        },
        "opis": {
          "type": "string"
        },
        "wprowadzonePrzez": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Osoba": {
      "type": "object",
      "properties": {
        "imie": {
          "type": "string"
        },
        "nazwisko": {
          "type": "string"
        },
        "nip": {
          "type": "string"
        },
        "nipUchylony": {
          "type": "boolean"
        },
        "nipUniewaznienie": {
          "type": "boolean"
        },
        "regon": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "PkdSzczegoly": {
      "type": "object",
      "properties": {
        "kod": {
          "type": "string"
        },
        "nazwa": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Spolka": {
      "type": "object",
      "properties": {
        "nip": {
          "type": "string"
        },
        "regon": {
          "type": "string"
        },
        "dataZawieszenia": {
          "type": "string",
          "format": "date"
        }
      },
      "additionalProperties": false
    },
    "Status": {
      "enum": [
        "AKTYWNY",
        "WYKRESLONY",
        "ZAWIESZONY",
        "OCZEKUJE_NA_ROZPOCZECIE_DZIALANOSCI",
        "WYLACZNIE_W_FORMIE_SPOLKI"
      ],
      "type": "string",
      "format": "int32"
    },
    "Sukcesja": {
      "type": "object",
      "properties": {
        "dataUstanowienia": {
          "type": "string",
          "format": "date"
        },
        "imie": {
          "type": "string"
        },
        "nazwisko": {
          "type": "string"
        },
        "nip": {
          "type": "string"
        },
        "obywatelstwa": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Obywatelstwo"
          }
        },
        "adresKorespondencyjny": {
          "allOf": [
            {
              "$ref": "#/$defs/Adres"
            }
          ]
        },
        "email": {
          "type": "string"
        },
        "www": {
          "type": "string"
        },
        "telefon": {
          "type": "string"
        },
        "adresDoreczenElektronicznych": {
          "type": "string"
        },
        "innaFormaKonaktu": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Upadlosc": {
      "type": "object",
      "properties": {
        "rodzajInformacji": {
          "type": "string"
        },
        "dataOrzeczenia": {
          "type": "string",
          "format": "date"
        },
        "imie": {
          "type": "string"
        },
        "naziwsko": {
          "type": "string"
        },
        "nip": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Uprawnienie": {
      "type": "object",
      "properties": {
        "dataOd": {
          "type": "string",
          "format": "date"
        },
        "dataDo": {
          "type": "string",
          "format": "date"
        },
        "nazwa": {
          "type": "string"
        },
        "opis": {
          "type": "string"
        },
        "wprowadzonePrzez": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Zakaz": {
      "type": "object",
      "properties": {
        "typ": {
          "type": "string"
        },
        "opis": {
          "type": "string"
        },
        "okres": {
          "type": "string"
        },
        "dataWydania": {
          "type": "string",
          "format": "date"
        },
        "dataUprawomocnienia": {
          "type": "string",
          "format": "date"
        }
      },
      "additionalProperties": false
    }
  }
}