> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parcha.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Individual schema

The Individual Schema contains information about a person. It is used for Know Your Customer (KYC) processes in Parcha's case management system.

## Example

<CodeGroup>
  ```json Example theme={null}
  {
    "id": "parcha-kyc-test-2",
    "self_attested_data": {
      "first_name": "John",
      "middle_name": "Michael",
      "last_name": "Doe",
      "date_of_birth": "YYYY-MM-DD",
      "address": {
        "street_1": "123 Main Street",
        "city": "Anytown",
        "state": "ST",
        "country_code": "US",
        "postal_code": "12345"
      },
      "associated_addresses": [
        {
          "street_1": "456 Secondary Street",
          "city": "Othertown",
          "state": "ST",
          "country_code": "US",
          "postal_code": "67890"
        }
      ],
      "country_of_nationality": "US",
      "country_of_residence": "US",
      "place_of_birth": "Anytown, State",
      "sex": "Male",
      "email": "email@example.com",
      "phone": "+1234567890",
      "title": "Chief Technology Officer",
      "is_applicant": false,
      "is_business_owner": true,
      "business_ownership_percentage": 50
    }
  }
  ```
</CodeGroup>

## Field Descriptions

### Case ID

<ParamField path="id" type="string" required>
  Unique identifier for the case. Used to tie cases together when running workflows and can be used to link back to internal case management systems.
</ParamField>

### Self Attested Data

<ParamField path="self_attested_data.first_name" type="string" required>
  The first name of the individual
</ParamField>

<ParamField path="self_attested_data.middle_name" type="string" optional>
  The middle name of the individual
</ParamField>

<ParamField path="self_attested_data.last_name" type="string" required>
  The last name of the individual
</ParamField>

<ParamField path="self_attested_data.date_of_birth" type="string" optional>
  The date of birth of the individual, format YYYY-MM-DD
</ParamField>

<ParamField path="self_attested_data.address" type="Address" optional>
  The address of the individual
</ParamField>

<ParamField path="self_attested_data.associated_addresses" type="List[Address]" optional>
  The associated addresses of the individual
</ParamField>

<ParamField path="self_attested_data.country_of_nationality" type="string" optional>
  The country of nationality of the individual
</ParamField>

<ParamField path="self_attested_data.country_of_residence" type="string" optional>
  The country of residence of the individual
</ParamField>

<ParamField path="self_attested_data.place_of_birth" type="string" optional>
  The place of birth of the individual
</ParamField>

<ParamField path="self_attested_data.sex" type="string" optional>
  The sex of the individual
</ParamField>

<ParamField path="self_attested_data.email" type="string" optional>
  The email of the individual
</ParamField>

<ParamField path="self_attested_data.phone" type="string" optional>
  The phone number of the individual
</ParamField>

<ParamField path="self_attested_data.title" type="string" optional>
  The title of the individual
</ParamField>

<ParamField path="self_attested_data.is_applicant" type="boolean" optional>
  Whether the individual is an applicant
</ParamField>

<ParamField path="self_attested_data.is_business_owner" type="boolean" optional>
  Whether the individual is a business owner
</ParamField>

<ParamField path="self_attested_data.business_ownership_percentage" type="number" optional>
  The percentage of ownership of the individual
</ParamField>

<ParamField path="self_attested_data.source_of_funds_description" type="string" optional>
  The description of the source of funds for the individual
</ParamField>

### Document Fields

The following fields are lists of `Document` objects:

* proof\_of\_address\_documents
* source\_of\_funds\_documents

## Address Object

<ResponseField name="street_1" type="string" required>
  Primary street address
</ResponseField>

<ResponseField name="street_2" type="string" optional>
  Secondary street address
</ResponseField>

<ResponseField name="city" type="string" required>
  City name
</ResponseField>

<ResponseField name="state" type="string" optional>
  State or province
</ResponseField>

<ResponseField name="postal_code" type="string" required>
  Postal or ZIP code
</ResponseField>

<ResponseField name="country_code" type="string" required>
  Two-letter country code
</ResponseField>

## Document Object

<ResponseField name="document_type" type="string" required>
  Type of the document
</ResponseField>

<ResponseField name="file_name" type="string" required>
  Name of the document file
</ResponseField>

<ResponseField name="file_url" type="string" required>
  URL to access the document
</ResponseField>

## Validation Rules

<Warning>
  * `first_name` and `last_name` are required fields.
  * `date_of_birth`, if provided, must be in the format YYYY-MM-DD.
  * `email`, if provided, must be a valid email address format.
  * `business_ownership_percentage`, if provided, must be a number between 0 and 100.
</Warning>

## Validation Process

When submitting data for the Individual Schema, the system performs several validation checks:

1. Required fields are checked for presence.
2. Field formats are validated (e.g., date formats, email formats).
3. Field values are checked for validity (e.g., ownership percentage range).
4. Associated documents are processed and validated.

<Note>
  If any validation errors occur, the system will return a `SchemaValidationError` with details about the specific fields that failed validation.
</Note>

## Usage in API

When using this schema in API calls:

1. Ensure all required fields are provided.
2. Follow the specified formats for dates, email addresses, and other structured data.
3. Be prepared to handle validation errors and adjust your data accordingly.

<Card title="API Documentation" icon="book-open" href="/api-reference">
  Dive into our comprehensive API documentation to understand all available endpoints and features.
</Card>
