{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carboncuretechnologies/json-schema/carboncuretechnologies-corporation-sales-overview-schema.json",
  "title": "CorporationSalesOverview",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carboncuretechnologies-echo-api-openapi.yml#/components/schemas/CorporationSalesOverview",
  "type": "object",
  "properties": {
    "corporationId": {
      "type": "integer",
      "format": "int32"
    },
    "plantCount": {
      "type": "integer",
      "format": "int32"
    },
    "corporationName": {
      "type": [
        "string",
        "null"
      ]
    },
    "divisions": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/DivisionSalesOverview"
      }
    },
    "isVerticallyIntegrated": {
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CementSalesOverview": {
      "type": "object",
      "properties": {
        "cementId": {
          "type": "integer",
          "format": "int32"
        },
        "cementPlantName": {
          "type": [
            "string",
            "null"
          ]
        },
        "cementType": {
          "$ref": "#/$defs/MaterialType"
        },
        "cementName": {
          "type": [
            "string",
            "null"
          ]
        },
        "score": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        }
      },
      "additionalProperties": false
    },
    "DivisionCountry": {
      "type": "object",
      "properties": {
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "readOnly": true
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "readOnly": true
        }
      },
      "additionalProperties": false,
      "description": "Returns a list of countries grouped by division, where the division operates a plant in those countries."
    },
    "DivisionSalesOverview": {
      "type": "object",
      "properties": {
        "divisionName": {
          "type": [
            "string",
            "null"
          ]
        },
        "plants": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/PlantSalesOverview"
          }
        },
        "states": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/DivisionState"
          }
        },
        "countries": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/DivisionCountry"
          }
        }
      },
      "additionalProperties": false
    },
    "DivisionState": {
      "type": "object",
      "properties": {
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "readOnly": true
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "readOnly": true
        }
      },
      "additionalProperties": false,
      "description": "Returns a list of states grouped by division, where the division operates a plant in those states."
    },
    "MaterialType": {
      "enum": [
        "Cement",
        "CementTypeI",
        "CementTypeIS",
        "CementTypeIP",
        "CementTypeIL",
        "CementTypeII",
        "CementTypeI_II",
        "CementTypeI_IIMH",
        "CementTypeI_II_LA",
        "CementTypeIII",
        "CementTypeIV",
        "CementTypeII_V",
        "CementTypeN",
        "CementTypeS",
        "CementCemI",
        "CementCemII",
        "CementCemIII",
        "CementCemIV",
        "CementCemV",
        "CementCemVI",
        "CementBlendedHydraulic",
        "CoarseAggregate",
        "IntermediateAggregate",
        "FineAggregate",
        "Fiber",
        "FiberTypeI",
        "FiberTypeII",
        "FiberTypeIII",
        "FiberTypeIV",
        "Water",
        "CO2",
        "SCM",
        "Slag",
        "SlagFerrous",
        "SlagNonFerrous",
        "SlagFerroalloy",
        "FlyAsh",
        "FlyAshC",
        "FlyAshF",
        "FlyAshN",
        "SilicaFume",
        "ReclaimedWater",
        "Admixture",
        "AirEntrainer",
        "Retarder",
        "SuperPlasticizer",
        "WaterReducer",
        "HighRangeWaterReducer",
        "MidRangeWaterReducer",
        "LowRangeWaterReducer",
        "ViscosityModifier",
        "HydrationStabilizer",
        "CorrosionInhibitor",
        "ShrinkageReducer",
        "Accelerator",
        "NonChlorideAccelerator",
        "ChlorideAccelerator",
        "StrengthEnhancer",
        "AntiWashout",
        "Waterproofer",
        "Filler"
      ],
      "type": "string"
    },
    "PlantSalesOverview": {
      "type": "object",
      "properties": {
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "longLat": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "number",
            "format": "double"
          }
        },
        "hasSystem": {
          "type": "boolean"
        },
        "isPrecast": {
          "type": "boolean"
        },
        "salesperson": {
          "type": [
            "string",
            "null"
          ]
        },
        "cO2SupplierId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "cements": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/CementSalesOverview"
          }
        }
      },
      "additionalProperties": false
    }
  }
}