{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sgpdirectory-com/json-schema/sgpdirectory-com-entity-financials-schema.json",
  "title": "EntityFinancials",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/sgpdirectory-com-api-openapi.json#/components/schemas/EntityFinancials",
  "type": "object",
  "properties": {
    "highlights": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fye_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Financial year-end date (YYYY-MM-DD)"
          },
          "revenue": {
            "type": "number",
            "description": "Total revenue for the period (in currency units)"
          },
          "profit_before_tax": {
            "type": "number",
            "description": "Profit before tax (in currency units)"
          },
          "profit_after_tax": {
            "type": "number",
            "description": "Profit after tax (in currency units)"
          },
          "total_assets": {
            "type": "number",
            "description": "Total assets (in currency units)"
          },
          "total_liabilities": {
            "type": "number",
            "description": "Total liabilities (in currency units)"
          },
          "total_equity": {
            "type": "number",
            "description": "Total equity / net assets (in currency units)"
          },
          "cash_and_equivalents": {
            "type": "number",
            "description": "Cash and cash equivalents (in currency units)"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code (e.g., SGD)"
          }
        },
        "required": [
          "fye_date"
        ],
        "additionalProperties": false
      },
      "description": "Annual financial highlights, ordered by financial year-end date descending"
    },
    "charges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "charge_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Date the charge was registered (YYYY-MM-DD)"
          },
          "charge_amount": {
            "type": "number",
            "description": "Amount secured by the charge (in currency units)"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code (e.g., SGD)"
          },
          "charge_status": {
            "type": "string",
            "description": "Status of the charge (e.g., Outstanding, Satisfied)"
          }
        },
        "additionalProperties": false
      },
      "description": "Registered charges and mortgages against the entity"
    }
  },
  "required": [
    "highlights",
    "charges"
  ],
  "additionalProperties": false
}