{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-create-account-response-schema.json",
  "title": "CreateAccountResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-accounts-api-openapi.yml#/components/schemas/CreateAccountResponse",
  "properties": {
    "account_id": {
      "type": "string",
      "title": "Account Id",
      "description": "The account id."
    },
    "effective_at": {
      "type": "string",
      "title": "Effective At",
      "description": "The effective at date of account creation."
    },
    "external_fields": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {},
          "type": "array"
        }
      ],
      "title": "External Fields",
      "description": "The external fields associated with the account."
    },
    "borrowers": {
      "items": {
        "$ref": "#/$defs/GetBorrowerDetailsResponse"
      },
      "type": "array",
      "title": "Borrowers",
      "description": "The borrowers associated with the account."
    },
    "originating_organization_name": {
      "type": "string",
      "title": "Originating Organization Name",
      "description": "The name of the organization that originated the account."
    },
    "current_owner_organization_name": {
      "type": "string",
      "title": "Current Owner Organization Name",
      "description": "The name of the organization that owns the account."
    }
  },
  "type": "object",
  "required": [
    "account_id",
    "effective_at",
    "external_fields",
    "borrowers"
  ],
  "$defs": {
    "GetBorrowerDetailsResponse": {
      "properties": {
        "borrower_id": {
          "type": "string",
          "title": "Borrower Id",
          "description": "The borrower's ID."
        },
        "external_borrower_id": {
          "type": "string",
          "title": "External Borrower Id",
          "description": "The borrower's external ID."
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active",
          "description": "Field to indicate if the borrower is active."
        },
        "name_first": {
          "type": "string",
          "title": "Name First",
          "description": "Borrower's first name."
        },
        "name_last": {
          "type": "string",
          "title": "Name Last",
          "description": "Borrower's last name."
        },
        "doing_business_as": {
          "type": "string",
          "title": "Doing Business As",
          "description": "The DBA name of the Business."
        },
        "business_legal_name": {
          "type": "string",
          "title": "Business Legal Name",
          "description": "The legal name of the Business."
        }
      },
      "type": "object",
      "required": [
        "borrower_id",
        "external_borrower_id",
        "is_active"
      ],
      "title": "GetBorrowerDetailsResponse"
    }
  }
}