{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ref.openepcis.io/extensions/eu/detergent/detergent-json-schema.json",
  "title": "OpenEPCIS Detergent DPP Vocabulary Schema",
  "description": "JSON Schema for validating Detergent Digital Product Passport data per EU Regulation 2026/405 on Detergents and Surfactants. Version 0.9.6.",
  "$defs": {
    "DetergentProduct": {
      "type": "object",
      "title": "Detergent Product",
      "description": "A detergent or surfactant product subject to EU 2026/405.",
      "properties": {
        "@type": {
          "const": "DetergentProduct"
        },
        "detergentCategory": {
          "$ref": "#/$defs/DetergentCategory"
        },
        "hasProductForm": {
          "$ref": "#/$defs/ProductForm"
        },
        "intendedUse": {
          "type": "string"
        },
        "cnCode": {
          "type": "string"
        },
        "hasIngredientList": {
          "description": "Recommended — Detergents Regulation (EU) 2026/405 ingredient disclosure (INCI nomenclature), continuing the Reg. (EC) 648/2004 Annex VII D public ingredient datasheet on the digital label.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Ingredient"
          }
        },
        "hasSurfactantBiodegradability": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SurfactantBiodegradability"
          }
        },
        "hasFragranceAllergens": {
          "description": "Recommended — fragrance allergens present above the disclosure threshold must be declared per the Detergents Regulation (EU) 2026/405 (continuing Reg. (EC) 648/2004 Annex VII A).",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FragranceAllergen"
          }
        },
        "hasMicroorganisms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MicroorganismInfo"
          }
        },
        "hasHazardousSubstances": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "CLP-classified hazardous substance using oec:HazardousSubstance pattern."
          }
        },
        "hazardPictograms": {
          "description": "Recommended — GHS hazard pictogram codes (GHS01-GHS09) per CLP Regulation (EC) 1272/2008 hazard communication, shown on the label and the digital label.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^GHS0[1-9]$"
          }
        },
        "hStatements": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^H[0-9]{3}"
          }
        },
        "pStatements": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^P[0-9]{3}"
          }
        },
        "hasSignalWord": {
          "$ref": "#/$defs/SignalWord",
          "description": "Recommended — CLP Regulation (EC) 1272/2008 signal word (Danger or Warning), shown on the label and the digital label."
        },
        "phosphorusContentPercent": {
          "type": "number",
          "minimum": 0
        },
        "phosphateCompliant": {
          "type": "boolean"
        },
        "filmBiodegradable": {
          "type": "boolean"
        },
        "filmBiodegradabilityPercentage": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "hasRecommendedDosage": {
          "$ref": "#/$defs/QuantitativeValue"
        },
        "dosageInstructions": {
          "type": "string",
          "description": "Recommended — dosage instructions including water-hardness guidance; on-pack consumer information for laundry detergents (Reg. (EC) 648/2004 Art. 11(4), continued under the Detergents Regulation (EU) 2026/405)."
        },
        "hasSafetyDataSheet": {
          "type": "object",
          "description": "Reference to SDS using oec:DocumentReference pattern."
        },
        "hasBiodegradabilityTestReport": {
          "type": "object",
          "description": "Reference to biodegradability test report using oec:DocumentReference pattern."
        }
      }
    },
    "DetergentCategory": {
      "type": "string",
      "title": "Detergent Category",
      "description": "Product categories per EU 2026/405.",
      "enum": [
        "LaundryDetergent",
        "DishwasherDetergent",
        "HandDishwashingDetergent",
        "AllPurposeCleaner",
        "IndustrialDetergent",
        "InstitutionalDetergent",
        "Surfactant"
      ]
    },
    "ProductForm": {
      "type": "string",
      "title": "Product Form",
      "description": "Physical form of the detergent product.",
      "enum": [
        "Liquid",
        "Powder",
        "Gel",
        "Capsule",
        "Tablet",
        "Sheet",
        "Paste",
        "Spray"
      ]
    },
    "SignalWord": {
      "type": "string",
      "title": "Signal Word",
      "description": "CLP signal words per Regulation 1272/2008.",
      "enum": [
        "Danger",
        "Warning"
      ]
    },
    "Ingredient": {
      "type": "object",
      "title": "Ingredient",
      "description": "A single ingredient in the detergent formulation.",
      "properties": {
        "@type": {
          "const": "Ingredient"
        },
        "inciName": {
          "type": "string",
          "description": "INCI name of the ingredient."
        },
        "hasIngredientFunction": {
          "$ref": "#/$defs/IngredientFunction"
        },
        "weightPercentRange": {
          "type": "string",
          "description": "Weight percentage range in prescribed brackets (<5%, 5-15%, 15-30%, >=30%)."
        },
        "casNumber": {
          "type": "string",
          "description": "CAS registry number."
        },
        "isSurfactant": {
          "type": "boolean"
        }
      },
      "required": [
        "inciName",
        "hasIngredientFunction"
      ]
    },
    "IngredientFunction": {
      "type": "string",
      "title": "Ingredient Function",
      "description": "Functional role of the ingredient.",
      "enum": [
        "SurfactantFunction",
        "Builder",
        "Bleach",
        "Enzyme",
        "Preservative",
        "Fragrance",
        "Colorant",
        "Solvent",
        "pHAdjuster",
        "Thickener",
        "FoamRegulator",
        "AntiRedeposition",
        "Filler"
      ]
    },
    "SurfactantBiodegradability": {
      "type": "object",
      "title": "Surfactant Biodegradability",
      "description": "Biodegradability test result per Annex III.",
      "properties": {
        "@type": {
          "const": "SurfactantBiodegradability"
        },
        "hasSurfactantType": {
          "$ref": "#/$defs/SurfactantType"
        },
        "biodegradationPercentage": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "hasTestMethod": {
          "$ref": "#/$defs/BiodegradabilityTestMethod"
        },
        "testDurationDays": {
          "type": "integer",
          "minimum": 1
        },
        "passesUltimateBiodegradability": {
          "type": "boolean"
        }
      },
      "required": [
        "hasSurfactantType",
        "biodegradationPercentage",
        "hasTestMethod"
      ]
    },
    "SurfactantType": {
      "type": "string",
      "title": "Surfactant Type",
      "description": "Surfactant classification by ionic charge.",
      "enum": [
        "Anionic",
        "NonIonic",
        "Cationic",
        "Amphoteric"
      ]
    },
    "BiodegradabilityTestMethod": {
      "type": "string",
      "title": "Biodegradability Test Method",
      "description": "Standard test methods for biodegradability per Annex III.",
      "enum": [
        "ISO14593",
        "OECD301B",
        "OECD301D",
        "OECD301F",
        "OECD310"
      ]
    },
    "FragranceAllergen": {
      "type": "object",
      "title": "Fragrance Allergen",
      "description": "A fragrance allergen requiring disclosure.",
      "properties": {
        "@type": {
          "const": "FragranceAllergen"
        },
        "allergenName": {
          "type": "string"
        },
        "allergenCasNumber": {
          "type": "string"
        },
        "allergenConcentration": {
          "type": "number",
          "minimum": 0
        }
      },
      "required": [
        "allergenName"
      ]
    },
    "MicroorganismInfo": {
      "type": "object",
      "title": "Microorganism Information",
      "description": "Microorganism disclosure per Article 19.",
      "properties": {
        "@type": {
          "const": "MicroorganismInfo"
        },
        "speciesName": {
          "type": "string"
        },
        "strainDesignation": {
          "type": "string"
        },
        "endProductCharacteristics": {
          "type": "string"
        }
      },
      "required": [
        "speciesName"
      ]
    },
    "QuantitativeValue": {
      "type": "object",
      "title": "Quantitative Value",
      "description": "A measurement value with unit (gs1:QuantitativeValue).",
      "properties": {
        "@type": {
          "const": "QuantitativeValue"
        },
        "value": {
          "type": "number"
        },
        "unitCode": {
          "type": "string",
          "description": "UN/CEFACT Rec. 20 unit code."
        }
      }
    }
  }
}
