Skip to main content
curl -X POST "https://api.omophub.com/v1/mappings/validate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mappings": [
      {
        "source_concept_id": 201826,
        "target_concept_id": 443735,
        "mapping_type": "Maps to"
      },
      {
        "source_concept_id": 4182210,
        "target_concept_id": 320128,
        "mapping_type": "Maps to"
      }
    ]
  }'
{
  "success": true,
  "data": [
    {
      "source_concept_id": 201826,
      "target_concept_id": 443735,
      "mapping_type": "Maps to",
      "is_valid": true,
      "validation_score": 0.85,
      "issues": [],
      "recommendations": []
    },
    {
      "source_concept_id": 4182210,
      "target_concept_id": 320128,
      "mapping_type": "Maps to",
      "is_valid": false,
      "validation_score": 0.40,
      "issues": [
        "No direct mapping relationship exists",
        "Domain mismatch between concepts"
      ],
      "recommendations": [
        "Verify mapping relationship type is correct",
        "Consider using a target concept in the same domain"
      ]
    }
  ],
  "meta": {
    "request_id": "req_validate_abc123",
    "timestamp": "2024-12-22T10:00:00Z",
    "vocab_release": "2025.2"
  }
}

Overview

This endpoint validates concept mappings between vocabularies, checking for concept validity, domain compatibility, and relationship correctness. It returns a validation score and identifies potential issues with each mapping.

Request Body

mappings
array
required
Array of concept mappings to validate (1-100 items)

Query Parameters

vocab_release
string
Specific vocabulary release version (e.g., “2025.1”)

Response

success
boolean
required
Indicates if the request was successful
data
array
required
Array of validation results matching the input order
meta
object
required
Response metadata and API information
curl -X POST "https://api.omophub.com/v1/mappings/validate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mappings": [
      {
        "source_concept_id": 201826,
        "target_concept_id": 443735,
        "mapping_type": "Maps to"
      },
      {
        "source_concept_id": 4182210,
        "target_concept_id": 320128,
        "mapping_type": "Maps to"
      }
    ]
  }'
{
  "success": true,
  "data": [
    {
      "source_concept_id": 201826,
      "target_concept_id": 443735,
      "mapping_type": "Maps to",
      "is_valid": true,
      "validation_score": 0.85,
      "issues": [],
      "recommendations": []
    },
    {
      "source_concept_id": 4182210,
      "target_concept_id": 320128,
      "mapping_type": "Maps to",
      "is_valid": false,
      "validation_score": 0.40,
      "issues": [
        "No direct mapping relationship exists",
        "Domain mismatch between concepts"
      ],
      "recommendations": [
        "Verify mapping relationship type is correct",
        "Consider using a target concept in the same domain"
      ]
    }
  ],
  "meta": {
    "request_id": "req_validate_abc123",
    "timestamp": "2024-12-22T10:00:00Z",
    "vocab_release": "2025.2"
  }
}

Validation Scoring

The validation score starts at 1.0 (100%) and is reduced based on issues found:
IssueScore Reduction
Invalid source concept-0.40
Invalid target concept-0.40
Domain mismatch-0.20
Standard to non-standard mapping-0.15
No relationship exists between concepts-0.25
A mapping is considered valid when validation_score >= 0.50.