{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/dwolla/main/json-schema/dwolla-verified-business-customer-schema.json",
  "title": "VerifiedBusinessCustomer",
  "description": "Verified business customer (LLC, Corporation, Partnership) - distinguished from VerifiedSolePropCustomer by presence of a controller object",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dwolla-customers-api-openapi.yml#/components/schemas/VerifiedBusinessCustomer",
  "allOf": [
    {
      "$ref": "#/$defs/BaseCustomer"
    },
    {
      "type": "object",
      "required": [
        "type",
        "status",
        "address1",
        "city",
        "state",
        "postalCode",
        "businessName",
        "businessType",
        "businessClassification",
        "controller"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "business"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "verified",
            "suspended",
            "deactivated",
            "document",
            "retry"
          ]
        },
        "address1": {
          "type": "string"
        },
        "address2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "website": {
          "type": "string"
        },
        "businessName": {
          "type": "string"
        },
        "doingBusinessAs": {
          "type": "string"
        },
        "businessType": {
          "type": "string",
          "enum": [
            "llc",
            "corporation",
            "partnership"
          ]
        },
        "businessClassification": {
          "type": "string"
        },
        "controller": {
          "type": "object",
          "required": [
            "firstName",
            "lastName",
            "title",
            "address"
          ],
          "properties": {
            "firstName": {
              "type": "string"
            },
            "lastName": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "address": {
              "type": "object",
              "properties": {
                "address1": {
                  "type": "string"
                },
                "address2": {
                  "type": "string"
                },
                "address3": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "postalCode": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "stateProvinceRegion": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "BaseCustomer": {
      "title": "BaseCustomer",
      "description": "Base schema containing common fields for all customer types",
      "type": "object",
      "required": [
        "_links",
        "id",
        "firstName",
        "lastName",
        "email",
        "created"
      ],
      "properties": {
        "_links": {
          "additionalProperties": {
            "$ref": "#/$defs/HalLink"
          }
        },
        "id": {
          "type": "string"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "correlationId": {
          "type": "string"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "HalLink": {
      "title": "HalLink",
      "type": "object",
      "properties": {
        "href": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "resource-type": {
          "type": "string"
        }
      }
    }
  }
}