{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acculynx/json-schema/acculynx-estimate-item-collection-schema.json",
  "title": "estimateItemCollection",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acculynx-estimates-api-openapi.yml#/components/schemas/estimateItemCollection",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/estimateItem"
          }
        }
      }
    }
  ],
  "$defs": {
    "estimateItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique ID for the item."
        },
        "name": {
          "type": "string",
          "description": "The name of the item."
        },
        "overrideName": {
          "type": "string",
          "description": "A custom, overridden name for the estimate item."
        },
        "description": {
          "type": "string",
          "description": "Description of the estimate item."
        },
        "materialCost": {
          "type": "number",
          "description": "Cost for materials."
        },
        "laborCost": {
          "type": "number",
          "description": "Cost for labor."
        },
        "waste": {
          "type": "number",
          "description": "Any waste recorded for the item."
        },
        "estimateUnit": {
          "type": "string",
          "description": "The unit of measurement for the item."
        },
        "orderUnit": {
          "type": "string",
          "description": "The unit of measurement to be ordered."
        },
        "unitConversion": {
          "type": "number",
          "description": "A conversion between the estimate unit and the order unit."
        },
        "selectedUnit": {
          "type": "number",
          "description": "Whether the item uses the estimate unit or order unit. Expected values: 1 - Order, 2 - Estimate."
        },
        "type": {
          "type": "string",
          "description": "The type of item in the catalog.",
          "enum": [
            "SKU",
            "Product",
            "CustomSKU",
            "Labor",
            "SKUAndLabor"
          ]
        },
        "totalPrice": {
          "type": "number",
          "description": "The total price for the item."
        },
        "fixedPrice": {
          "type": "boolean",
          "description": "Whether the price for the item is fixed or calculated."
        },
        "price": {
          "type": "number",
          "description": "The price per unit of the item."
        },
        "quantity": {
          "type": "number",
          "description": "The quantity of the item included in the estimate."
        },
        "measurementQuantity": {
          "type": "number",
          "description": "The measured quantity of the item."
        },
        "orderQuantity": {
          "type": "number",
          "description": "The ordered quantity of the item."
        },
        "_link": {
          "type": "string",
          "description": "The unique URI of the Estimate Item."
        }
      }
    }
  }
}