Tier 2 - Semantic Interoperability
Tier 2 validates that your credential contains the right data in the right format according to UNTP and Textiles Extension schemas.
What Tier 2 Validates
Tier 2 ensures your credential conforms to the expected data structures:
- Credential validates against UNTP core schema - Depending on your credential type:
- Digital Product Passport (DPP) - Validates against UNTP DPP schema
- Digital Conformity Credential (DCC) - Validates against UNTP DCC schema
- Digital Traceability Event (DTE) - Validates against UNTP DTE schema
- Digital Facility Record (DFR) - Validates against UNTP DFR schema
- Credential validates against Textiles Extension schema - If implementing a Textiles Extension profile
- Required fields are present - All mandatory fields from the schema are included
- Field types and formats are correct - Data types and formats match schema requirements
Why This Matters
Tier 2 ensures your credential contains the right data in the right format. A credential can pass Tier 1 (valid VC) but fail Tier 2 (wrong structure).
Even if your credential is cryptographically valid (Tier 1), if it doesn't match the expected UNTP and Textiles schemas, other systems won't be able to process it correctly.
Dual Schema Validation Requirement
Textiles credentials MUST validate against BOTH:
- UNTP Core Schema - e.g.,
untp-dpp-schema-0.6.1.jsonfor Digital Product Passports - Textiles Extension Schema - textiles-specific fields and requirements
Both validations must pass for your credential to be considered Tier 2 compliant.
Testing Methods
Web-Based Testing (Recommended)
The easiest way to test Tier 2 is using the UNTP Playground:
- Go to https://test.uncefact.org/untp-playground
- Upload your credential
- Check the "Semantic Interoperability" section shows PASS
- Review which schemas were validated against
- Verify both UNTP core and textiles extension schemas passed
The playground will show you:
- Which schemas were checked
- Which validations passed or failed
- Specific error messages for any failures
CLI Testing
For automated testing, CI/CD integration, or batch validation:
- Install the UNTP Test Suite CLI - See UNTP Test Suite CLI documentation
- Run validation - Use the CLI to validate credentials against UNTP core and Textiles Extension schemas
- Review reports - Get detailed conformance reports showing which schemas passed or failed
Example use cases:
- Validate multiple credentials in batch
- Integrate into CI/CD pipelines
- Generate detailed conformance reports
- Test extension development
Library Integration
For programmatic integration into your own tools:
- See the UNTP Test Suite documentation for library usage
- Integrate validation into your application workflows
- Build custom validation tools for extension development
For comprehensive testing guidance, detailed API documentation, and advanced use cases, refer to the official UNTP Test Suite documentation. The UNTP Test Suite is the authoritative source for testing guidance and tooling.
Validation Checklist
Before testing Tier 2, verify:
- Credential includes required UNTP types in
typearray - All required fields from the Textiles Extension schema are present
-
@contextincludes UNTP and Textiles context URLs - All nested objects match schema definitions
- Field types and formats match the schema requirements
Testing Your Credential
Step-by-Step: Using UNTP Playground
-
Prepare your credential
- Ensure it passes Tier 1 (technical validation)
- Verify all required fields are present
-
Upload to Playground
- Go to https://test.uncefact.org/untp-playground
- Upload your credential JSON
-
Review Tier 2 Results
- Check the "Semantic Interoperability" section
- Verify both UNTP core and Textiles schemas passed
- Review any schema validation errors
-
Fix Issues
- Address any schema validation failures
- Review schema error messages carefully
- Re-upload and verify fixes
Testing Sample Credentials
You can test against our sample credentials to verify your setup:
- Sample credentials:
/schema/example/(served fromstatic/schema/example/) - These are signed with:
did:web:un.opensource.unicc.org:unece:uncefact:spec-unttp:acme - Download and test them in the playground to see what passing credentials look like
Common Issues and Solutions
Why is my credential failing with "Missing Required Fields"?
Problem: Required fields from the Textiles Extension schema are missing.
Solution: Review the Textiles Extension schema documentation and ensure all required fields are present in your credential. Check the schema validation error messages for specific missing fields.
Why is my credential failing with "Wrong Credential Type"?
Problem: The type array is missing required types.
Solution: Ensure your credential includes:
"VerifiableCredential""DigitalProductPassport"(or other appropriate UNTP type)- Textiles-specific types (when defined)
Example:
{
"type": [
"VerifiableCredential",
"DigitalProductPassport",
"DigitalCottonPassport"
]
}
Why is my credential failing with "Invalid @context URLs"?
Problem: Missing or incorrect context URLs for UNTP or Textiles schemas.
Solution: Include all required context URLs:
- W3C VC context
- UNTP DPP context
- Textiles extension context (when published)
Why is my credential failing with "Schema Validation Errors in Nested Objects"?
Problem: Nested objects don't match the expected schema structure.
Solution: Carefully review nested objects like:
credentialSubject.characteristicscredentialSubject.traceabilityInformationcredentialSubject.conformityClaim
Ensure they match the schema definitions exactly.