{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Taxation Id",
    "description": "Identification number for taxation purposes",
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "ssn": {
            "type": "string",
            "pattern": "^[0-9]{3}-[0-9]{2}-[0-9]{4}$"
        },
        "ein": {
            "type": "string",
            "pattern": "^[0-9]{2}-[0-9]{7}$"
        },
        "itin": {
            "type": "string",
            "pattern": "^9[0-9]{2}-[0-9]{2}-[0-9]{4}$"
        }
    },
    "required": [
        "name"
    ],
    "additionalProperties": false,
    "oneOf": [
        {
            "required": [
                "ssn"
            ]
        },
        {
            "required": [
                "ein"
            ]
        },
        {
            "required": [
                "itin"
            ]
        }
    ]
}