Skip to main content

Đồ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.1/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_sourcestringNguồn khách hàng
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.1/accounts/sync?filtering[last_sync]=1699554513 HTTP/1.1
Host: example.getflycrm.com

Status

200 OK

Response

{
"data": [
{
"id": 1,
"account_code": "KH/2025/000001",
"account_name": "Công ty A",
"email": "[email protected]",
"phone_office": "09443443337",
"created_at": "2025-01-15 10:30:00",
"updated_at": "2025-03-10 14:22:00"
}
],
"has_more": false,
"offset": 0,
"limited": 20
}