Add New
Add a new customer
HTTP Request
[POST] /api/v6/accounts
Body
| Parameter | Type | Nullable | Require | Description |
|---|---|---|---|---|
| account_code | string | Customer code | ||
| account_name | string | Customer name | ||
| string | Customer email | |||
| billing_address_street | string | Address | ||
| phone_office | string | Phone number | ||
| last_contact_name | string | Main contact name | ||
| last_contact_phone | string | Main contact phone | ||
| last_contact_email | string | Main contact email | ||
| last_contact_title | string | Main contact title | ||
| last_contact_birthdate | timestamp | Main contact birthday | ||
| account_manager | integer | yes | Customer manager | |
| account_type | integer[] | Customer group | ||
| account_source | integer[] | Customer source | ||
| website | string | Website | ||
| birthday | timestamp | Birthday | ||
| industry | integer[] | Business industry | ||
| relation_id | integer | yes | Relationship | |
| phone_fax | string | Fax number | ||
| country_id | integer | yes | Country | |
| province_id | integer | yes | Province/City | |
| district_id | integer | yes | District | |
| gender | integer | yes | Gender | |
| description | string | Description | ||
| sic_code | string | Tax code | ||
| publisher_code | string | Referral code | ||
| is_private | bool | Private customer | ||
| is_create_care | bool | Option to create care schedule | ||
| related_user_ids | integer[] | Related users | ||
| referrer_type | string | Referral type | ||
| referrer_ref | integer | yes | Referrer | |
| contacts | array | Customer contacts | ||
| contacts.id | integer | yes | Contact identifier | |
| contacts.first_name | string | Contact name | ||
| contacts.title | string | Contact title | ||
| contacts.phone_home | numeric | Contact phone number | ||
| contacts.birthdate | timestamp | Contact birthday | ||
| contacts.email | string | Contact email | ||
| contacts.gender_id | integer | Contact gender | ||
| contacts.description | string | Contact description | ||
| contacts.email_unsubcribe | bool | Unsubscribe from email | ||
| contacts.is_primary | bool | Primary contact | ||
| custom_fields | object | Custom fields |
custom_fields can be retrieved from API custom fields list
Example
HTTP Request
POST api/v6/accounts HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"account_name": "TEST ACCOUNT API",
"custom_fields": {
"field_1": 111 // field_1 is the field_name in the custom field list
},
"contacts": [
{
"first_name": "TEST CONTACT API"
}
]
}
Status
200 OK
Response
{
"message": "Successfully added",
"id": 4
}