Add New
Add a new customer
HTTP Request
POST /api/v3/account
The transmitted data consists of 3 parts:
- account: Customer information (Name, Phone Number, Email, Gender, Address, Date of Birth, Customer Group, Business Industry)
- contacts: An array containing contact information for that customer, including (Name, Email, Phone Number)
- referer: The source from which the customer came
- custom_fields: Additional defined data, please refer to the Custom Fields section
tip
The account
data is required. Information about contacts
and referer
should not be transmitted if it does not exist.
Description of customer information (account)
Parameter | Type | Default | Require | Description |
---|---|---|---|---|
account_name | string | yes | Customer Name | |
phone_office | string | Phone Number | ||
string | ||||
gender | int | Gender (1: Female, 2: Male) | ||
billing_address_street | string | Address | ||
birthday | string | Date of Birth (d/m/Y) | ||
account_type | string | Customer Group (If multiple groups, separate with ',') | ||
industry | int | Business Industry | ||
country_id | int | Country ID | ||
province_id | int | Province/City ID | ||
district_id | int | District ID |
Description of contact person (contacts)
Parameter | Type | Default | Require | Description |
---|---|---|---|---|
first_name | string | yes | Contact Name | |
string | ||||
phone_home | string | Contact Phone Number | ||
title | string | Contact Title |
Description of the person who defines the data to be transmitted (custom_fields)
The data transmitted is an array of data including {key: value}
where
- key: is the field_name in the data definition
- value: the value to be saved. There are 2 special cases to note
tip
- For data of type select, it is
list_option_id
- For data of type checkbox, there are 2 values
(0 and 1)
corresponding to(false, true)
Body
{
"account": {
"account_name": "GetFly CRM",
"phone_office": "0944344333",
"email": "[email protected]",
"gender": 1,
"billing_address_street": "107 Vinh Hung, Hoang Mai, Hanoi",
"birthday": "14/12/1984",
"account_type": 1,
"industry": "2,3",
"country_id": 1,
"province_id": 1,
"district_id": 1
},
"contacts": [
{
"first_name": "Vu Hoang Duy",
"email": "[email protected]",
"phone_home": "0944344333",
"title": "Director"
},
{
"first_name": "Nguyen Dinh Dat",
"email": "[email protected]",
"phone_home": "",
"title": "Employee"
}
],
"referrer": {
"utm_source": "https://getfly.vn",
"utm_campaign": "GetflyWebsite"
},
"custom_fields": {
"ngay_ky_hd": "14/12/1984",
"so_thich": 41
}
}