{
  "tool": "matric-nqf4.cons_unit_price",
  "name": "Unit price and recipe scaling (CDU-GEN-NSC-400)",
  "answers": "The price per unit of a pack and the factor to scale a recipe between serving counts.",
  "degree": {
    "id": "competency:matric-nqf4",
    "code": "CDU-GEN-NSC-400",
    "name": "Senior Certificate (Amended) — exam-readiness programme (NQF 4 matric)",
    "version": "1.0.0"
  },
  "reference": "Umalusi/NSC subject catalogue, worked reference (offline reconstruction); Consumer Studies row of §4 — a unit price and a recipe scale factor",
  "endpoint": "/faculty/matric-nqf4/cons_unit_price",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "packPrice",
      "packSize",
      "servingsHave",
      "servingsNeed"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "packPrice": {
        "type": "number",
        "description": "price of the pack (≥ 0)",
        "minimum": 0,
        "maximum": 1000000
      },
      "packSize": {
        "type": "number",
        "description": "units in the pack (> 0)",
        "minimum": 0.001,
        "maximum": 1000000
      },
      "servingsHave": {
        "type": "number",
        "description": "servings the recipe makes (> 0)",
        "minimum": 0.001,
        "maximum": 100000
      },
      "servingsNeed": {
        "type": "number",
        "description": "servings needed (> 0)",
        "minimum": 0.001,
        "maximum": 100000
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "unitPrice",
      "scaleFactor"
    ],
    "properties": {
      "unitPrice": {
        "type": "number",
        "description": "price per unit (2 d.p.)"
      },
      "scaleFactor": {
        "type": "number",
        "description": "multiply every ingredient by this (2 d.p.)"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "packPrice": 36,
    "packSize": 6,
    "servingsHave": 4,
    "servingsNeed": 10
  }
}