{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ppwrly.eu/legal/data-export-register/company-export-1.0.schema.json",
  "title": "ppwrly.company-export 1.0",
  "type": "object",
  "properties": {
    "format": {
      "type": "string",
      "description": "Format identifier: “ppwrly.company-export”.",
      "x-description-pl": "Identyfikator formatu: „ppwrly.company-export”.",
      "x-since": "1.0",
      "const": "ppwrly.company-export"
    },
    "formatVersion": {
      "type": "string",
      "description": "Format version MAJOR.MINOR — the same as in the register.",
      "x-description-pl": "Wersja formatu MAJOR.MINOR — ta sama co w rejestrze.",
      "x-since": "1.0",
      "const": "1.0"
    },
    "exportedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Time of the data snapshot (volatile field).",
      "x-description-pl": "Chwila migawki danych (pole zmienne).",
      "x-since": "1.0"
    },
    "registerUrl": {
      "type": "string",
      "description": "Address of the register of export formats and procedures.",
      "x-description-pl": "Adres rejestru formatów i procedur eksportu.",
      "x-since": "1.0"
    },
    "company": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Row identifier.",
          "x-description-pl": "Identyfikator wiersza.",
          "x-since": "1.0"
        },
        "name": {
          "type": "string",
          "description": "Company name.",
          "x-description-pl": "Nazwa firmy.",
          "x-since": "1.0"
        },
        "taxId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Tax identification number (VAT ID).",
          "x-description-pl": "Numer identyfikacji podatkowej (NIP / VAT).",
          "x-since": "1.0"
        },
        "address": {
          "type": [
            "string",
            "null"
          ],
          "description": "Address — street and number.",
          "x-description-pl": "Adres — ulica i numer.",
          "x-since": "1.0"
        },
        "address2": {
          "type": [
            "string",
            "null"
          ],
          "description": "Address — second line.",
          "x-description-pl": "Adres — druga linia.",
          "x-since": "1.0"
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "description": "City.",
          "x-description-pl": "Miejscowość.",
          "x-since": "1.0"
        },
        "postalCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "Postal code.",
          "x-description-pl": "Kod pocztowy.",
          "x-since": "1.0"
        },
        "country": {
          "type": [
            "string",
            "null"
          ],
          "description": "Country of registered office (ISO 3166-1 alpha-2 code).",
          "x-description-pl": "Kraj siedziby (kod ISO 3166-1 alfa-2).",
          "x-since": "1.0"
        },
        "industry": {
          "type": [
            "string",
            "null"
          ],
          "description": "Industry.",
          "x-description-pl": "Branża.",
          "x-since": "1.0"
        },
        "companySize": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company size.",
          "x-description-pl": "Wielkość firmy.",
          "x-since": "1.0"
        },
        "website": {
          "type": [
            "string",
            "null"
          ],
          "description": "Website.",
          "x-description-pl": "Strona internetowa.",
          "x-since": "1.0"
        },
        "subscriptionPlan": {
          "type": "string",
          "description": "ppwrly service plan.",
          "x-description-pl": "Plan usługi ppwrly.",
          "x-since": "1.0"
        },
        "subscriptionExpires": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "End of the current plan period.",
          "x-description-pl": "Koniec bieżącego okresu planu.",
          "x-since": "1.0"
        },
        "pendingTier": {
          "type": [
            "string",
            "null"
          ],
          "description": "Plan scheduled from the next period.",
          "x-description-pl": "Plan zaplanowany od następnego okresu.",
          "x-since": "1.0"
        },
        "pendingTierEffectiveAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Time of the scheduled plan change.",
          "x-description-pl": "Chwila zmiany na plan zaplanowany.",
          "x-since": "1.0"
        },
        "trialEndsAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "End of the trial period.",
          "x-description-pl": "Koniec okresu próbnego.",
          "x-since": "1.0"
        },
        "onboardingCompleted": {
          "type": "boolean",
          "description": "Whether company onboarding was completed.",
          "x-description-pl": "Czy ukończono konfigurację firmy.",
          "x-since": "1.0"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "Creation time.",
          "x-description-pl": "Chwila utworzenia.",
          "x-since": "1.0"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Last update time.",
          "x-description-pl": "Chwila ostatniej zmiany.",
          "x-since": "1.0"
        },
        "countries": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "countryCode": {
                "type": "string",
                "description": "Market country of the company (ISO 3166-1 alpha-2).",
                "x-description-pl": "Kraj rynku firmy (kod ISO 3166-1 alfa-2).",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              }
            },
            "required": [
              "id",
              "companyId",
              "countryCode",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "products": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "sku": {
                "type": "string",
                "description": "Company product code (SKU).",
                "x-description-pl": "Kod produktu nadany przez firmę (SKU).",
                "x-since": "1.0"
              },
              "name": {
                "type": "string",
                "description": "Product name.",
                "x-description-pl": "Nazwa produktu.",
                "x-since": "1.0"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Product description.",
                "x-description-pl": "Opis produktu.",
                "x-since": "1.0"
              },
              "category": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Product category.",
                "x-description-pl": "Kategoria produktu.",
                "x-since": "1.0"
              },
              "eanGtin": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "EAN / GTIN code.",
                "x-description-pl": "Kod EAN / GTIN.",
                "x-since": "1.0"
              },
              "isActive": {
                "type": "boolean",
                "description": "Whether the product is active (not archived).",
                "x-description-pl": "Czy produkt jest aktywny (niezarchiwizowany).",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "Last update time.",
                "x-description-pl": "Chwila ostatniej zmiany.",
                "x-since": "1.0"
              },
              "productCountries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Row identifier.",
                      "x-description-pl": "Identyfikator wiersza.",
                      "x-since": "1.0"
                    },
                    "productId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Product identifier.",
                      "x-description-pl": "Identyfikator produktu.",
                      "x-since": "1.0"
                    },
                    "countryCode": {
                      "type": "string",
                      "description": "Country where the product is sold (ISO 3166-1 alpha-2).",
                      "x-description-pl": "Kraj sprzedaży produktu (ISO 3166-1 alfa-2).",
                      "x-since": "1.0"
                    },
                    "annualUnits": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Annual number of units placed on the market.",
                      "x-description-pl": "Roczna liczba sztuk wprowadzanych na rynek.",
                      "x-since": "1.0"
                    }
                  },
                  "required": [
                    "id",
                    "productId",
                    "countryCode",
                    "annualUnits"
                  ],
                  "additionalProperties": false
                }
              },
              "packagingComponents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Row identifier.",
                      "x-description-pl": "Identyfikator wiersza.",
                      "x-since": "1.0"
                    },
                    "productId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Product identifier.",
                      "x-description-pl": "Identyfikator produktu.",
                      "x-since": "1.0"
                    },
                    "name": {
                      "type": "string",
                      "description": "Packaging component name.",
                      "x-description-pl": "Nazwa elementu opakowania.",
                      "x-since": "1.0"
                    },
                    "packagingType": {
                      "type": "string",
                      "description": "Packaging type (e.g. primary, grouped).",
                      "x-description-pl": "Rodzaj opakowania (np. podstawowe, zbiorcze).",
                      "x-since": "1.0"
                    },
                    "materialType": {
                      "type": "string",
                      "description": "Material (ppwrly dictionary code).",
                      "x-description-pl": "Materiał (kod słownika ppwrly).",
                      "x-since": "1.0"
                    },
                    "materialSubtype": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Material subtype.",
                      "x-description-pl": "Podrodzaj materiału.",
                      "x-since": "1.0"
                    },
                    "weightGrams": {
                      "type": "string",
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "Component weight in grams.",
                      "x-description-pl": "Masa elementu w gramach.",
                      "x-since": "1.0"
                    },
                    "recycledContentPct": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "Recycled content in percent.",
                      "x-description-pl": "Zawartość recyklatu w procentach.",
                      "x-since": "1.0"
                    },
                    "recycledContentSource": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Source of the recycled content information.",
                      "x-description-pl": "Źródło informacji o recyklacie.",
                      "x-since": "1.0"
                    },
                    "recyclabilityGrade": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Recyclability grade.",
                      "x-description-pl": "Ocena przydatności do recyklingu.",
                      "x-since": "1.0"
                    },
                    "isReusable": {
                      "type": "boolean",
                      "description": "Whether the component is reusable.",
                      "x-description-pl": "Czy element jest wielokrotnego użytku.",
                      "x-since": "1.0"
                    },
                    "emptySpacePct": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "description": "Empty space in percent.",
                      "x-description-pl": "Pusta przestrzeń w procentach.",
                      "x-since": "1.0"
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Company notes.",
                      "x-description-pl": "Notatki firmy.",
                      "x-since": "1.0"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation time.",
                      "x-description-pl": "Chwila utworzenia.",
                      "x-since": "1.0"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Last update time.",
                      "x-description-pl": "Chwila ostatniej zmiany.",
                      "x-since": "1.0"
                    }
                  },
                  "required": [
                    "id",
                    "productId",
                    "name",
                    "packagingType",
                    "materialType",
                    "materialSubtype",
                    "weightGrams",
                    "recycledContentPct",
                    "recycledContentSource",
                    "recyclabilityGrade",
                    "isReusable",
                    "emptySpacePct",
                    "notes",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              },
              "publicationVersions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Row identifier.",
                      "x-description-pl": "Identyfikator wiersza.",
                      "x-since": "1.0"
                    },
                    "productId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Product identifier.",
                      "x-description-pl": "Identyfikator produktu.",
                      "x-since": "1.0"
                    },
                    "version": {
                      "type": "integer",
                      "description": "Public card version number.",
                      "x-description-pl": "Numer wersji karty publicznej.",
                      "x-since": "1.0"
                    },
                    "publicToken": {
                      "type": "string",
                      "description": "Part of the public card address printed in the QR code.",
                      "x-description-pl": "Część adresu karty publicznej z kodu QR.",
                      "x-since": "1.0"
                    },
                    "snapshot": {
                      "type": [
                        "object",
                        "array"
                      ],
                      "description": "Snapshot of the data published on the card.",
                      "x-description-pl": "Migawka danych opublikowanych na karcie.",
                      "x-since": "1.0"
                    },
                    "projectionFingerprint": {
                      "type": "string",
                      "description": "Fingerprint of the version data (compared with the preview).",
                      "x-description-pl": "Skrót danych wersji (porównanie z podglądem).",
                      "x-since": "1.0"
                    },
                    "publishedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Publication time.",
                      "x-description-pl": "Chwila publikacji.",
                      "x-since": "1.0"
                    },
                    "publishedBy": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Account that published the version.",
                      "x-description-pl": "Konto, które opublikowało wersję.",
                      "x-since": "1.0"
                    },
                    "withdrawnAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the version was withdrawn.",
                      "x-description-pl": "Chwila wycofania wersji.",
                      "x-since": "1.0"
                    },
                    "withdrawnBy": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Account that withdrew the version.",
                      "x-description-pl": "Konto, które wycofało wersję.",
                      "x-since": "1.0"
                    },
                    "artifacts": {
                      "type": "object",
                      "properties": {
                        "publicUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Public card address (active version only).",
                          "x-description-pl": "Adres karty publicznej (tylko wersja aktywna).",
                          "x-since": "1.0"
                        },
                        "qrCodePath": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "API route of the QR code image (active version only).",
                          "x-description-pl": "Trasa obrazu kodu QR w API (tylko wersja aktywna).",
                          "x-since": "1.0"
                        }
                      },
                      "required": [
                        "publicUrl",
                        "qrCodePath"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "productId",
                    "version",
                    "publicToken",
                    "snapshot",
                    "projectionFingerprint",
                    "publishedAt",
                    "publishedBy",
                    "withdrawnAt",
                    "withdrawnBy",
                    "artifacts"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "companyId",
              "sku",
              "name",
              "description",
              "category",
              "eanGtin",
              "isActive",
              "createdAt",
              "updatedAt",
              "productCountries",
              "packagingComponents",
              "publicationVersions"
            ],
            "additionalProperties": false
          }
        },
        "ppwrDeclarations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "productId": {
                "type": "string",
                "format": "uuid",
                "description": "Product identifier.",
                "x-description-pl": "Identyfikator produktu.",
                "x-since": "1.0"
              },
              "version": {
                "type": "integer",
                "description": "Declaration version number.",
                "x-description-pl": "Numer wersji deklaracji.",
                "x-since": "1.0"
              },
              "status": {
                "type": "string",
                "description": "Declaration status.",
                "x-description-pl": "Stan deklaracji.",
                "x-since": "1.0"
              },
              "producerName": {
                "type": "string",
                "description": "Producer name in the declaration.",
                "x-description-pl": "Nazwa producenta w deklaracji.",
                "x-since": "1.0"
              },
              "producerAddress": {
                "type": "string",
                "description": "Producer address in the declaration.",
                "x-description-pl": "Adres producenta w deklaracji.",
                "x-since": "1.0"
              },
              "packagingDescription": {
                "type": "string",
                "description": "Packaging description.",
                "x-description-pl": "Opis opakowania.",
                "x-since": "1.0"
              },
              "materialComposition": {
                "type": "string",
                "description": "Material composition.",
                "x-description-pl": "Skład materiałowy.",
                "x-since": "1.0"
              },
              "recycledContentInfo": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Recycled content information.",
                "x-description-pl": "Informacja o recyklacie.",
                "x-since": "1.0"
              },
              "recyclabilityGrade": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Recyclability grade.",
                "x-description-pl": "Ocena przydatności do recyklingu.",
                "x-since": "1.0"
              },
              "standardsReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Standards and references.",
                "x-description-pl": "Normy i odniesienia.",
                "x-since": "1.0"
              },
              "complianceStatement": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Producer statement.",
                "x-description-pl": "Oświadczenie producenta.",
                "x-since": "1.0"
              },
              "snapshotJson": {
                "type": [
                  "object",
                  "array",
                  "null"
                ],
                "description": "Snapshot of the data the declaration and its PDF are built from.",
                "x-description-pl": "Migawka danych, z których powstaje deklaracja i jej PDF.",
                "x-since": "1.0"
              },
              "missingItems": {
                "type": [
                  "object",
                  "array",
                  "null"
                ],
                "description": "List of missing data at creation time.",
                "x-description-pl": "Lista brakujących danych w chwili utworzenia.",
                "x-since": "1.0"
              },
              "publicToken": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Former public declaration page key (historical data).",
                "x-description-pl": "Dawny klucz publicznej strony deklaracji (dana historyczna).",
                "x-since": "1.0"
              },
              "signedBy": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Signatory.",
                "x-description-pl": "Osoba podpisująca.",
                "x-since": "1.0"
              },
              "signedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Signature time.",
                "x-description-pl": "Chwila podpisu.",
                "x-since": "1.0"
              },
              "pdfUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Former PDF file address (historical data).",
                "x-description-pl": "Dawny adres pliku PDF (dana historyczna).",
                "x-since": "1.0"
              },
              "qrCodeData": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Former declaration QR code content (historical data).",
                "x-description-pl": "Dawna treść kodu QR deklaracji (dana historyczna).",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "Last update time.",
                "x-description-pl": "Chwila ostatniej zmiany.",
                "x-since": "1.0"
              },
              "artifacts": {
                "type": "object",
                "properties": {
                  "pdfPath": {
                    "type": "string",
                    "description": "API route that renders the declaration PDF on demand.",
                    "x-description-pl": "Trasa API, która tworzy PDF deklaracji na żądanie.",
                    "x-since": "1.0"
                  }
                },
                "required": [
                  "pdfPath"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "companyId",
              "productId",
              "version",
              "status",
              "producerName",
              "producerAddress",
              "packagingDescription",
              "materialComposition",
              "recycledContentInfo",
              "recyclabilityGrade",
              "standardsReference",
              "complianceStatement",
              "snapshotJson",
              "missingItems",
              "publicToken",
              "signedBy",
              "signedAt",
              "pdfUrl",
              "qrCodeData",
              "createdAt",
              "updatedAt",
              "artifacts"
            ],
            "additionalProperties": false
          }
        },
        "eprRegistrations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "countryCode": {
                "type": "string",
                "description": "EPR registration country.",
                "x-description-pl": "Kraj rejestracji ROP/EPR.",
                "x-since": "1.0"
              },
              "proName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Producer responsibility organisation.",
                "x-description-pl": "Organizacja odzysku.",
                "x-since": "1.0"
              },
              "registrationNumber": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Registration number.",
                "x-description-pl": "Numer rejestrowy.",
                "x-since": "1.0"
              },
              "registrationDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Registration date.",
                "x-description-pl": "Data rejestracji.",
                "x-since": "1.0"
              },
              "expiryDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Expiry date.",
                "x-description-pl": "Data wygaśnięcia.",
                "x-since": "1.0"
              },
              "status": {
                "type": "string",
                "description": "Registration status.",
                "x-description-pl": "Stan rejestracji.",
                "x-since": "1.0"
              },
              "contractReference": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Contract reference with the PRO.",
                "x-description-pl": "Numer umowy z organizacją odzysku.",
                "x-since": "1.0"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Company notes.",
                "x-description-pl": "Notatki firmy.",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "Last update time.",
                "x-description-pl": "Chwila ostatniej zmiany.",
                "x-since": "1.0"
              }
            },
            "required": [
              "id",
              "companyId",
              "countryCode",
              "proName",
              "registrationNumber",
              "registrationDate",
              "expiryDate",
              "status",
              "contractReference",
              "notes",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "eprDeclarations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "countryCode": {
                "type": "string",
                "description": "EPR declaration country.",
                "x-description-pl": "Kraj deklaracji ROP/EPR.",
                "x-since": "1.0"
              },
              "periodType": {
                "type": "string",
                "description": "Reporting period type.",
                "x-description-pl": "Rodzaj okresu sprawozdawczego.",
                "x-since": "1.0"
              },
              "periodStart": {
                "type": "string",
                "format": "date",
                "description": "Period start.",
                "x-description-pl": "Początek okresu.",
                "x-since": "1.0"
              },
              "periodEnd": {
                "type": "string",
                "format": "date",
                "description": "Period end.",
                "x-description-pl": "Koniec okresu.",
                "x-since": "1.0"
              },
              "status": {
                "type": "string",
                "description": "Declaration status.",
                "x-description-pl": "Stan deklaracji.",
                "x-since": "1.0"
              },
              "totalWeightKg": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^-?\\d+(\\.\\d+)?$",
                "description": "Total weight in kilograms.",
                "x-description-pl": "Łączna masa w kilogramach.",
                "x-since": "1.0"
              },
              "totalFeeEur": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^-?\\d+(\\.\\d+)?$",
                "description": "Total fee in euro (estimate).",
                "x-description-pl": "Łączna opłata w euro (szacunek).",
                "x-since": "1.0"
              },
              "submittedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Submission time.",
                "x-description-pl": "Chwila złożenia.",
                "x-since": "1.0"
              },
              "dataJson": {
                "type": [
                  "object",
                  "array",
                  "null"
                ],
                "description": "Declaration data.",
                "x-description-pl": "Dane deklaracji.",
                "x-since": "1.0"
              },
              "pdfUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Declaration PDF address.",
                "x-description-pl": "Adres pliku PDF deklaracji.",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "Last update time.",
                "x-description-pl": "Chwila ostatniej zmiany.",
                "x-since": "1.0"
              }
            },
            "required": [
              "id",
              "companyId",
              "countryCode",
              "periodType",
              "periodStart",
              "periodEnd",
              "status",
              "totalWeightKg",
              "totalFeeEur",
              "submittedAt",
              "dataJson",
              "pdfUrl",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "complianceChecklists": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "regulation": {
                "type": "string",
                "description": "Checklist regulation (e.g. PPWR).",
                "x-description-pl": "Regulacja listy kontrolnej (np. PPWR).",
                "x-since": "1.0"
              },
              "overallProgress": {
                "type": "string",
                "pattern": "^-?\\d+(\\.\\d+)?$",
                "description": "Checklist progress in percent.",
                "x-description-pl": "Postęp listy w procentach.",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "Last update time.",
                "x-description-pl": "Chwila ostatniej zmiany.",
                "x-since": "1.0"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Row identifier.",
                      "x-description-pl": "Identyfikator wiersza.",
                      "x-since": "1.0"
                    },
                    "checklistId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Checklist identifier.",
                      "x-description-pl": "Identyfikator listy kontrolnej.",
                      "x-since": "1.0"
                    },
                    "stepNumber": {
                      "type": "integer",
                      "description": "Step number.",
                      "x-description-pl": "Numer kroku.",
                      "x-since": "1.0"
                    },
                    "titleKey": {
                      "type": "string",
                      "description": "Translation key of the step title.",
                      "x-description-pl": "Klucz tłumaczenia tytułu kroku.",
                      "x-since": "1.0"
                    },
                    "descriptionKey": {
                      "type": "string",
                      "description": "Translation key of the step description.",
                      "x-description-pl": "Klucz tłumaczenia opisu kroku.",
                      "x-since": "1.0"
                    },
                    "articleRef": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Legal reference.",
                      "x-description-pl": "Odniesienie do przepisu.",
                      "x-since": "1.0"
                    },
                    "deadline": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "description": "Step deadline.",
                      "x-description-pl": "Termin kroku.",
                      "x-since": "1.0"
                    },
                    "isCompleted": {
                      "type": "boolean",
                      "description": "Whether the step is completed.",
                      "x-description-pl": "Czy krok jest wykonany.",
                      "x-since": "1.0"
                    },
                    "completedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Completion time.",
                      "x-description-pl": "Chwila wykonania.",
                      "x-since": "1.0"
                    },
                    "completedBy": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Account that marked completion.",
                      "x-description-pl": "Konto, które oznaczyło wykonanie.",
                      "x-since": "1.0"
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Company notes.",
                      "x-description-pl": "Notatki firmy.",
                      "x-since": "1.0"
                    },
                    "countryCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Step country (for country steps).",
                      "x-description-pl": "Kraj kroku (dla kroków krajowych).",
                      "x-since": "1.0"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Creation time.",
                      "x-description-pl": "Chwila utworzenia.",
                      "x-since": "1.0"
                    }
                  },
                  "required": [
                    "id",
                    "checklistId",
                    "stepNumber",
                    "titleKey",
                    "descriptionKey",
                    "articleRef",
                    "deadline",
                    "isCompleted",
                    "completedAt",
                    "completedBy",
                    "notes",
                    "countryCode",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "companyId",
              "regulation",
              "overallProgress",
              "createdAt",
              "updatedAt",
              "items"
            ],
            "additionalProperties": false
          }
        },
        "billingHistory": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "billingTier": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Plan the payment relates to.",
                "x-description-pl": "Plan, którego dotyczy płatność.",
                "x-since": "1.0"
              },
              "amount": {
                "type": "string",
                "pattern": "^-?\\d+(\\.\\d+)?$",
                "description": "Amount.",
                "x-description-pl": "Kwota.",
                "x-since": "1.0"
              },
              "currency": {
                "type": "string",
                "description": "Currency.",
                "x-description-pl": "Waluta.",
                "x-since": "1.0"
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Payment status.",
                "x-description-pl": "Stan płatności.",
                "x-since": "1.0"
              },
              "periodStart": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Billing period start.",
                "x-description-pl": "Początek okresu rozliczeniowego.",
                "x-since": "1.0"
              },
              "periodEnd": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Billing period end.",
                "x-description-pl": "Koniec okresu rozliczeniowego.",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              }
            },
            "required": [
              "id",
              "companyId",
              "billingTier",
              "amount",
              "currency",
              "status",
              "periodStart",
              "periodEnd",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "members": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "userId": {
                "type": "string",
                "format": "uuid",
                "description": "Member account identifier.",
                "x-description-pl": "Identyfikator konta członka.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "role": {
                "type": "string",
                "description": "Role in the company (owner, admin, member).",
                "x-description-pl": "Rola w firmie (owner, admin, member).",
                "x-since": "1.0"
              },
              "invitedBy": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Inviting account.",
                "x-description-pl": "Konto zapraszające.",
                "x-since": "1.0"
              },
              "invitedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Invitation time.",
                "x-description-pl": "Chwila zaproszenia.",
                "x-since": "1.0"
              },
              "acceptedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Invitation acceptance time.",
                "x-description-pl": "Chwila przyjęcia zaproszenia.",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              },
              "email": {
                "type": "string",
                "description": "Member email address.",
                "x-description-pl": "Adres e-mail członka.",
                "x-since": "1.0"
              },
              "displayName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Member display name.",
                "x-description-pl": "Wyświetlana nazwa członka.",
                "x-since": "1.0"
              }
            },
            "required": [
              "id",
              "userId",
              "companyId",
              "role",
              "invitedBy",
              "invitedAt",
              "acceptedAt",
              "createdAt",
              "email",
              "displayName"
            ],
            "additionalProperties": false
          }
        },
        "invitations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "companyId": {
                "type": "string",
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "email": {
                "type": "string",
                "description": "Invited email address.",
                "x-description-pl": "Zapraszany adres e-mail.",
                "x-since": "1.0"
              },
              "role": {
                "type": "string",
                "description": "Role in the invitation.",
                "x-description-pl": "Rola z zaproszenia.",
                "x-since": "1.0"
              },
              "status": {
                "type": "string",
                "description": "Invitation status.",
                "x-description-pl": "Stan zaproszenia.",
                "x-since": "1.0"
              },
              "invitedBy": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Inviting account.",
                "x-description-pl": "Konto zapraszające.",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "description": "Invitation expiry.",
                "x-description-pl": "Termin ważności zaproszenia.",
                "x-since": "1.0"
              },
              "resolvedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Resolution time (accepted, declined, revoked).",
                "x-description-pl": "Chwila rozstrzygnięcia (przyjęcie, odrzucenie, odwołanie).",
                "x-since": "1.0"
              },
              "resolvedBy": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Account that resolved the invitation.",
                "x-description-pl": "Konto, które rozstrzygnęło zaproszenie.",
                "x-since": "1.0"
              }
            },
            "required": [
              "id",
              "companyId",
              "email",
              "role",
              "status",
              "invitedBy",
              "createdAt",
              "expiresAt",
              "resolvedAt",
              "resolvedBy"
            ],
            "additionalProperties": false
          }
        },
        "companyAuditLog": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Row identifier.",
                "x-description-pl": "Identyfikator wiersza.",
                "x-since": "1.0"
              },
              "userId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Acting account (empty after account deletion or for system events).",
                "x-description-pl": "Konto wykonujące (puste po usunięciu konta albo dla zdarzeń systemu).",
                "x-since": "1.0"
              },
              "companyId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Company identifier.",
                "x-description-pl": "Identyfikator firmy.",
                "x-since": "1.0"
              },
              "action": {
                "type": "string",
                "description": "Event type.",
                "x-description-pl": "Rodzaj zdarzenia.",
                "x-since": "1.0"
              },
              "entityType": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Event object type.",
                "x-description-pl": "Rodzaj obiektu zdarzenia.",
                "x-since": "1.0"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Event object identifier.",
                "x-description-pl": "Identyfikator obiektu zdarzenia.",
                "x-since": "1.0"
              },
              "details": {
                "type": [
                  "object",
                  "array",
                  "null"
                ],
                "description": "Event details (without IP addresses).",
                "x-description-pl": "Szczegóły zdarzenia (bez adresów IP).",
                "x-since": "1.0"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time.",
                "x-description-pl": "Chwila utworzenia.",
                "x-since": "1.0"
              }
            },
            "required": [
              "id",
              "userId",
              "companyId",
              "action",
              "entityType",
              "entityId",
              "details",
              "createdAt"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "name",
        "taxId",
        "address",
        "address2",
        "city",
        "postalCode",
        "country",
        "industry",
        "companySize",
        "website",
        "subscriptionPlan",
        "subscriptionExpires",
        "pendingTier",
        "pendingTierEffectiveAt",
        "trialEndsAt",
        "onboardingCompleted",
        "createdAt",
        "updatedAt",
        "countries",
        "products",
        "ppwrDeclarations",
        "eprRegistrations",
        "eprDeclarations",
        "complianceChecklists",
        "billingHistory",
        "members",
        "invitations",
        "companyAuditLog"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "format",
    "formatVersion",
    "exportedAt",
    "registerUrl",
    "company"
  ],
  "additionalProperties": false
}
