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

# Overview

> A customer is an individual or company that buys goods or services from a business. Commonly referred to a customer on a corresponding invoice

**The Customer Data Model** simplifies the handling and retrieval of customer-related information across various payments platforms.

* Unified customer properties: The model unifies essential customer details, such as name, customer person, currency, and tax number, enabling easier access and management of customer data from different platforms.
* Comprehensive customer information: Customer can include associated data like phone numbers, addresses, and external links for a more detailed representation of each customer.
* Status tracking: The model supports tracking the status of each customer, with values like `ACTIVE`, `ARCHIVED`, and `UNKNOWN`, facilitating better organisation and reporting.

## Attributes

### Customer Attributes

| Property             | Type          | Description                                                                 |
| -------------------- | ------------- | --------------------------------------------------------------------------- |
| rootfi\_id           | integer       | The RootFi ID of the customer                                               |
| rootfi\_created\_at  | string        | The ISO 8601 timestamp at which the record was created in RootFi            |
| rootfi\_updated\_at  | string        | The ISO 8601 timestamp at which the record was last updated in RootFi       |
| rootfi\_company\_id  | integer       | The RootFi company ID associated with the customer                          |
| platform\_id         | string        | The Platform's ID for the customer                                          |
| platform\_unique\_id | string        | The platform's unique identifier for the customer                           |
| name                 | string        | Name of the customer on the platform                                        |
| created\_at          | string        | The ISO 8601 timestamp at which the data was created on the platform        |
| tax\_number          | string        | Customer's tax number (i.e. GST, EIN, VAT)                                  |
| currency\_id         | string        | The currency id of the customer                                             |
| updated\_at          | string        | The ISO 8601 timestamp at which the information was updated on the platform |
| external\_links      | External Link | The external links associated with the customer                             |
| phone\_numbers       | Phone Number  | The phone numbers associated with the customer                              |
| addresses            | Address       | The addresses associated with the customer                                  |

### Address Attributes

| Property             | Type        | Description                                             |
| -------------------- | ----------- | ------------------------------------------------------- |
| rootfi\_id           | integer     | The RootFi ID of the address                            |
| platform\_id         | string      | The Platform's ID for the address                       |
| platform\_unique\_id | string      | The platform's unique identifier for the address        |
| type                 | AddressType | The type of address (SHIPPING, BILLING, COMPANY)        |
| data\_model\_id      | string      | The ID of the parent data model this address belongs to |
| street               | string      | The street address                                      |
| locality             | string      | The locality or neighborhood                            |
| city                 | string      | The city                                                |
| state                | string      | The state or province                                   |
| pincode              | string      | The postal or zip code                                  |
| country              | string      | The country                                             |

### Phone Number Attributes

| Property     | Type              | Description                                       |
| ------------ | ----------------- | ------------------------------------------------- |
| rootfi\_id   | integer           | The RootFi ID of the phone number                 |
| platform\_id | string            | The Platform's ID for the phone number            |
| number       | string            | The phone number                                  |
| type         | ContactNumberType | The type of phone number (MOBILE, TELEPHONE, FAX) |

### External Link Attributes

| Property     | Type             | Description                                |
| ------------ | ---------------- | ------------------------------------------ |
| rootfi\_id   | integer          | The RootFi ID of the external link         |
| platform\_id | string           | The Platform's ID for the external link    |
| link         | string           | The URL or email address                   |
| type         | ExternalLinkType | The type of external link (WEBSITE, EMAIL) |

## Properties Supported

| Property        | Type          | Description                                                                 |
| --------------- | ------------- | --------------------------------------------------------------------------- |
| platform\_id    | string        | The Platform's ID for the customer                                          |
| name            | string        | Name of the customer on the platform                                        |
| created\_at     | string        | The ISO 8601 timestamp at which the data was created                        |
| tax\_number     | string        | Customer's tax number (i.e. GST, EIN, VAT)                                  |
| currency\_id    | string        | The currency id of the customer                                             |
| updated\_at     | string        | The ISO 8601 timestamp at which the information was updated on the platform |
| external\_links | External Link | The external links associated with the customer                             |
| phone\_numbers  | Phone Number  | The phone numbers associated with the customer                              |
| addresses       | Address       | The addresses associated with the customer                                  |

<ResponseExample name="The Customer Object">
  ```json The Customer Response Object theme={null}
  {
    "rootfi_id": 157,
    "rootfi_created_at": "2024-01-22T05:07:31.465Z",
    "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
    "rootfi_company_id": 1089,
    "platform_id": "123456",
    "created_at": "2024-01-22T05:07:31.465Z",
    "updated_at": "2024-01-22T05:07:31.465Z",
    "name": "John Doe",
    "tax_number": "1234567890",
    "currency_id": "1234567890",
    "external_links": [
      {
        "rootfi_id": 278264,
        "platform_id": "CONTACTS_1af68894-ea9f-ee11-be36-7c1e520f50bc_WEBSITE",
        "link": "https://www.google.com",
        "type": "WEBSITE"
      }
    ],
    "phone_numbers": [
      {
        "rootfi_id": 278264,
        "platform_id": "CONTACTS_1af68894-ea9f-ee11-be36-7c1e520f50bc_PHONE",
        "number": "1234567890",
        "type": "MOBILE"
      }
    ],
    "addresses": [
      {
        "rootfi_id": 278264,
        "platform_id": "CONTACTS_1af68894-ea9f-ee11-be36-7c1e520f50bc_ADDRESS",
        "platform_unique_id": "123456",
        "type": "BILLING",
        "data_model_id": "123456",
        "street": "123 Main Street",
        "locality": "Main Street",
        "city": "New York",
        "state": "New York",
        "pincode": "123456",
        "country": "USA"
      }
    ]
  }
  ```
</ResponseExample>
