{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eckari-com/json-schema/eckari-com-company-uk-profile-output-schema.json",
  "title": "company_uk_profile_output",
  "description": "Contains public sector information licensed under the Open Government Licence v3.0 (Companies House).",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eckari-com-openapi.json#/components/schemas/company_uk_profile_output",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "company_number",
    "company_name",
    "status",
    "is_active",
    "is_striking_off",
    "type",
    "date_of_creation",
    "sic_codes",
    "registered_office_address",
    "registered_office_single_line",
    "previous_company_names",
    "resources"
  ],
  "properties": {
    "company_number": {
      "type": "string"
    },
    "company_name": {
      "type": "string"
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Companies House company_status (e.g. active, dissolved, liquidation, administration, receivership, voluntary-arrangement, registered, removed, closed, open). Null when the register publishes none for the record."
    },
    "status_detail": {
      "type": [
        "string",
        "null"
      ],
      "description": "Companies House company_status_detail where present (e.g. active-proposal-to-strike-off, transferred-from-uk, transformed-to-se, converted-to-plc)."
    },
    "is_active": {
      "type": "boolean",
      "description": "Derived by the same rule as company.uk.status, so the cheap check and the full profile can never disagree: true when status is one of active, open or registered — the three values the register uses for an entity still live on it. It is a liveness flag, not a good-standing flag, and it is false when the register publishes no status for the record."
    },
    "is_striking_off": {
      "type": "boolean",
      "description": "Derived; true when status_detail is exactly active-proposal-to-strike-off (the registrar has published a proposal to strike the company off the register). Same rule as company.uk.status."
    },
    "type": {
      "type": "string",
      "description": "Companies House company type (e.g. ltd, plc, llp)."
    },
    "subtype": {
      "type": [
        "string",
        "null"
      ]
    },
    "jurisdiction": {
      "type": [
        "string",
        "null"
      ]
    },
    "date_of_creation": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "date_of_cessation": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "can_file": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "undeliverable_registered_office_address": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "registered_office_is_in_dispute": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "sic_codes": {
      "type": "array",
      "description": "The register's SIC codes for the company, each decoded against the condensed UK SIC 2007 list Companies House publishes (config/data/uk-sic-2007.json, 731 codes). Empty when the register holds none.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "description"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Register SIC code exactly as published (five digits for SIC 2007; historic records can still carry a four-digit SIC 2003 code)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Official Companies House text for the code. Null — never a guess, and never text borrowed from another classification — when the code is not in the UK SIC 2007 condensed list, which in practice means a legacy SIC 2003 code on a historic record."
          }
        }
      }
    },
    "registered_office_address": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "care_of": {
          "type": [
            "string",
            "null"
          ]
        },
        "premises": {
          "type": [
            "string",
            "null"
          ]
        },
        "address_line_1": {
          "type": [
            "string",
            "null"
          ]
        },
        "address_line_2": {
          "type": [
            "string",
            "null"
          ]
        },
        "po_box": {
          "type": [
            "string",
            "null"
          ]
        },
        "locality": {
          "type": [
            "string",
            "null"
          ]
        },
        "region": {
          "type": [
            "string",
            "null"
          ]
        },
        "postal_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "registered_office_single_line": {
      "type": "string",
      "description": "Derived; the registered office rendered on one line by the same deterministic renderer company.uk.registered_office uses, so the two capabilities always agree. Format: the non-empty parts joined with \", \" in the order premises + address_line_1 (themselves joined by a space), address_line_2, locality, region, postal_code, country. Empty string when the register holds no address. It is a normalised rendering and is not byte-comparable with the register's own address_snippet in company.uk.search, which places country before the postcode."
    },
    "previous_company_names": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "effective_from",
          "ceased_on"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "effective_from": {
            "type": "string",
            "format": "date"
          },
          "ceased_on": {
            "type": "string",
            "format": "date"
          }
        }
      }
    },
    "confirmation_statement": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "last_made_up_to": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "next_due": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "next_made_up_to": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "is_overdue": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "The register's own overdue flag for the next confirmation statement."
        }
      }
    },
    "accounts": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "accounting_reference_date": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": false,
          "properties": {
            "day": {
              "type": [
                "integer",
                "null"
              ]
            },
            "month": {
              "type": [
                "integer",
                "null"
              ]
            }
          }
        },
        "last_accounts": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": false,
          "properties": {
            "type": {
              "type": [
                "string",
                "null"
              ]
            },
            "period_start_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "period_end_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "made_up_to": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            }
          }
        },
        "next_accounts": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": false,
          "properties": {
            "period_start_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "period_end_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "due_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "is_overdue": {
              "type": [
                "boolean",
                "null"
              ],
              "description": "The register's own overdue flag for the next accounts filing."
            }
          }
        }
      }
    },
    "resources": {
      "type": "object",
      "description": "Which related registers exist for this company (derived from the register's resource links). Use it to decide which further capability is worth calling. This block is also the deliberate replacement for the register's three deprecated profile booleans: has_charges (→ resources.charges, and company.uk.charges for the detail), has_insolvency_history and has_been_liquidated (→ resources.insolvency). Companies House marks all three deprecated and directs consumers to the links these flags are derived from, so Eckari does not surface them (ADR-004); their absence is a decision, not an omission.",
      "additionalProperties": false,
      "required": [
        "officers",
        "persons_with_significant_control",
        "persons_with_significant_control_statements",
        "persons_with_significant_control_exemptions",
        "filing_history",
        "charges",
        "insolvency"
      ],
      "properties": {
        "officers": {
          "type": "boolean"
        },
        "persons_with_significant_control": {
          "type": "boolean",
          "description": "True when the register exposes any ownership resource for this company — the PSC list, the PSC statements collection or the PSC exemptions collection. company.uk.owners answers all three, and an exempt listed company such as TESCO PLC has no PSC list but does have an exemption, so a flag derived from the PSC list alone would route an agent away from the answer."
        },
        "persons_with_significant_control_statements": {
          "type": "boolean",
          "description": "True when the register exposes the PSC statements collection — the company's own filed explanation of why a PSC entry is absent."
        },
        "persons_with_significant_control_exemptions": {
          "type": "boolean",
          "description": "True when the register exposes the PSC exemptions collection — where a listed company's exemption from the PSC regime is recorded."
        },
        "filing_history": {
          "type": "boolean"
        },
        "charges": {
          "type": "boolean",
          "description": "True when the register exposes a charges resource for this company — the live replacement for the register's deprecated has_charges flag. Read the charges themselves with company.uk.charges."
        },
        "insolvency": {
          "type": "boolean",
          "description": "True when the register exposes an insolvency resource for this company — the live replacement for the register's deprecated has_insolvency_history and has_been_liquidated flags. Eckari does not yet publish the insolvency detail itself (ADR-004)."
        }
      }
    }
  }
}