Nhảy tới nội dung

Đồng bộ khách hàng

Lấy ra danh sách khách hàng thêm mới hoặc cập nhật từ thời gian chỉ định đến hiện tại

HTTP Request

[GET] /api/v6/accounts/sync

Query Parameters

Fields

FieldsTypeDescription
idintegerĐịnh danh
account_codestringMã khách hàng
account_namestringTên khách hàng
descriptionstringMô tả
billing_address_streetstringĐịa chỉ
phone_officenumericSố điện thoại khách hàng
emailstringEmail khách hàng
mgr_emailstringEmail quản lý
mgr_display_namestringTên quản lý
websitestringWebsite
logostringẢnh khách hàng
birthdaytimestampSinh nhật
sic_codestringMã số thuế
created_attimestampNgày tạo
account_typestringLoại khách hàng
account_sourcestringNgười hoàn thành
relation_idintegerĐịnh danh mối quan hệ
relation_namestringTên mối quan hệ
genderstringGiới tính
total_revenuefloatTổng doanh thu
contactsarrayCác liên hệ
detail_custom_fieldsobjectCác trường đã định nghĩa

Filtering

FieldsSupportTypeDescription
last_synceqtimestampDùng để lọc những khách hàng được tạo hoặc sửa từ mốc thời gian này đến hiện tại

Sort

Sort (field)Direction
idasc,desc

Limit & Offset

TypeDescription
LimitintegerLấy bao nhiêu bản ghi
OffsetintegerBỏ qua bao nhiêu bản ghi

Example

HTTP Request

GET api/v6/accounts/sync?filtering[last_sync]=1699554513 HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json

Status

200 OK

Response

[
{
"account_id": "1",
"account_code": "BID00001",
"account_name": "Công ty A",
"description": "Công ty A",
"email": "",
"billing_address_street": "2132 Vân Cơ-Thành Phố Việt Trì",
"phone_office": "09443443337",
"logo": "https://xxxx.getflycrm.com/assets/images/noavatar.png",
"website": null,
"relation_id": "23",
"birthday": null,
"account_type": "1,2,3,4",
"account_source": null,
"sic_code": null,
"country_id": "0",
"province_id": "0",
"district_id": "0",
"contacts": [
{
"contact_id": "1",
"first_name": "Tạ Quang Chung",
"last_name": null,
"phone_mobile": null,
"email": "taquangchung041@gmail.com",
"description": "",
"title": "Trưởng Phòng"
}
],
"custom_fields": {
"thuong_hieu": "VN",
"truong_dh": "",
"ten_cong_ty": "",
"email_khach_hang": "",
"ngay_dat_hang": ""
}
}
]