MaterialDNA Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://local-loop-io.github.io/projects/loop-protocol/schemas/v0.2.0/material-dna.schema.json",
  "title": "MaterialDNA",
  "description": "Material identity and metadata schema — LOOP v0.2.0 (DPP-compatible baseline)",
  "type": "object",
  "required": [
    "@context",
    "@type",
    "schema_version",
    "id",
    "category",
    "quantity",
    "origin_city",
    "current_city",
    "available_from"
  ],
  "properties": {
    "@context": {
      "description": "JSON-LD context",
      "type": "string",
      "enum": [
        "https://local-loop-io.github.io/projects/loop-protocol/contexts/loop-v0.1.1.jsonld",
        "https://local-loop-io.github.io/projects/loop-protocol/contexts/loop-v0.2.0.jsonld"
      ]
    },
    "@type": {
      "description": "Object type identifier",
      "type": "string",
      "const": "MaterialDNA"
    },
    "schema_version": {
      "description": "Schema version for the interop flow. Emitters SHOULD use 0.2.0; receivers SHOULD accept additive minor/patch releases.",
      "type": "string",
      "pattern": "^0\\.[1-9]\\d*\\.\\d+$",
      "examples": [
        "0.1.1",
        "0.2.0"
      ]
    },
    "id": {
      "description": "Unique MaterialDNA identifier",
      "type": "string",
      "pattern": "^MAT-[A-Z]{2}-[A-Z]{3}-\\d{4}-[A-Z]+-[A-Z0-9]{6,}$",
      "examples": [
        "MAT-DE-MUC-2025-PLASTIC-B847F3"
      ]
    },
    "category": {
      "description": "Standardized material category",
      "type": "string",
      "enum": [
        "plastic-pet",
        "plastic-hdpe",
        "plastic-pvc",
        "plastic-ldpe",
        "plastic-pp",
        "plastic-ps",
        "plastic-mixed",
        "metal-steel",
        "metal-aluminum",
        "metal-copper",
        "metal-mixed",
        "organic-food",
        "organic-garden",
        "organic-wood",
        "glass-clear",
        "glass-brown",
        "glass-green",
        "glass-mixed",
        "paper-clean",
        "paper-newsprint",
        "cardboard",
        "paper-mixed",
        "textile-cotton",
        "textile-wool",
        "textile-synthetic",
        "textile-mixed",
        "ewaste-computers",
        "ewaste-phones",
        "ewaste-batteries",
        "ewaste-mixed"
      ]
    },
    "quantity": {
      "description": "Amount of material",
      "type": "object",
      "required": [
        "value",
        "unit"
      ],
      "properties": {
        "value": {
          "description": "Numeric quantity",
          "type": "number",
          "minimum": 0,
          "examples": [
            1000,
            500.5
          ]
        },
        "unit": {
          "description": "Unit of measurement",
          "type": "string",
          "enum": [
            "kg",
            "g",
            "t",
            "l",
            "ml",
            "m3",
            "piece",
            "bundle"
          ],
          "examples": [
            "kg"
          ]
        }
      }
    },
    "quality": {
      "description": "Quality score (0.0 to 1.0)",
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "examples": [
        0.95
      ]
    },
    "origin_city": {
      "description": "City that registered the material",
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "examples": [
        "Munich"
      ]
    },
    "current_city": {
      "description": "City currently holding custody of the material",
      "type": "string",
      "minLength": 2,
      "maxLength": 80,
      "examples": [
        "Munich"
      ]
    },
    "location": {
      "description": "Geographic location of material",
      "type": "object",
      "required": [
        "lat",
        "lon"
      ],
      "properties": {
        "lat": {
          "description": "Latitude",
          "type": "number",
          "minimum": -90,
          "maximum": 90,
          "examples": [
            48.1351
          ]
        },
        "lon": {
          "description": "Longitude",
          "type": "number",
          "minimum": -180,
          "maximum": 180,
          "examples": [
            11.582
          ]
        },
        "address": {
          "description": "Human-readable address",
          "type": "string",
          "examples": [
            "Recycling Center Munich, Sachsenstraße 25"
          ]
        }
      }
    },
    "available_from": {
      "description": "When material becomes available (ISO 8601)",
      "type": "string",
      "format": "date-time",
      "examples": [
        "2025-05-27T10:00:00Z"
      ]
    },
    "expires": {
      "description": "When material expires or must be collected (ISO 8601)",
      "type": "string",
      "format": "date-time",
      "examples": [
        "2025-06-03T10:00:00Z"
      ]
    },
    "certifications": {
      "description": "List of certifications",
      "type": "array",
      "items": {
        "type": "string",
        "examples": [
          "food-grade",
          "iso-14001",
          "organic-eu"
        ]
      }
    },
    "images": {
      "description": "Photos of the material",
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri",
        "examples": [
          "https://example.com/material-photo.jpg"
        ]
      },
      "maxItems": 10
    },
    "contact": {
      "description": "Reserved. Personal contact details are not permitted in minimal interop payloads.",
      "not": {}
    },
    "passport": {
      "description": "Optional regulatory interoperability metadata for DPP-style integrations (ESPR, UNTP, Battery Passport, PPWR, NKWS aligned).",
      "type": "object",
      "properties": {
        "passport_id": {
          "type": "string",
          "maxLength": 160
        },
        "passport_url": {
          "type": "string",
          "format": "uri"
        },
        "backup_copy_url": {
          "type": "string",
          "format": "uri"
        },
        "passport_status": {
          "type": "string",
          "enum": [
            "not_applicable",
            "optional",
            "required",
            "available",
            "restricted"
          ]
        },
        "data_carrier_id": {
          "type": "string",
          "maxLength": 160
        },
        "issuer": {
          "type": "string",
          "maxLength": 160
        },
        "access_scope": {
          "type": "string",
          "enum": [
            "public",
            "role-based",
            "restricted"
          ]
        },
        "supported_regimes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "espr-dpp",
              "battery-passport",
              "ppwr",
              "waste-shipment",
              "nkws"
            ]
          }
        },
        "gtin": {
          "description": "GS1 Global Trade Item Number",
          "type": "string",
          "pattern": "^\\d{8,14}$"
        },
        "gs1_digital_link": {
          "description": "GS1 Digital Link URL",
          "type": "string",
          "format": "uri"
        },
        "economic_operator_id": {
          "description": "ESPR economic operator identifier",
          "type": "string",
          "maxLength": 120
        },
        "economic_operator_name": {
          "description": "ESPR economic operator name",
          "type": "string",
          "maxLength": 200
        },
        "manufacturer_id": {
          "description": "Manufacturer identifier",
          "type": "string",
          "maxLength": 120
        },
        "country_of_production": {
          "description": "ISO 3166-1 alpha-2 country code of production",
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        },
        "conformity_declaration_ref": {
          "description": "EU Declaration of Conformity link",
          "type": "string",
          "format": "uri"
        },
        "carbon_footprint_kg_co2e": {
          "description": "Carbon footprint per declared unit (kg CO2e)",
          "type": "number",
          "minimum": 0
        },
        "carbon_footprint_unit": {
          "description": "Declared unit for carbon footprint",
          "type": "string",
          "examples": [
            "per_kg",
            "per_unit"
          ]
        },
        "recycled_content_percent": {
          "description": "Percentage of recycled content (ESPR & PPWR)",
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "recyclable_content_percent": {
          "description": "Percentage of recyclable content (UNTP circularity)",
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "repair_score": {
          "description": "Repairability index 0-10 (ESPR)",
          "type": "number",
          "minimum": 0,
          "maximum": 10
        },
        "durability_score": {
          "description": "Durability rating 0-10",
          "type": "number",
          "minimum": 0,
          "maximum": 10
        },
        "disassembly_instructions": {
          "description": "Link to disassembly information",
          "type": "string",
          "format": "uri"
        },
        "substances_of_concern": {
          "description": "Substances of Concern declarations (ESPR)",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "cas_number": {
                "type": "string",
                "pattern": "^\\d{1,7}-\\d{2}-\\d$"
              },
              "concentration_ppm": {
                "type": "number"
              },
              "location": {
                "type": "string"
              }
            }
          }
        },
        "hazardous": {
          "description": "UNTP hazardous material flag",
          "type": "boolean"
        },
        "material_safety_info_url": {
          "description": "Material safety data sheet URL (recommended if hazardous is true)",
          "type": "string",
          "format": "uri"
        },
        "verified_ratio": {
          "description": "UNTP data verification coverage (0.0 to 1.0)",
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "verification_evidence_url": {
          "description": "Link to verification attestation",
          "type": "string",
          "format": "uri"
        }
      },
      "additionalProperties": true
    },
    "classification": {
      "description": "Optional classification hints for customs, waste, or product-specific rules.",
      "type": "object",
      "properties": {
        "ewc_code": {
          "type": "string",
          "pattern": "^\\d{2}(\\s\\d{2}){2}$"
        },
        "hs_code": {
          "type": "string",
          "pattern": "^\\d{6,10}$"
        },
        "cn_code": {
          "type": "string",
          "pattern": "^\\d{8}$"
        },
        "battery_category": {
          "type": "string",
          "enum": [
            "portable",
            "lmt",
            "sli",
            "industrial",
            "ev"
          ]
        },
        "prodcom_code": {
          "description": "EU PRODCOM classification code",
          "type": "string",
          "pattern": "^\\d{8}$"
        },
        "taric_code": {
          "description": "EU TARIC classification code",
          "type": "string",
          "pattern": "^\\d{10}$"
        },
        "nace_code": {
          "description": "NACE economic activity code",
          "type": "string",
          "pattern": "^[A-Z]\\d{2}(\\.\\d{1,2})?$"
        },
        "scip_id": {
          "description": "ECHA SCIP database reference",
          "type": "string"
        },
        "waste_framework_code": {
          "description": "EU Waste Framework Directive code",
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "traceability": {
      "description": "Optional chain-of-custody, retention, and evidence references.",
      "type": "object",
      "properties": {
        "batch_id": {
          "description": "Machine-readable batch identifier for chain-of-custody traceability and regulatory evidence.",
          "type": "string",
          "maxLength": 120
        },
        "serial_number": {
          "type": "string",
          "maxLength": 160
        },
        "lot_number": {
          "type": "string",
          "maxLength": 120
        },
        "source_operator_id": {
          "type": "string",
          "maxLength": 120
        },
        "facility_id": {
          "type": "string",
          "maxLength": 120
        },
        "retention_until": {
          "type": "string",
          "format": "date-time"
        },
        "document_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "maxItems": 20
        },
        "due_diligence_ref": {
          "type": "string",
          "maxLength": 160
        },
        "epcis_event_refs": {
          "description": "ISO 19987 (EPCIS) event references for supply chain traceability",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "event_type",
              "event_id"
            ],
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "observation",
                  "aggregation",
                  "transaction",
                  "transformation"
                ]
              },
              "event_id": {
                "type": "string"
              },
              "event_url": {
                "type": "string",
                "format": "uri"
              },
              "hash_digest": {
                "description": "Integrity hash (UNTP SecureLink)",
                "type": "string"
              },
              "hash_method": {
                "type": "string",
                "enum": [
                  "SHA-256",
                  "SHA-384",
                  "SHA-512"
                ]
              }
            }
          }
        },
        "chain_of_custody_url": {
          "description": "Full chain-of-custody evidence URL",
          "type": "string",
          "format": "uri"
        },
        "w3c_vc_credential_id": {
          "description": "W3C Verifiable Credential ID (if wrapped in VC)",
          "type": "string",
          "format": "uri"
        },
        "w3c_vc_issuer": {
          "description": "W3C VC issuer DID/URL",
          "type": "string",
          "format": "uri"
        }
      },
      "additionalProperties": true
    },
    "metadata": {
      "description": "Additional metadata",
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "examples": [
            "consumer-collection",
            "industrial",
            "commercial"
          ]
        },
        "batch_number": {
          "description": "Human-readable batch label for internal tracking. For regulatory traceability, prefer traceability.batch_id.",
          "type": "string",
          "examples": [
            "2025-W22-01"
          ]
        },
        "notes": {
          "type": "string",
          "maxLength": 500,
          "examples": [
            "Clean, sorted PET bottles"
          ]
        }
      },
      "additionalProperties": true
    },
    "conformity_claims": {
      "description": "UNTP-aligned conformity claims for regulatory and standards compliance.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "claim_id"
        ],
        "properties": {
          "claim_id": {
            "description": "Unique claim identifier",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "reference_standard": {
            "description": "Standard name or number",
            "type": "string"
          },
          "reference_regulation": {
            "description": "EU regulation reference",
            "type": "string"
          },
          "conformity_topic": {
            "type": "string",
            "enum": [
              "environment",
              "social",
              "governance",
              "safety",
              "quality"
            ]
          },
          "declared_value": {
            "type": "object",
            "properties": {
              "metric": {
                "type": "string"
              },
              "value": {
                "type": "number"
              },
              "unit": {
                "type": "string"
              },
              "accuracy": {
                "type": "number"
              }
            }
          },
          "conformance": {
            "description": "Whether the claim is met",
            "type": "boolean"
          },
          "assessment_date": {
            "type": "string",
            "format": "date-time"
          },
          "conformity_evidence_url": {
            "description": "Link to attestation or evidence",
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  },
  "additionalProperties": true
}