{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/doola/json-schema/doola-import-company-request-schema.json",
  "title": "ImportCompanyRequest",
  "description": "Request body to import a company your customer already formed outside doola. Nothing is filed: the company is recorded as it exists today.",
  "x-generated": "2026-11-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/doola-openapi.json#/components/schemas/ImportCompanyRequest",
  "type": "object",
  "properties": {
    "doolaCustomerId": {
      "type": "string",
      "description": "doola customer ID (KSUID) that owns the company.",
      "minLength": 1
    },
    "entityType": {
      "type": "string",
      "description": "Entity type. An LLC takes `members`; a CCorp takes `executiveMembers` and `ccorpValuation`.",
      "enum": [
        "LLC",
        "CCorp"
      ],
      "minLength": 1
    },
    "managementType": {
      "type": "string",
      "description": "Who runs the LLC. Required for an LLC, where `members` lists the owners either way; omit for a CCorp, which its officers run.",
      "enum": [
        "MEMBER_MANAGED",
        "MANAGER_MANAGED"
      ]
    },
    "state": {
      "type": "string",
      "description": "US state of formation (two-letter abbreviation).",
      "minLength": 1
    },
    "nameOptions": {
      "type": "array",
      "description": "The legal name as filed with the state, as exactly one name option: the name without the entity ending, and an ending that belongs to `entityType`. `position` is ignored.",
      "items": {
        "$ref": "#/$defs/PartnerCompanyNameOptionDto"
      }
    },
    "formationFilingDate": {
      "type": "string",
      "format": "date",
      "description": "Date the state formed the company. Cannot be in the future."
    },
    "formationFilingNumber": {
      "type": "string",
      "description": "Filing number the state assigned when it formed the company. A state and filing number can be registered with doola only once.",
      "maxLength": 255,
      "minLength": 0
    },
    "ein": {
      "type": "string",
      "description": "Employer Identification Number, if the company has one.",
      "pattern": "^[0-9]{2}-[0-9]{7}$"
    },
    "industry": {
      "type": "string",
      "description": "Unique NAICS industry label (the `industry` value from GET /v1/partner/references/naics-codes).",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "description": "Short description of what the business does.",
      "maxLength": 50,
      "minLength": 1
    },
    "responsibleParty": {
      "$ref": "#/$defs/PartnerResponsiblePartyDto",
      "description": "The person legally responsible for the company."
    },
    "addresses": {
      "type": "array",
      "description": "The company's principal (`business`) and `mailing` addresses. Exactly one of each, both with `provider` set to `customer`: doola is not the company's registered agent.",
      "items": {
        "$ref": "#/$defs/PartnerCompanyAddressDto"
      }
    },
    "members": {
      "type": "array",
      "description": "LLC members with their ownership percentages, which must total 100. Required for an LLC; omit for a CCorp.",
      "items": {
        "$ref": "#/$defs/PartnerCompanyMemberDto"
      }
    },
    "managers": {
      "type": "array",
      "description": "Managers of a manager-managed LLC: at least one is required when `managementType` is `MANAGER_MANAGED`, and none may be sent otherwise. Each follows the same rules as `responsibleParty`. `members` still lists the owners.",
      "items": {
        "$ref": "#/$defs/PartnerCompanyManagerDto"
      }
    },
    "executiveMembers": {
      "type": "array",
      "description": "C-Corp officers and directors. Required for a CCorp; omit for an LLC. Include at least one President, Secretary, Treasurer, and Director.",
      "items": {
        "$ref": "#/$defs/PartnerCCorpExecMemberDto"
      }
    },
    "ccorpValuation": {
      "$ref": "#/$defs/PartnerCcorpValuationDto",
      "description": "C-Corp authorized shares and par value. Required for a CCorp; omit for an LLC."
    },
    "registeredAgent": {
      "$ref": "#/$defs/PartnerRegisteredAgentDto"
    }
  },
  "required": [
    "addresses",
    "description",
    "doolaCustomerId",
    "entityType",
    "formationFilingDate",
    "formationFilingNumber",
    "industry",
    "nameOptions",
    "registeredAgent",
    "responsibleParty",
    "state"
  ],
  "$defs": {
    "PartnerAddressDto": {
      "type": "object",
      "description": "A postal address.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Server-assigned ID.",
          "readOnly": true
        },
        "line1": {
          "type": "string",
          "description": "Street address line 1."
        },
        "line2": {
          "type": "string",
          "description": "Street address line 2."
        },
        "city": {
          "type": "string",
          "description": "City."
        },
        "state": {
          "type": "string",
          "description": "State or province."
        },
        "postalCode": {
          "type": "string",
          "description": "Postal or ZIP code."
        },
        "country": {
          "type": "string",
          "description": "ISO 3166-1 alpha-3 country code (e.g. USA)."
        },
        "phone": {
          "type": "string",
          "description": "Phone number in E.164 format. Required for a person's address (the responsible party, a member, or an executive member); optional for a company `mailing` or `business` address."
        }
      },
      "required": [
        "city",
        "country",
        "line1",
        "postalCode",
        "state"
      ]
    },
    "PartnerCCorpExecMemberDto": {
      "type": "object",
      "description": "A C-Corp executive member — an officer or director.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Server-assigned ID, ignored on create and import. In the importCorrections of an IMPORT_INFO_REQUIRED resolution, send it back to keep this person and their stored SSN."
        },
        "type": {
          "type": "string",
          "description": "Executive role. The list must include at least one of each role; President, Secretary, and Treasurer may each appear only once, while Director may repeat.",
          "enum": [
            "President",
            "Secretary",
            "Treasurer",
            "Director"
          ]
        },
        "legalFirstName": {
          "type": "string",
          "description": "Legal first name."
        },
        "legalLastName": {
          "type": "string",
          "description": "Legal last name."
        },
        "ssn": {
          "type": "string",
          "description": "Social Security Number or ITIN. Optional. Input: nine ASCII digits or XXX-XX-XXXX. Handled as sensitive data."
        },
        "address": {
          "$ref": "#/$defs/PartnerAddressDto",
          "description": "Executive member's address."
        }
      },
      "required": [
        "address",
        "legalFirstName",
        "legalLastName",
        "type"
      ]
    },
    "PartnerCcorpValuationDto": {
      "type": "object",
      "description": "C-Corp share structure.",
      "properties": {
        "noOfShares": {
          "type": "integer",
          "format": "int32",
          "description": "Number of authorized shares. Must be greater than 0."
        },
        "shareValue": {
          "type": "number",
          "description": "Par value per share, in USD. Must be greater than 0."
        }
      },
      "required": [
        "noOfShares",
        "shareValue"
      ]
    },
    "PartnerCompanyAddressDto": {
      "type": "object",
      "description": "A company address of a given type.",
      "properties": {
        "provider": {
          "type": "string",
          "description": "Who provides this address. Use `customer` to supply the address yourself in the `address` field. Use `registeredAgent` to have doola fill in its Registered Agent address for the company's state; leave `address` out, as it is not used for a registered-agent entry.",
          "enum": [
            "customer",
            "registeredAgent"
          ]
        },
        "type": {
          "type": "string",
          "description": "Which address this is. Send exactly one `mailing` entry and one `business` entry.",
          "enum": [
            "mailing",
            "business"
          ]
        },
        "address": {
          "$ref": "#/$defs/PartnerAddressDto",
          "description": "The address itself."
        }
      },
      "required": [
        "provider",
        "type"
      ]
    },
    "PartnerCompanyManagerDto": {
      "type": "object",
      "description": "A manager of a manager-managed LLC: a person who runs the company.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Server-assigned ID, ignored on create and import. In the importCorrections of an IMPORT_INFO_REQUIRED resolution, send it back to keep this person and their stored SSN."
        },
        "legalFirstName": {
          "type": "string",
          "description": "Manager's legal first name."
        },
        "legalLastName": {
          "type": "string",
          "description": "Manager's legal last name."
        },
        "ssn": {
          "type": "string",
          "description": "Manager's Social Security Number or ITIN. Optional. Input: nine ASCII digits or XXX-XX-XXXX. Handled as sensitive data."
        },
        "email": {
          "type": "string",
          "description": "Manager's contact email."
        },
        "address": {
          "$ref": "#/$defs/PartnerAddressDto",
          "description": "Manager's address. When sent, a phone number is required."
        }
      },
      "required": [
        "email",
        "legalFirstName",
        "legalLastName"
      ]
    },
    "PartnerCompanyMemberDto": {
      "type": "object",
      "description": "A company member/owner. Ownership across all members must total 100.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Server-assigned ID, ignored on create and import. In the importCorrections of an IMPORT_INFO_REQUIRED resolution, send it back to keep this person and their stored SSN."
        },
        "legalFirstName": {
          "type": "string",
          "description": "Legal first name (natural persons)."
        },
        "legalLastName": {
          "type": "string",
          "description": "Legal last name (natural persons)."
        },
        "contactFullName": {
          "type": "string",
          "description": "Full contact name (entities or where a single name is used)."
        },
        "isNaturalPerson": {
          "type": "boolean",
          "description": "True if the member is a person, false if it is another entity."
        },
        "address": {
          "$ref": "#/$defs/PartnerAddressDto",
          "description": "Member's address."
        },
        "ownershipPercent": {
          "type": "number",
          "description": "Ownership percentage (0–100)."
        },
        "ssn": {
          "type": "string",
          "description": "Social Security Number or ITIN. Optional. Input: nine ASCII digits or XXX-XX-XXXX. Handled as sensitive data."
        }
      },
      "required": [
        "address",
        "isNaturalPerson",
        "ownershipPercent"
      ]
    },
    "PartnerCompanyNameOptionDto": {
      "type": "object",
      "description": "A candidate company name.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Server-assigned ID.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Proposed company name, without the entity ending."
        },
        "entityTypeEnding": {
          "type": "string",
          "description": "Entity-type ending appended to the name."
        },
        "position": {
          "type": "integer",
          "format": "int32",
          "description": "Preference order, lowest first. Ignored on create, where array order sets the preference and responses return it starting at 0. On a name-options resolution, options are ordered by this value, or by array order when it is omitted."
        }
      },
      "required": [
        "entityTypeEnding",
        "name"
      ]
    },
    "PartnerRegisteredAgentDto": {
      "type": "object",
      "description": "The registered agent the company has today.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Registered agent's name, as filed with the state."
        },
        "address": {
          "$ref": "#/$defs/PartnerAddressDto",
          "description": "The registered agent's address as filed with the state."
        }
      },
      "required": [
        "address",
        "name"
      ]
    },
    "PartnerResponsiblePartyDto": {
      "type": "object",
      "description": "The person legally responsible for the company (used for tax filings).",
      "properties": {
        "id": {
          "type": "string",
          "description": "Server-assigned ID, ignored on create and import. In the importCorrections of an IMPORT_INFO_REQUIRED resolution, send it back to keep this person and their stored SSN."
        },
        "legalFirstName": {
          "type": "string",
          "description": "Legal first name."
        },
        "legalLastName": {
          "type": "string",
          "description": "Legal last name."
        },
        "ssn": {
          "type": "string",
          "description": "Social Security Number or ITIN. Optional. Input: nine ASCII digits or XXX-XX-XXXX. Handled as sensitive data."
        },
        "email": {
          "type": "string",
          "description": "Contact email."
        },
        "address": {
          "$ref": "#/$defs/PartnerAddressDto",
          "description": "Responsible party's address."
        }
      },
      "required": [
        "email",
        "legalFirstName",
        "legalLastName"
      ]
    }
  }
}