Customer Details
1. Overview
This API is used to retrieve detailed customer information from the CRM system.
- Endpoint:
/api/v6.1/account?fields=....
- Method:
GET
- Authentication:
X-API-KEY
must be sent in the header
2. Request
curl --location 'https://linhpq.getflycrm.com/api/v6.1/account?account_code=KH%2F2025%2F011987&fields=id%2Caccount_code%2Caccount_name%2Cdescription%2Cbilling_address_street%2Cphone_office%2Cemail%2Cmgr_email%2Cmgr_display_name%2Cwebsite%2Clogo%2Cbirthday%2Csic_code%2Ccreated_at%2Cupdated_at%2Caccount_type%2Caccount_source%2Crelation_id%2Crelation_name%2Cgender%2Ctotal_revenue%2Ccontacts%2Cdetail_custom_fields%2Ccountry_name%2Cindustry_names%2Ccountry_id%2Cprovince_id%2Cdistrict_id%2Cward_id%2Cindustry%2Caccount_manager%2Caccessible_user_ids%2Caccount_type_details%2Ccountry_detail%2Cprovince_detail%2Cdistrict_detail%2Cward_detail%2Cgender_detail%2Caccount_source_details%2Cindustry_details%2Caccount_relation_detail' \
--header 'X-API-KEY: ADP8QgZR2f0ddxxxxxxxxxxxxxxxxxxxxx' \
--data ''
2.1. Headers
Name | Type | Description |
---|---|---|
X-API-KEY | String | API Key for authentication |
2.2. Query Parameters
Field | Type | Description |
---|---|---|
account_code | string | Customer code |
fields | string | List of data fields to retrieve |
3. Response
3.1. Description of Data Fields
Field | Type | Description |
---|---|---|
id | integer | Customer identifier |
account_code | string | Customer code |
account_name | string | Customer name |
description | string | Detailed customer description |
billing_address_street | string | Customer address |
phone_office | string | Office phone number |
email | string | Customer email |
mgr_email | string | Customer manager's email |
mgr_display_name | string | Manager's display name |
website | string | Customer's website |
logo | string | Customer logo URL |
birthday | timestamp | Customer's birthday |
sic_code | string | Customer tax code |
created_at | timestamp | Customer account creation date |
updated_at | timestamp | Last update date |
account_type | array | List of customer types (ID) |
account_source | array | List of customer sources (ID) |
relation_id | integer | Customer relationship ID |
relation_name | string | Customer relationship name |
gender | integer | Customer gender (1: Male, 2: Female, 3: Other) |
total_revenue | numeric | Total customer revenue |
country_name | string | Customer's country |
province_id | integer | Province/City ID |
district_id | integer | District ID |
ward_id | integer | Ward ID |
industry | array | List of industries (ID) |
account_manager | integer | Customer manager ID |
detail_custom_fields | object | Custom information fields added by the system or user |
contacts | array | List of customer contact information |
account_type_details | array | Details about customer types (ID & Name) |
account_source_details | array | Details about customer sources (ID & Name) |
industry_details | array | Details about customer industries (ID & Name) |
account_relation_detail | object | Detailed information about customer relationship |
gender_detail | object | Detailed information about customer gender |
country_detail | object | Customer's country details |
province_detail | object | Customer's province/city details |
district_detail | object | Customer's district details |
ward_detail | object | Customer's ward details |
3.2. JSON Response Structure
{
"id": 12037,
"account_code": "KH/2025/011987",
"account_name": "Customer Name",
"description": "",
"billing_address_street": "",
"phone_office": "",
"email": "",
"mgr_email": "[email protected]",
"mgr_display_name": "Manager Name",
"website": "",
"logo": "",
"birthday": null,
"sic_code": "",
"created_at": "2025-02-25 09:12:32",
"updated_at": "2025-03-06 17:34:43",
"account_type": [1,5,7,6],
"account_source": [3,5,6],
"relation_id": 4,
"relation_name": "Potential",
"gender": 3,
"total_revenue": 450000,
"country_name": "Vietnam",
"country_id": 1,
"province_id": 1,
"district_id": 3,
"ward_id": 86,
"industry": [2,4,7],
"account_manager": 2,
"detail_custom_fields": {
"disbursement_date": "1736182800",
"Signature": "",
"Order_Code": "",
"Interview_Date": null,
"serial_number": "",
"invoice_address": "",
"branch": ""
},
"contacts": [
{
"id": 9803,
"account_id": 12037,
"first_name": "Contact Name",
"phone_home": "",
"email": "",
"is_primary": 1
}
],
"account_type_details": [
{"id": 1, "label": "Hype"},
{"id": 5, "label": "Difficult"}
],
"account_source_details": [
{"id": 3, "label": "Ladipage"},
{"id": 6, "label": "Self-sourced"}
],
"industry_details": [
{"id": 2, "label": "Garment"},
{"id": 4, "label": "Startup"}
],
"account_relation_detail": {"id": 4, "label": "Potential"},
"gender_detail": {"id": 3, "label": "Other"},
"country_detail": {"id": 1, "label": "Vietnam"},
"province_detail": {"id": 1, "label": "Hanoi"},
"district_detail": {"id": 3, "label": "Hai Ba Trung"},
"ward_detail": {"id": 86, "label": "Ward XYZ"}
}