{
    "title": "Set enduser request v1",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://api.nextpertise.nl/schemas/enduser/set_enduser_request_v1.json",
    "type": "object",
    "properties": {
        "enduser": {
            "type": "object",
            "properties": {
                "uuid": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "company_name": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "phonenumber": {
                    "title": "Telephone number",
                    "description": "Dutch national telephone number",
                    "type": [
                        "string",
                        "null"
                    ],
                    "pattern": "^0([1-7][0-9]|85|88)[0-9]{7}$"
                },
                "address": {
                    "type": "object",
                    "properties": {
                        "zipcode": {
                            "title": "Zipcode",
                            "description": "The zipcode must conform to the Dutch postcode format. Note that the initial digit is not allowed to be '0' unless when testing.",
                            "type": "string",
                            "pattern": "^[0-9]{4}[A-Z]{2}$"
                        },
                        "housenr": {
                            "type": "integer"
                        },
                        "housenrext": {
                            "title": "Optional string",
                            "description": "A string or no value at all.",
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    "required": [
                        "zipcode",
                        "housenr",
                        "housenrext"
                    ],
                    "additionalProperties": false
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false,
    "required": [
        "enduser"
    ]
}