Skip to main content

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)

ParameterTypeDefaultRequireDescription
account_namestringyesCustomer Name
phone_officestringPhone Number
emailstringEmail
genderintGender (1: Female, 2: Male)
billing_address_streetstringAddress
birthdaystringDate of Birth (d/m/Y)
account_typestringCustomer Group (If multiple groups, separate with ',')
industryintBusiness Industry
country_idintCountry ID
province_idintProvince/City ID
district_idintDistrict ID

Description of contact person (contacts)

ParameterTypeDefaultRequireDescription
first_namestringyesContact Name
emailstringEmail
phone_homestringContact Phone Number
titlestringContact 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
}
}