{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-create-business-input-schema.json",
  "title": "CreateBusinessInput",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-borrowers-api-openapi.yml#/components/schemas/CreateBusinessInput",
  "properties": {
    "address_line_one": {
      "type": "string",
      "title": "Address Line One",
      "description": "Address line one."
    },
    "address_line_two": {
      "type": "string",
      "title": "Address Line Two",
      "description": "Address line two."
    },
    "address_city": {
      "type": "string",
      "title": "Address City",
      "description": "Address city."
    },
    "address_state": {
      "type": "string",
      "title": "Address State",
      "description": "Address state."
    },
    "address_zip": {
      "type": "string",
      "title": "Address Zip",
      "description": "Five digit zipcode or nine digit 'ZIP+4'."
    },
    "address_country_code": {
      "$ref": "#/$defs/AddressCountryCode",
      "description": "ISO 3166-1 alpha-2 country code for the customer."
    },
    "customer_id": {
      "type": "string",
      "title": "Customer Id",
      "description": "The ID associated to be with the business for future requests. If not provided on customer creation, Canopy will generate this field."
    },
    "customer_parent_id": {
      "type": "string",
      "title": "Customer Parent Id",
      "description": "The business can be a child to another parent customer (business or person)."
    },
    "verification_status": {
      "$ref": "#/$defs/VerificationStatus-Input",
      "description": "The verification status of this customer. The default is 'unverified'. Depending on the system's configuration verification with third parties will happen and the status will be updated based on the result."
    },
    "title": {
      "type": "string",
      "title": "Title",
      "description": "Title of the business admin"
    },
    "phone_number": {
      "type": "string",
      "title": "Phone Number",
      "description": "Business phone number in E.164 format."
    },
    "email": {
      "type": "string",
      "title": "Email",
      "description": "The business's email address.",
      "default": ""
    },
    "business_legal_name": {
      "type": "string",
      "title": "Business Legal Name",
      "description": "The legal name of the Business."
    },
    "doing_business_as": {
      "type": "string",
      "title": "Doing Business As",
      "description": "The DBA name of the Business."
    },
    "business_ein": {
      "type": "string",
      "title": "Business Ein",
      "description": "EIN of the business, expected format in NN-NNNNNNN."
    },
    "business_type": {
      "$ref": "#/$defs/BusinessType",
      "description": "Type of business is used in determining the appropriate validation."
    },
    "website": {
      "type": "string",
      "title": "Website",
      "description": "URL for the business's website. This should be publicly resolvable"
    },
    "assign_to_accounts": {
      "items": {
        "$ref": "#/$defs/AssignToAccount"
      },
      "type": "array",
      "maxItems": 100,
      "title": "Assign To Accounts"
    },
    "attributes": {
      "additionalProperties": {},
      "type": "object",
      "title": "Attributes",
      "description": "Arbitrary customer attributes"
    }
  },
  "type": "object",
  "required": [
    "address_line_one",
    "address_city",
    "address_state",
    "address_zip",
    "business_legal_name"
  ],
  "$defs": {
    "AddressCountryCode": {
      "type": "string",
      "enum": [
        "US",
        "GB",
        "CA",
        "AF",
        "AX",
        "AL",
        "DZ",
        "AS",
        "AD",
        "AO",
        "AI",
        "AQ",
        "AG",
        "AR",
        "AM",
        "AN",
        "AW",
        "AU",
        "AT",
        "AZ",
        "BS",
        "BH",
        "BD",
        "BB",
        "BY",
        "BE",
        "BZ",
        "BJ",
        "BM",
        "BT",
        "BO",
        "BA",
        "BW",
        "BV",
        "BR",
        "IO",
        "BN",
        "BG",
        "BF",
        "BI",
        "KH",
        "CM",
        "CV",
        "KY",
        "CF",
        "TD",
        "CL",
        "CN",
        "CX",
        "CC",
        "CO",
        "KM",
        "CG",
        "CD",
        "CK",
        "CR",
        "CI",
        "HR",
        "CU",
        "CY",
        "CZ",
        "DK",
        "DJ",
        "DM",
        "DO",
        "EC",
        "EG",
        "SV",
        "GQ",
        "ER",
        "EE",
        "ET",
        "FK",
        "FO",
        "FJ",
        "FI",
        "FR",
        "GF",
        "PF",
        "TF",
        "GA",
        "GM",
        "GE",
        "DE",
        "GH",
        "GI",
        "GR",
        "GL",
        "GD",
        "GP",
        "GU",
        "GT",
        "GG",
        "GN",
        "GW",
        "GY",
        "HT",
        "HM",
        "VA",
        "HN",
        "HK",
        "HU",
        "IS",
        "IN",
        "ID",
        "IR",
        "IQ",
        "IE",
        "IM",
        "IL",
        "IT",
        "JM",
        "JP",
        "JE",
        "JO",
        "KZ",
        "KE",
        "KI",
        "KR",
        "KW",
        "KG",
        "LA",
        "LV",
        "LB",
        "LS",
        "LR",
        "LY",
        "LI",
        "LT",
        "LU",
        "MO",
        "MK",
        "MG",
        "MW",
        "MY",
        "MV",
        "ML",
        "MT",
        "MH",
        "MQ",
        "MR",
        "MU",
        "YT",
        "MX",
        "FM",
        "MD",
        "MC",
        "MN",
        "ME",
        "MS",
        "MA",
        "MZ",
        "MM",
        "NA",
        "NR",
        "NP",
        "NL",
        "NC",
        "NZ",
        "NI",
        "NE",
        "NG",
        "NU",
        "NF",
        "MP",
        "NO",
        "OM",
        "PK",
        "PW",
        "PS",
        "PA",
        "PG",
        "PY",
        "PE",
        "PH",
        "PN",
        "PL",
        "PT",
        "PR",
        "QA",
        "RE",
        "RO",
        "RU",
        "RW",
        "BL",
        "SH",
        "KN",
        "LC",
        "MF",
        "PM",
        "VC",
        "WS",
        "SM",
        "ST",
        "SA",
        "SN",
        "RS",
        "SC",
        "SL",
        "SG",
        "SK",
        "SI",
        "SB",
        "SO",
        "ZA",
        "GS",
        "ES",
        "LK",
        "SD",
        "SR",
        "SJ",
        "SZ",
        "SE",
        "CH",
        "SY",
        "TW",
        "TJ",
        "TZ",
        "TH",
        "TL",
        "TG",
        "TK",
        "TO",
        "TT",
        "TN",
        "TR",
        "TM",
        "TC",
        "TV",
        "UG",
        "UA",
        "AE",
        "UM",
        "UY",
        "UZ",
        "VU",
        "VE",
        "VN",
        "VG",
        "VI",
        "WF",
        "EH",
        "YE",
        "ZM",
        "ZW"
      ],
      "title": "AddressCountryCode"
    },
    "AssignToAccount": {
      "properties": {
        "account_id": {
          "type": "string",
          "title": "Account Id",
          "description": "This is generated by Canopy. A unique ID for the account."
        },
        "customer_account_role": {
          "$ref": "#/$defs/CustomerAccountRole",
          "description": "The role of the customer for the account."
        },
        "customer_account_external_id": {
          "type": "string",
          "title": "Customer Account External Id",
          "description": "A unique number for the customer on the account. For instance, a credit card number. If none is provided, a Canopy-generated ID can be used."
        },
        "designation": {
          "$ref": "#/$defs/Designation",
          "description": "The designation of the customer for the account."
        }
      },
      "type": "object",
      "required": [
        "account_id",
        "customer_account_role"
      ],
      "title": "AssignToAccount"
    },
    "BusinessType": {
      "type": "string",
      "enum": [
        "sole_proprietorship",
        "llc",
        "unincorporated_association",
        "trust",
        "corporation",
        "corporation_public",
        "non_profile",
        "partnership"
      ],
      "title": "BusinessType"
    },
    "CustomerAccountRole": {
      "type": "string",
      "enum": [
        "PRIMARY",
        "SECONDARY"
      ],
      "title": "CustomerAccountRole"
    },
    "Designation": {
      "type": "string",
      "enum": [
        "INDIVIDUAL",
        "JOINT_CONTRACTUAL_LIABILITY",
        "AUTHORIZED_USER",
        "COMAKER_OR_GUARANTOR",
        "MAKER",
        "BUSINESS_COMMERCIAL",
        "DECEASED"
      ],
      "title": "Designation"
    },
    "VerificationStatus-Input": {
      "type": "string",
      "enum": [
        "verified",
        "unverified"
      ],
      "title": "VerificationStatus"
    }
  }
}