{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/doola/json-schema/doola-partner-required-action-dto-schema.json",
  "title": "PartnerRequiredActionDto",
  "description": "An action doola needs you to take on a company",
  "x-generated": "2026-11-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/doola-openapi.json#/components/schemas/PartnerRequiredActionDto",
  "type": "object",
  "properties": {
    "requiredActionId": {
      "type": "string"
    },
    "doolaCompanyId": {
      "type": "string"
    },
    "actionCode": {
      "type": "string",
      "description": "What is needed",
      "enum": [
        "FORMATION_NAME_OPTIONS_EXHAUSTED",
        "FORMATION_SIGNATURE_SS4_RESET",
        "FORMATION_SIGNATURE_FORM8821_REQUIRED",
        "FORMATION_FOUNDER_ADDRESS_REQUIRED",
        "ANNUAL_REPORT_ADDRESS_NOT_ACCEPTED",
        "ANNUAL_REPORT_SHARE_VALUE_TOO_HIGH",
        "IMPORT_DOCUMENTS_MISSING",
        "IMPORT_INFO_REQUIRED",
        "ITIN_PASSPORT_REUPLOAD",
        "ITIN_SIGNATURE_REQUIRED"
      ]
    },
    "actionName": {
      "type": "string",
      "description": "Human-readable label for the action"
    },
    "status": {
      "type": "string",
      "enum": [
        "created",
        "delivered",
        "delivery_failed",
        "submitted",
        "rejected",
        "resolved"
      ]
    },
    "reason": {
      "type": "string",
      "description": "Human-readable explanation you can surface to your user"
    },
    "requestedFieldIds": {
      "type": "array",
      "description": "Field ids to send back when resolving. For the annual report actions, named as GET /compliance/annual-reports/requirements names them; for IMPORT_INFO_REQUIRED, the company fields to update, named as the company resource names them. Empty when closing the action needs something other than field values.",
      "items": {
        "type": "string"
      }
    },
    "requestedDocumentTypes": {
      "type": "array",
      "description": "Document types to upload to the company before resolving, spelled as the document upload takes them. Empty unless the action asks for documents.",
      "items": {
        "type": "string"
      }
    },
    "open": {
      "type": "boolean"
    },
    "awaitingResponse": {
      "type": "boolean",
      "description": "True while doola is waiting for you to act on this action; false once you have submitted a resolution or the action is closed"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When this action last changed"
    },
    "history": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PartnerRequiredActionEventDto"
      }
    },
    "itinSubmissionId": {
      "type": "string",
      "description": "The member's ITIN request an ITIN_* action is about. Absent for every other code."
    },
    "documentIds": {
      "type": "array",
      "description": "IDs of the unsigned W-7 and 2848 to sign, on ITIN_SIGNATURE_REQUIRED only. Download each through the company documents route.",
      "items": {
        "type": "string"
      }
    }
  },
  "$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"
      ]
    },
    "PartnerImportCorrectionsDto": {
      "type": "object",
      "description": "Corrections to an imported company, for IMPORT_INFO_REQUIRED. Send exactly the fields the action lists in requestedFieldIds, each following the same rules as on the import. The legalName field is sent as nameOptions with one entry. A blank text value counts as not sent, so a requested field sent blank is refused as missing. Lists replace what doola holds: a person left out is removed. Send each person you keep with the id the company returned; their SSN can then be sent back masked, as the company returned it, or left out to keep the one doola holds. A person without an id is new.",
      "properties": {
        "nameOptions": {
          "type": [
            "array",
            "null"
          ],
          "description": "For legalName: the legal name as filed with the state, as exactly one name option with an ending that belongs to the company's entity type.",
          "items": {
            "$ref": "#/$defs/PartnerCompanyNameOptionDto"
          }
        },
        "state": {
          "type": [
            "string",
            "null"
          ],
          "description": "US state of formation (two-letter abbreviation). Moving the company to another state is refused when a company there already holds its state filing number."
        },
        "formationFilingNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filing number the state assigned when it formed the company.",
          "maxLength": 255,
          "minLength": 0
        },
        "formationFilingDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "Date the state formed the company. Cannot be in the future."
        },
        "ein": {
          "type": [
            "string",
            "null"
          ],
          "description": "Employer Identification Number. Adding one to a company that had none needs an EinLetter among documentIds.",
          "pattern": "^[0-9]{2}-[0-9]{7}$"
        },
        "addresses": {
          "type": [
            "array",
            "null"
          ],
          "description": "The company's `business` and `mailing` addresses, exactly one of each, both with `provider` set to `customer`.",
          "items": {
            "$ref": "#/$defs/PartnerCompanyAddressDto"
          }
        },
        "responsibleParty": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerResponsiblePartyDto"
            },
            {
              "type": "null"
            }
          ],
          "description": "The person legally responsible for the company."
        },
        "members": {
          "type": [
            "array",
            "null"
          ],
          "description": "LLC members with their ownership percentages, which must total 100.",
          "items": {
            "$ref": "#/$defs/PartnerCompanyMemberDto"
          }
        },
        "managers": {
          "type": [
            "array",
            "null"
          ],
          "description": "Managers of a manager-managed LLC, sent with managementType: at least one for MANAGER_MANAGED, an empty list for MEMBER_MANAGED.",
          "items": {
            "$ref": "#/$defs/PartnerCompanyManagerDto"
          }
        },
        "managementType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Who runs the LLC, sent with managers.",
          "enum": [
            "MEMBER_MANAGED",
            "MANAGER_MANAGED",
            null
          ]
        },
        "executiveMembers": {
          "type": [
            "array",
            "null"
          ],
          "description": "C-Corp officers and directors: at least one President, Secretary, Treasurer, and Director.",
          "items": {
            "$ref": "#/$defs/PartnerCCorpExecMemberDto"
          }
        },
        "ccorpValuation": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerCcorpValuationDto"
            },
            {
              "type": "null"
            }
          ],
          "description": "C-Corp authorized shares and par value."
        },
        "industry": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unique NAICS industry label (the `industry` value from GET /v1/partner/references/naics-codes)."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Short description of what the business does.",
          "maxLength": 50
        },
        "registeredAgent": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerRegisteredAgentDto"
            },
            {
              "type": "null"
            }
          ],
          "description": "The registered agent the company has today."
        }
      }
    },
    "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"
      ]
    },
    "PartnerRequiredActionEventDto": {
      "type": "object",
      "description": "A single step in a required action's history",
      "properties": {
        "status": {
          "type": "string",
          "description": "Status this step set",
          "enum": [
            "created",
            "delivered",
            "delivery_failed",
            "submitted",
            "rejected",
            "resolved"
          ]
        },
        "submittedPayload": {
          "$ref": "#/$defs/SubmittedResolutionPayload",
          "description": "The resolution exactly as you submitted it. Present on submitted steps only; a historical record of that step, not the company's current state."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "When this step happened"
        }
      }
    },
    "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"
      ]
    },
    "SubmittedAddress": {
      "type": "object",
      "description": "A company address as the partner submitted it",
      "properties": {
        "provider": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        }
      }
    },
    "SubmittedCompanyDetails": {
      "type": "object",
      "description": "Company details as the partner submitted them",
      "properties": {
        "companyName": {
          "type": "string"
        },
        "address": {
          "$ref": "#/$defs/SubmittedAddress"
        },
        "mailingAddress": {
          "$ref": "#/$defs/SubmittedAddress"
        },
        "physicalAddress": {
          "$ref": "#/$defs/SubmittedAddress"
        },
        "phoneNumber": {
          "type": "string"
        },
        "authorizedShares": {
          "type": "number"
        },
        "issuedShares": {
          "type": "number"
        },
        "perValuedShares": {
          "type": "number"
        }
      }
    },
    "SubmittedNameOption": {
      "type": "object",
      "description": "A candidate company name as the partner submitted it",
      "properties": {
        "name": {
          "type": "string"
        },
        "entityTypeEnding": {
          "type": "string"
        },
        "position": {
          "type": "integer",
          "format": "int32",
          "description": "Preference order, present only when the partner sent one"
        }
      }
    },
    "SubmittedResolutionPayload": {
      "type": "object",
      "description": "The resolution exactly as the partner submitted it",
      "properties": {
        "actionCode": {
          "type": "string"
        },
        "nameOptions": {
          "type": "array",
          "description": "The name options as sent, in the order they were sent",
          "items": {
            "$ref": "#/$defs/SubmittedNameOption"
          }
        },
        "addresses": {
          "type": "array",
          "description": "The addresses as sent",
          "items": {
            "$ref": "#/$defs/SubmittedAddress"
          }
        },
        "companyDetails": {
          "$ref": "#/$defs/SubmittedCompanyDetails",
          "description": "The company details as sent"
        },
        "importCorrections": {
          "$ref": "#/$defs/PartnerImportCorrectionsDto",
          "description": "The import corrections as sent, with every SSN masked"
        },
        "documentIds": {
          "type": "array",
          "description": "The document ids as sent",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}