{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Shipping Address",
    "description": "PayPal shipping_address json schema",
    "type": "object",
    "properties": {
        "recipient_name": {
            "description": "Name of the recipient at this address. 50 characters max.",
            "type": "string",
            "maxLength": 50
        },
        "type": {
            "description": "Address type. Must be one of the following: residential, business, or mailbox.",
            "type": "string",
            "enum": [
                "residential",
                "business",
                "mailbox"
            ]
        },
        "line1": {
            "description": "Line 1 of the address (e.g., Number, street, etc). 100 characters max.",
            "type": "string",
            "maxLength": 100
        },
        "line2": {
            "description": "Line 2 of the address (e.g., Suite, apt #, etc). 100 characters max.",
            "type": "string",
            "maxLength": 100
        },
        "city": {
            "description": "City name. 50 characters max.",
            "type": "string",
            "maxLength": 50
        },
        "country_code": {
            "description": "2-letter country code. 2 characters max",
            "type": "string",
            "maxLength": 2,
            "minLength": 2
        },
        "postal_code": {
            "description": "Zip code or equivalent is usually required for countries that have them. 20 characters max.",
            "type": "string",
            "maxLength": 20
        },
        "state": {
            "description": "2-letter code for US states, and the equivalent for other countries. 100 characters max.",
            "type": "string",
            "maxLength": 100
        },
        "phone": {
            "description": "Phone number in E.123 format. 50 characters max.",
            "type": "string",
            "maxLength": 50
        }
    },
    "require": [
        "recipient_name",
        "line1",
        "city",
        "country_code"
    ]
}