Customer
📄️ List
Get customer information in the system
📄️ Add New
Add a new customer
📄️ Customer Details
View detailed information for a customer
📄️ Edit CustomerEdit existing customer information in the system## Edit customer by ID### HTTP Request[PUT] /api/v6/accounts/{id}### Body Parameters| Parameter | Type | Nullable | Require | Description ||:--------------------------------|:---------:|:--------:|:-------:|:---------------------------|| account_name | string | | | Customer name || email | string | | | Customer email || billing_address_street | string | | | Address || phone_office | numeric | | | 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 || added_contacts | array | | | Added contacts || added_contacts.id | integer | | yes | Contact identifier || added_contacts.first_name | string | | | Contact name || added_contacts.title | string | | | Contact title || added_contacts.phone_home | numeric | | | Contact phone number || added_contacts.birthdate | timestamp | | | Contact birthday || added_contacts.email | string | | | Contact email || added_contacts.gender_id | integer | | | Contact gender || added_contacts.description | string | | | Contact description || added_contacts.email_unsubcribe | bool | | | Unsubscribe from email || added_contacts.is_primary | bool | | | Primary contact || custom_fields | object | | | Custom fields |### ExampleHTTP RequesthttpPUT api/v6/accounts/4 HTTP/1.1Host: example.getflycrm.comContent-Type: application/json{ "account_name": "TEST ACCOUNT API", "custom_fields": { "field_1": 111 // field_1 is the field_name in the custom field list }, "added_contacts": [ { "first_name": "TEST CONTACT API" } ]}Status200 OKResponsejson{ "message": "Successfully updated", "id": 4}## Edit customer by code### HTTP Request[PUT] /api/v6/accounts### Body Parameters| Parameter | Type | Default | Nullable | Require | Description ||:--------------------------------|:---------:|:--------:|:-------:|:---------------------------|| account_code | string | | | Customer code || account_name | string | | | Customer name || email | string | | | Customer email || billing_address_street | string | | | Address || phone_office | numeric | | | 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 || added_contacts | array | | | Added contacts || added_contacts.id | integer | | yes | Contact identifier || added_contacts.first_name | string | | | Contact name || added_contacts.title | string | | | Contact title || added_contacts.phone_home | numeric | | | Contact phone number || added_contacts.birthdate | timestamp | | | Contact birthday || added_contacts.email | string | | | Contact email || added_contacts.gender_id | integer | | | Contact gender || added_contacts.description | string | | | Contact description || added_contacts.email_unsubcribe | bool | | | Unsubscribe from email || added_contacts.is_primary | bool | | | Primary contact || custom_fields | object | | | Custom fields |### ExampleHTTP RequesthttpPUT api/v6/accounts HTTP/1.1Host: example.getflycrm.comContent-Type: application/json{ "account_code": "ACCOUNT_CODE", // Required for update "account_name": "TEST ACCOUNT API",}Status200 OKResponsejson{ "message": "Successfully updated", "id": 4}
Edit customer by ID### HTTP Request[PUT] /api/v6/accounts/### Body Parameters| Parameter | Type | Nullable | Require | Description ||---------------------------------------------------|| accountname | string | | | Customer name || email | string | | | Customer email || billingaddressstreet | string | | | Address || phoneoffice | numeric | | | Phone number || lastcontactname | string | | | Main contact name || lastcontactphone | string | | | Main contact phone || lastcontactemail | string | | | Main contact email || lastcontacttitle | string | | | Main contact title || lastcontactbirthdate | timestamp | | | Main contact birthday || accountmanager | integer | | yes | Customer manager |\| accounttype | integer[] | | | Customer group |\| accountsource | integer[] | | | Customer source |\| website | string | | | Website || birthday | timestamp | | | Birthday || industry | integer[] | | | Business industry || relationid | integer | | yes | Relationship || phonefax | string | | | Fax number || countryid | integer | | yes | Country || provinceid | integer | | yes | Province/City || districtid | integer | | yes | District || gender | integer | | yes | Gender || description | string | | | Description || siccode | string | | | Tax code || publishercode | string | | | Referral code || isprivate | bool | | | Private customer || iscreatecare | bool | | | Option to create care schedule || relateduserids | integer[] | | | Related users || referrertype | string | | | Referral type || referrerref | integer | | yes | Referrer || contacts | array | | | Customer contacts || contacts.id | integer | | yes | Contact identifier || contacts.firstname | string | | | Contact name || contacts.title | string | | | Contact title || contacts.phonehome | numeric | | | Contact phone number || contacts.birthdate | timestamp | | | Contact birthday || contacts.email | string | | | Contact email || contacts.genderid | integer | | | Contact gender || contacts.description | string | | | Contact description || contacts.emailunsubcribe | bool | | | Unsubscribe from email || contacts.isprimary | bool | | | Primary contact || addedcontacts | array | | | Added contacts || addedcontacts.id | integer | | yes | Contact identifier || addedcontacts.firstname | string | | | Contact name || addedcontacts.title | string | | | Contact title || addedcontacts.phonehome | numeric | | | Contact phone number || addedcontacts.birthdate | timestamp | | | Contact birthday || addedcontacts.email | string | | | Contact email || addedcontacts.genderid | integer | | | Contact gender || addedcontacts.description | string | | | Contact description || addedcontacts.emailunsubcribe | bool | | | Unsubscribe from email || addedcontacts.isprimary | bool | | | Primary contact || customfields | object | | | Custom fields |### ExampleHTTP Request`httpPUT api/v6/accounts/4 HTTP/1.1Host application/json{ "accountname" { "field1" [ { "firstname" "Successfully updated", "id"--------------------------------|||| example.getflycrm.comContent-Type "ACCOUNTCODE", // Required for update "account_name" "Successfully updated", "id": 4}`
📄️ Delete Customer
Allows deleting a customer from the system
📄️ Restore Customer
Restore a deleted customer
📄️ Change Manager
Change the customer's manager
📄️ Customer Groups
Get a list of customer groups in the system
📄️ Add New
Create new customer group
📄️ Edit Customer Group
Edit customer group by ID
📄️ Delete Customer
Delete customer group
📄️ Business Sector
Get a list of business sectors
📄️ Relationships
Get a list of customer relationships
📄️ Customer Sources
Get a list of customer sources
📄️ Order Status
Count the number of orders for a customer by status
📄️ Data DefinitionAdditional data fields for the customer module### HTTP Request[GET] /api/v6/accounts/custom_fields### Query Parameters#### Fields| Fields | Type | Description ||:------------------|---------|:-------------|| id | integer | Identifier || field_name | string | Field name || field_description | string | Field description || field_htmltype | string | Field type |#### Filtering| Fields | Support | Type | Description ||:-------|:--------|:-------:|-:---------------------|| id | eq,in | integer | Customer identifier || valid | is,in | integer | Valid or not |#### Sort| Sort (field) | Direction |\|:-------------|-----------|\| id | asc,desc |\#### Limit & Offset| | Type | Description |\|:-------|---------|--------------------------|\| Limit | integer | Number of records to retrieve |\| Offset | integer | Number of records to skip |\### ExampleHTTP RequesthttpGET api/v6/accounts/custom_fields HTTP/1.1Host: example.getflycrm.comContent-Type: application/jsonStatus200 OKResponsejson[ { "field_id": 1, "field_htmltype": "select", "field_name": "country_id", "field_description": "Country" }]
HTTP Request[GET] /api/v6/accounts/customfields### Query Parameters#### Fields| Fields | Type | Description ||-------------|| id | integer | Identifier || fieldname | string | Field name || fielddescription | string | Field description || fieldhtmltype | string | Field type |#### Filtering| Fields | Support | Type | Description ||--------||--------------|-----------|\| id | asc,desc |\#### Limit & Offset| | Type | Description |\| example.getflycrm.comContent-Type 1, "fieldhtmltype" "countryid", "fielddescription": "Country" }]`
📄️ Sync Customers
Get a list of newly added or updated customers from a specified time to the present
📄️ Sync Deleted Customers
Sync deleted customers from a specified time to the present
📄️ Customer Exchange
List of customer exchanges, feedback