Cho phép sử dụng Alice từ ứng dụng thứ 3. Yêu cầu bắc buộc đã đăng ký và trial alice từ onboarding antbuddy.
Cho phép chạy chiến dịch từ ứng dụng thứ 3.
Tạo alarm cho 1 liên hệ (appointment)
Tất cả API request tới hệ thống Alice:
Thông qua tên miền
https://alice.antbuddy.com/rest-api
authorize header bắt buộc:
Authorization: Bearer {access_token}
Endpoint: /get-token/Method: POSTBody: {"username": "username","password": "password"}Description:Username: tên hoặc email đã tạo bên antbuddyPassword: mật khẩu
Mẫu khảo sát (endpoint: /rest-api/survey-template/)
Create-template:Method: POSTParams: {"name": String (Tên mẫu khảo sát),"tts_language": "vi",}
Section template (endpoint: /rest-api/section-template/)
Create section:Method: POSTBody: {"type": 1,"survey": ID of survey,"question": String (tên section),"script": Text (nội dụng ivr)}Update section:Endpoint: /rest-api//section-template/{id}/Method: PUTBody {"script" : "Vui lòng đợi trong giây lát."}
Create: /rest-api/phonebook/Method: POSTBody: {"name": String (required),"description": "rest phonebook" (option)}Update: /rest-api/phonebook/{id}/Method: PUTBody: {"Name": “changed name”,"description": “updated descrption"}
Contact (endpoint: /rest-api/contact/)
Create single contact
Create: /rest-api/contact/Method: POSTBody: {"phonebook": {phonebook_id} (required),"contact": "0934890883" (required),"email": "linh.huynh@htklabs.com" (option),"last_name": "Huynh" (option),"first_name": "Linh" (option),"description": "khách hàng ABC" (option),"status": 1 or 0 (1: active, 0: inactivate) (required)}Update: /rest-api/contact/{id}/Method: PUTBody: {"contact": "0934890884","status": 1,"country": "VN","first_name": "A","last_name": "B"}
Create multiple contact (endpoint: /rest-api/bulkcontact/)
EndPoint: /rest-api/bulkcontact/Method: POSTBody: {"phonebook": 293,"contacts": [{"contact": "0934890883","email": "linh.huynh@htklabs.com","last_name": "Huynh","first_name": "Linh","status": 1},{"contact": "0934890881","email": "linh.huynh@htklabs.com","last_name": "Huynh","first_name": "Linh","status": 1}]}
Gateway List (Endpoint: /rest-api/gateway/)Method: GETResponse: {"results": [{"id": 23,"name": "AliceDevGateway","status": 1,"description": "AliceDevGateway","addprefix": "","removeprefix": "","gateways": "sofia/gateway/AliceDevGateway/","subdomain": "company","gateway_codecs": "","gateway_timeouts": "10","gateway_retries": "","originate_dial_string": "","secondused": null,"created_date": "2019-12-26T04:17:12.673711Z","updated_date": "2020-01-14T03:12:27.079710Z","addparameter": "","count_call": 0,"count_in_use": null,"maximum_call": null,"is_trial": true,"failover": null}]}
Endpoint: /rest-api/campaigns/Method: POSTBody Example:{"name": "rest-api-cp-2""description": "rest api for campaign","callerid": "lh","phonebook": [293],"aleg_gateway": 23,"object_id": 351,"frequency": 10,"startingdate": "2020-02-11T02:36:39.045000Z","expirationdate": "2020-02-12T02:36:39.045000Z","daily_start_time": "08:00:00","daily_stop_time": "21:00:00"}Description:- name: required,- description: rest api for campaign (option),- callerid: caller name when callout (option),- phonebook: phone book IDs list (required),- aleg_gateway:gateway dialout (required),- object_id: survey template application (required),- frequency: call per minute (required),- startingdate: Starting date campaign (required),- expirationdate: Stopped date campaign (required),- daily_start_time: dialy time (required),- daily_stop_time: dialy ending time(required)
Endpoint: /rest-api/campaigns/{id}/Method: PUTBody:{"name": "rest-api-cp-2","description": "rest api for campaign","callerid": "rest_api","phonebook": [293],"frequency": 3,"startingdate": "2020-02-11T02:36:39.045000Z","expirationdate": "2020-02-12T02:36:39.045000Z","daily_start_time": "09:00:00","daily_stop_time": "18:00:00"}
Endpoint: /rest-api/campaigns/{id}/status/Method: POSTBody: {"status": 1,}Description:START = 1PAUSE = 2ABORT = 3END = 4
Endpoint: /rest-api/survey-list/Method: GETResponse:{"results": [{"id": 953,"campaign": {"id": 1008,"name": "rest-api-cp-2","status": 4},"name_full": "linhhv-sv-api : rest-api-cp-2","name": "linhhv-sv-api","tts_language": "vi","description": null,"is_onboarding": false,"created_date": "2020-02-11T02:32:34.971249Z","updated_date": "2020-02-11T02:32:34.971283Z","user": 1}]}
Endpoint: /rest-api/calendar-setting/Method: POSTBody: {"label": "rest-api-cp-2","callerid": "mantest_calendarsettings","caller_name": "","call_timeout": 60,"survey": 953,"aleg_gateway": 23}Description:- label: tên (required),- callerid: caller hiển thị (option),- caller_name: tên người gọi (option),- call_timeout: thời gian cuộc gọi timeout bằng giây (required),- survey": id của khảo sát (required), get from Survey List API- aleg_gateway: cổng nối gọi ra (required),Get from Gateway List API
Endpoint: /rest-api/calendar-user/Method: POSTBody:{"username": "cal-rest-user-resp2","password": "12345678" - required,"calendar_setting": 4 - required}Description:- username: user login (required)- calendar_setting: Calendar setting,GET from calendar-setting API
Endpoint: /rest-api/calendar/Method: POSTBody: {"name": "linh-calendar-rest","user": 5 - required}Description:- name: required- user: Calendar User List,Get from calendar-user API
Endpoint: /rest-api/event/Method: POSTBody: {"title": "today-linhhv","description": "","start": "2020-02-15T09:30:39.177000Z","end": "2020-02-15T10:13:39.177000Z","creator": 115,"calendar": 7}Description:- title: Tên sự kiện (required)- start: Thời gian bắt đầu (required)- end: Thời gian kết thúc (required)- creator: calendar user được gắn vào,được lấy từ calendar-user API- calendar: Lịch gắn vô sự kiện,được lấy từ calendar API
Endpoint: /rest-api/alarm/Method: POSTBody:{"alarm_phonenumber": "0934890883","date_start_notice": "2020-02-12T02:49:33.572Z","phonenumber_transfer": "","event": 8}Description:- alarm_phonenumber: call to number (required),- date_start_notice: starting date alarm - (option- default current time),- phonenumber_transfer: phone to transfer (option),- event: related event (required), event list get from event API, method Get