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

# The Document Object

A document object represents various types of information or documentation, such as:

* Identity documents (driver's licenses, passports)
* Contact information (phone numbers, email addresses)
* Official documents (utility bills, reports)
* Collections of related data

<Callout icon="star" color="#3DD892" iconType="regular">
  ##### Key Characteristic

  Every document object must include a country attribute, which is mandatory for
  all document types.
</Callout>

## Document Object Structure

Here's an example of a document object with detailed annotations:

```json theme={null}
{
  // Mandatory field indicating the document's country of origin
  "country": "AUS",

  // Indicates if the document was created from a scanned source
  "createdFromScan": true,

  // Array containing scan-related information
  "docScan": [
    {
      "ScanDelete": true,
      "scanCreated": "2020-06-02",
      // Base64 encoded scan data
      "scanData": "VGhpcyBpcyBzb21lIGV4YW1wbGUgZGF0YS4...",
      "scanDataRetrievalState": "NORMAL",
      "scanDocId": "84a9a860-68ae-4d7d-9a53-54a1116d5051",
      "scanFilename": "Important Document - ID1234567.pdf",
      "scanMIME": "image/png",
      "scanPageNum": 1,
      "scanSide": "F",
      "scanType": "PDF"
    }
  ],

  // Unique identifier for the document
  "documentId": "84a9a860-68ae-4d7d-9a53-54a1116d5051",
  "documentStatus": "DOC_SCANNED",

  // Additional metadata stored as key-value pairs
  "extraData": [
    {
      "kvpKey": "Extra.Information",
      "kvpType": "general.string",
      "kvpValue": "123-456-789A"
    }
  ],

  // Document-specific dates and identifiers
  "idExpiry": "2020-02-01",
  "idIssued": "1972-11-04",
  "idNumber": "123456789",
  "idSubType": "string",
  "idType": "DRIVERS_LICENCE",
  "manuallyModified": "false",
  "region": "VIC"
}
```

## Managing Scanned Documents in Business Checks

The inclusion of scanned documents in business check results depends on the `documentData` parameter. Here's how to control it:

<AccordionGroup>
  <Accordion title="Default Behavior (No Parameter)">
    * Includes the complete scanned document
    * Use when you need full document access

    ```curl theme={null}
    GET https://api.frankie.one/compliance/v1.2/business/'entityId'/checks
    ```
  </Accordion>

  {" "}

  <Accordion title="Full Document (documentData=full)">
    * Explicitly requests complete scanned document
    * Identical to default behavior `curl GET`
      [https://api.frankie.one/compliance/v1.2/business/'entityId'/checks?documentData=full](https://api.frankie.one/compliance/v1.2/business/'entityId'/checks?documentData=full) <Icon icon="arrow-up-right-from-square" size={12} />

    ````
    </Accordion>

    <Accordion title="Metadata Only (documentData=meta)">
      - Excludes scanned document data
      - Returns only metadata
      - Faster response times
      ```curl
      GET https://api.frankie.one/compliance/v1.2/business/'entityId'/checks?documentData=meta
    ````
  </Accordion>
</AccordionGroup>

<Callout icon="bell" color="#FFCA16" iconType="regular">
  ##### Performance Consideration

  Including full scanned documents increases response times. Use
  `documentData=meta` when you only need metadata for faster results.
</Callout>

## Implementation Steps

<Steps>
  <Step title="Create Organization Entity">
    Create an organization entity using the [Create Entity API](docs/v1/api/kyc-api-endpoints/reference/entity/create-entity)
  </Step>

  <Step title="Upload Document Scan">
    Upload the document scan using the [Create Document API](/docs/v1/api/kyc-api-endpoints/reference/document/create-document)
  </Step>

  <Step title="Verify Ownership">
    Complete ownership verification using the [Business Ownership Query API](/docs/v1/api/kyc-api-endpoints/reference/business/business-ownership-query)
  </Step>

  <Step title="Perform Business Check">
    Execute the business check with your desired `documentData` parameter
  </Step>
</Steps>
