{
    "$schema": "http:\/\/json-schema.org\/draft-07\/schema#",
    "$id": "https:\/\/estateagentfeeds.com\/docs\/sendAgentRegistrationRequestSchema.json",
    "title": "Create Agent Registration",
    "description": "Estate Agent Feeds Agent Registration API schema for creating or updating branch registration details used for agent onboarding.",
    "type": "object",
    "properties": {
        "agent": {
            "type": "object",
            "description": "The agent registration object.",
            "properties": {
                "branch_id": {
                    "description": "The unique branch identifier used for agent registration.",
                    "$ref": "#\/definitions\/branch_ref"
                },
                "branch_name": {
                    "description": "The branch display name used when registering the agent.",
                    "$ref": "#\/definitions\/name_str"
                },
                "branch_email": {
                    "description": "The primary registration and contact email for the branch.",
                    "$ref": "#\/definitions\/email_str"
                }
            },
            "required": [
                "branch_id",
                "branch_name",
                "branch_email"
            ],
            "additionalProperties": false
        }
    },
    "required": [
        "agent"
    ],
    "additionalProperties": false,
    "definitions": {
        "email_str": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9-._+]{1,}@[a-zA-Z0-9-_]{2,}\\.[a-zA-Z.]{2,25}$"
        },
        "name_str": {
            "type": "string",
            "pattern": "^(?=.{1,120}$)[^\\x00-\\x1F\\x7F]+$"
        },
        "branch_ref": {
            "type": "string",
            "pattern": "^[A-Z0-9]{8,15}$",
            "minLength": 8,
            "maxLength": 15
        },
        "str_medium": {
            "type": "string",
            "minLength": 0,
            "maxLength": 60
        },
        "str_long": {
            "type": "string",
            "minLength": 0,
            "maxLength": 120
        }
    }
}