{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crunchtime-information-systems/json-schema/crunchtime-information-systems-hierarchy-v1-details-list-schema.json",
  "title": "HierarchyV1DetailsList",
  "description": "HierarchyV1DetailsList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crunchtime-information-systems-hierarchy-service-api-openapi.yml#/components/schemas/HierarchyV1DetailsList",
  "type": "object",
  "properties": {
    "hierarchyDetails": {
      "$ref": "#/$defs/HierarchyV1Details"
    }
  },
  "$defs": {
    "HierarchyDetailDto": {
      "type": "object",
      "required": [
        "levelDescription",
        "levelName",
        "levelNumber"
      ],
      "properties": {
        "hasChildren": {
          "type": "boolean",
          "description": "Indicates whether the hierarchy has more than just one level. Valid values are 'true' or 'false'."
        },
        "levelDescription": {
          "type": "string",
          "description": "\"Level Description\" from Hierarchy setup screen."
        },
        "levelName": {
          "type": "string",
          "description": "\"Level Name\" from Hierarchy setup screen."
        },
        "levelNumber": {
          "type": "integer",
          "format": "int64",
          "description": "\"Nierarchy Level\" number from Hierarchy setup screen."
        },
        "locationCode": {
          "type": "string",
          "description": "\"Code\" for the physical location from Hierarchy setup screen."
        },
        "locationName": {
          "type": "string",
          "description": "Name for the physical \"Location\" from Hierarchy setup screen."
        },
        "logicalName": {
          "type": "string",
          "description": "Name for the logical \"Location\" from Hierarchy setup screen."
        },
        "parentLogicalName": {
          "type": "string",
          "description": "Name of the \"Parent Location\" from Hierarchy setup screen."
        }
      },
      "title": "HierarchyDetailDto",
      "description": "Hierarchy Detail description"
    },
    "HierarchyHeaderDto": {
      "type": "object",
      "required": [
        "hierarchyType",
        "locationCode"
      ],
      "properties": {
        "deleteFlag": {
          "type": "string",
          "description": "\"Delete Flag\" indicator. If populated, must be ‘Y' or 'N'. If not populated, will be 'N'."
        },
        "hierarchyType": {
          "type": "string",
          "description": "\"Hierarchy Type\" (the name of the hierarchy) from Hierarchy setup screen."
        },
        "locationCode": {
          "type": "string",
          "description": "The Company \"Code\" from Company setup screen."
        }
      },
      "title": "HierarchyHeaderDto",
      "description": "Creates a new Hierarchy or updates the Physical Locations of an existing Hierarchy."
    },
    "HierarchyV1Details": {
      "type": "object",
      "required": [
        "hierarchyDetailDetails",
        "hierarchyHeaderDetails"
      ],
      "properties": {
        "hierarchyDetailDetails": {
          "type": "array",
          "description": "\"Hierarchy Detail Details\" from Hierarchy setup screen",
          "items": {
            "$ref": "#/$defs/HierarchyDetailDto"
          }
        },
        "hierarchyHeaderDetails": {
          "$ref": "#/$defs/HierarchyHeaderDto"
        }
      },
      "title": "HierarchyV1Details",
      "description": "HierarchyV1Details description"
    }
  }
}