Nhân viên

Quản lý nhân viên

Danh sách nhân viên (v1)

GET [URL]/api/agent/list

Danh sách nhân viên của doanh nghiệp

Query Parameters

Name
Type
Description

page

integer

Page (mặc định là 1)

size

integer

Size (kích thước trang) : mặc định là 50

keyword

string

Từ khóa tìm kiếm

  • Họ và tên

  • Email

  • SĐT

Headers

Name
Type
Description

Content-Type

string

Application/json

Authorization

string

Bearer “Access Token"

{
    "instance_id": "stg",
    "payload": {
        "next_page": 1,
        "page_number": 1,
        "has_previous": false,
        "has_next": false,
        "total_pages": 1,
        "previous_page": 1,
        "items": [
            {
                "_id": "66fdff73b169e8022fd6b87d",
                "create_by": {
                    "name": "SenBac"
                },
                "last_update_by": {
                    "name": "SenBac"
                },
                "created_date": 1727922035472,
                "last_updated_date": 1730600371615,
                "public_id": null,
                "contact_type": "agent",
                "tags_view": [],
                "is_deleted": false,
                "tags": [],
                "is_active": false,
                "identify_info": "[email protected]",
                "user_owner_email": null,
                "attribute_structure": [
                    {
                        "identify": null,
                        "field_code": "full_name",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "[email protected]",
                                "data_type": "single_text",
                                "value_type": null
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "mail",
                        "field_type": "email",
                        "value": [
                            {
                                "display_value": "[email protected]",
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "gender",
                        "field_type": "radio",
                        "value": [
                            {
                                "display_value": "male",
                                "data_type": "male",
                                "value_type": "Nam"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "phone_number",
                        "field_type": "phone",
                        "value": [
                            {
                                "display_value": null,
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    }
                ]
            },
            {
                "_id": "63e0aac51c93793a69bc68e7",
                "create_by": {
                    "name": "SenBac"
                },
                "last_update_by": {
                    "name": "SenBac"
                },
                "created_date": 1675668165219,
                "last_updated_date": 1731574217198,
                "public_id": null,
                "contact_type": "agent",
                "tags_view": [],
                "is_deleted": false,
                "tags": [],
                "is_active": true,
                "identify_info": "[email protected]",
                "user_owner_email": null,
                "attribute_structure": [
                    {
                        "identify": null,
                        "field_code": "full_name",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "demo2",
                                "data_type": "single_text",
                                "value_type": null
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "mail",
                        "field_type": "email",
                        "value": [
                            {
                                "display_value": "[email protected]",
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "gender",
                        "field_type": "radio",
                        "value": [
                            {
                                "display_value": "male",
                                "data_type": "male",
                                "value_type": "Nam"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "phone_number",
                        "field_type": "phone",
                        "value": [
                            {
                                "display_value": null,
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    }
                ]
            },
            {
                "_id": "639da0530b7fdf4be37e240b",
                "create_by": {
                    "name": "SenBac"
                },
                "last_update_by": {
                    "name": "SenBac"
                },
                "created_date": 1671274579738,
                "last_updated_date": 1727922367283,
                "public_id": null,
                "contact_type": "agent",
                "tags_view": [],
                "is_deleted": false,
                "tags": [],
                "is_active": true,
                "identify_info": "[email protected]",
                "user_owner_email": null,
                "attribute_structure": [
                    {
                        "identify": null,
                        "field_code": "full_name",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "demo1",
                                "data_type": "single_text",
                                "value_type": null
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "mail",
                        "field_type": "email",
                        "value": [
                            {
                                "display_value": "[email protected]",
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "gender",
                        "field_type": "radio",
                        "value": [
                            {
                                "display_value": "male",
                                "data_type": "male",
                                "value_type": "Nam"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "phone_number",
                        "field_type": "phone",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "",
                                "value_type": "personal"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "avatar",
                        "field_type": "image",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "job_title",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "single_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "passport",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "single_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "address",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "single_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "more_infomation",
                        "field_type": "customize",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "customize",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "note",
                        "field_type": "multi_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "multi_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "birthday",
                        "field_type": "date",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "date",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "attach_file",
                        "field_type": "file",
                        "value": []
                    }
                ]
            },
            {
                "_id": "639202a8bf054d579109b35d",
                "create_by": {
                    "name": "senbac"
                },
                "last_update_by": {
                    "name": "Nguyễn Văn A"
                },
                "created_date": 1670513320008,
                "last_updated_date": 1742890751729,
                "public_id": null,
                "contact_type": "agent",
                "tags_view": [],
                "is_deleted": false,
                "tags": [],
                "is_active": true,
                "identify_info": "[email protected]",
                "user_owner_email": null,
                "attribute_structure": [
                    {
                        "identify": null,
                        "field_code": "full_name",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "SenBac",
                                "data_type": "single_text",
                                "value_type": null
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "mail",
                        "field_type": "email",
                        "value": [
                            {
                                "display_value": "[email protected]",
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "gender",
                        "field_type": "radio",
                        "value": [
                            {
                                "display_value": "male",
                                "data_type": "male",
                                "value_type": "Nam"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "phone_number",
                        "field_type": "phone",
                        "value": [
                            {
                                "display_value": "0211111111",
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    }
                ]
            },
            {
                "_id": "6391feb0ae476f37c75ec261",
                "create_by": {
                    "name": "senbac"
                },
                "last_update_by": {
                    "name": "SenBac"
                },
                "created_date": 1670512304329,
                "last_updated_date": 1721664269129,
                "public_id": null,
                "contact_type": "agent",
                "tags_view": [],
                "is_deleted": false,
                "tags": [],
                "is_active": true,
                "identify_info": "[email protected]",
                "user_owner_email": null,
                "attribute_structure": [
                    {
                        "identify": null,
                        "field_code": "full_name",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "demo",
                                "data_type": "single_text",
                                "value_type": null
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "mail",
                        "field_type": "email",
                        "value": [
                            {
                                "display_value": "[email protected]",
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "gender",
                        "field_type": "radio",
                        "value": [
                            {
                                "display_value": "male",
                                "data_type": "male",
                                "value_type": "Nam"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "phone_number",
                        "field_type": "phone",
                        "value": [
                            {
                                "display_value": "0211111111",
                                "data_type": "personal",
                                "value_type": "Cá nhân"
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "avatar",
                        "field_type": "image",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "job_title",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "single_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "passport",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "single_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "address",
                        "field_type": "single_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "single_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "more_infomation",
                        "field_type": "customize",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "customize",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "note",
                        "field_type": "multi_text",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "multi_text",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "birthday",
                        "field_type": "date",
                        "value": [
                            {
                                "display_value": "",
                                "data_type": "date",
                                "value_type": ""
                            }
                        ]
                    },
                    {
                        "identify": null,
                        "field_code": "attach_file",
                        "field_type": "file",
                        "value": []
                    }
                ]
            }
        ],
        "total_items": 5,
        "page_size": 5
    },
    "instance_version": "1.2.164",
    "key_enabled": false,
    "status_code": 9999
}

Mời nhân viên

POST [URL]/api/agent/invite

Mời nhân viên sử dụng tổng đài

Headers

Name
Type
Description

Content-Type

string

Application/json

Authorization

string

Bearer “Access Token"

Request Body

Name
Type
Description

owner_email

string

Email nhân viên phụ trách

role_name

string

Quyền . Mặt định là Sale - Sale - Trưởng nhóm sale - Trưởng phòng Kinh Doanh - Kế toán - Giám đốc

password

string

Mật khẩu đăng nhập, khởi tạo ban đầu

identify_info

string

Email định danh

full_name

string

Họ và tên nhân viên

uuid

string

Mã user định danh từ bên thứ 3

call_timeout

string

Thời gian chờ của nhân viên khi cuộc gọi chuyển tiếp tới

target_forward

Object

Kịch bản khi nhân viên không nghe máy hoặc không trực tuyến

{

"target_value":"",

"target_type":""

}

target_value : ID của thành phần

target_type : Một trong các Type sau :

greeting : Lời chào báo bận

Mã lỗi
Mô tả

full_name_is_required

Họ và tên là bắt buộc

identify_info_invalid

Email không hợp lệ

password_invalid

Mật khẩu không hợp lệ , Mật khẩu bao gồm

  • Ít nhất 8 ký tự

  • Ký tự in hoa, in thường

  • Số và ký tự đặc biệt

role_is_required

Quyền là bắt buộc

agent_exists

Nhân viên đã tồn tại

limit_agent

Vượt quá giới hạn gói dịch vụ

invite_error

Có lỗi xảy ra khi invite

agent_uuid_exists

Nhân viên có mã uuid đã tồn tại trước đó

Xóa nhân viên

DELETE [URL]/api/agent/delete?identify_info=

Path Parameters

Name
Type
Description

Content-Type

string

Application/json

Authorization

string

Bearer “Access Token"

Query Parameters

Name
Type
Description

identify_info

string

Email nhân viên

Danh sách nhân viên (v2)

POST [URL]/api/agent/list_v2?page=1&size=15

Danh sách nhân viên của doanh nghiệp

Path Parameters

Name
Type
Description

Content-Type

string

Application/json

Authorization

string

Bearer “Access Token"

Response

Mời nhân viên (V2)

POST [URL]/api/agent/invite_with_package_v2

Mời nhân viên sử dụng tổng đài có liên kết gói v2

Headers

Name
Type
Description

Content-Type

string

Application/json

Authorization

string

Bearer “Access Token"

Request body

Name
Type
Description

owner_email

string

Email nhân viên phụ trách

(nếu bỏ trống sẽ gán mặc định chủ doanh nghiệp)

password

string

Mật khẩu tối thiểu 8 kí tự, ít nhất 1 ký tự IN HOA, ít nhất 1 chữ số [0-9]

identify_info

string

Email nhân viên

full_name

string

Tên nhân viên

service_package_id

string

Id gói nhân viên v2

role_name

string

Phân quyền (nếu bỏ trống mặc định là quyền Sale mặc định)

Response

Last updated