{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Host.GetBom Response",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BomItem"
      },
      "description": "BOM items. Same schema as the plugin BomItem type."
    }
  },
  "required": [
    "items"
  ],
  "$defs": {
    "BomItem": {
      "type": "object",
      "properties": {
        "position": {
          "type": "integer",
          "description": "Position number in the BOM."
        },
        "articleCode": {
          "type": "string",
          "description": "Article code."
        },
        "description": {
          "type": "string",
          "description": "Item description."
        },
        "quantity": {
          "type": "number",
          "description": "Quantity."
        },
        "unit": {
          "type": "string",
          "description": "Not populated in API v1 (always empty)."
        },
        "level": {
          "type": "integer",
          "description": "Not populated in API v1 (always 0)."
        },
        "parentPosition": {
          "type": "integer",
          "description": "Not populated in API v1 (always 0)."
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Not populated in API v1 (always empty)."
        }
      },
      "required": [
        "position",
        "articleCode",
        "quantity"
      ],
      "description": "A single item in a Bill of Materials. Hose rows are excluded."
    }
  }
}