getcalllist
POST v1/reporting/getcalllist#
With this API, you can access the list of calls (video / voice) made through Diyalog between two dates. The employee ID and/or customer number can also be added as parameters.
Each request returns a maximum of 20 items, sorted by date from newest to oldest.
There may be more than 20 items between the two dates given to the API. In this case, the 20 most recent online helps are returned. To get the other items in the date range, take the date of the oldest item (the last item) in the API response and call the API again with this date.
API requests
- Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
- API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/reporting/getcalllist
- HTTP Request Type POST
- HTTP Content-Type application/json
Request Body#
| Schema |
|---|
| json object |
| startDate (long) Unix epoch timestamps (miliseconds). The start date of the call query. |
| endDate (long) Unix epoch timestamps (miliseconds). The end date of the call query. |
| callType (string) Lets you filter by call type. Possible values are as follows : "all" : Returns all video and voice calls. "video" : Returns video calls. "voice" : Returns voice calls. |
| staffId (string) Optional. Employee ID. Provide it to see an employee's calls between the given dates. |
| customerId (string) Optional. Customer number. Provide it to see a customer's calls between the given dates. |
| callUseType (integer) Optional. Call Use Type. Filters calls by whether they were made within online help or during video help processes such as customer onboarding. Possible values are as follows : 0 (UNKNOWN) : The call use code for calls made before this data was stored in the system. This code filters calls whose type is unknown. 1 (DIYALOG_STANDART_CALL) : Filters calls made directly between employees of the main institution and customers, such as from the branch application. 2 (VIDEO_HELP_CALL) : Filters video calls made with call center agents, such as for customer onboarding, instant password, etc. 3 (ONLINE_HELP_CALL) : Filters calls started from within online help. |
Example Json Request Body :#
Responses#
| HTTP 200 Response |
|---|
| json object array The API returns a json array as a response. The array contains json objects with the following fields. Each object contains the details of a call. The API returns a maximum of 20 items (json objects), sorted by date from newest to oldest. If no call is found, an empty array is returned. |
| json object |
| callId (long) The unique id created for the call in the Diyalog system. |
| initiatorId (string) The employee ID or customer number of the caller. |
| nameOfInitiator (string) The first and last name of the caller. |
| initiatorUserType (int) The type of the user who made the call. User types are as follows : 1 : Personel (For public use of the Diyalog system, this value indicates personal-type users.) 2 : Business (For public use of the Diyalog system, this value indicates users with a business account.) 3 : Enterprise (For public use of the Diyalog system, this value indicates users with an enterprise account.) 4 : DomainUser (Internal user / employee) 5 : DomainCustomer (Customer) 6: Bot (Bot user) 7 : AnonymousCustomer (Customer) |
| initiatorAppName (string) The client the caller used. |
| receiverId (string) The employee ID or customer number of the callee. |
| nameOfReceiver (string) The first and last name of the callee. |
| receiverUserType (int) The type of the called user. User types are as follows : 1 : Personel (For public use of the Diyalog system, this value indicates personal-type users.) 2 : Business (For public use of the Diyalog system, this value indicates users with a business account.) 3 : Enterprise (For public use of the Diyalog system, this value indicates users with an enterprise account.) 4 : DomainUser (Internal user / employee) 5 : DomainCustomer (Customer) 6: Bot (Bot user) 7 : AnonymousCustomer (Customer) |
| receiverAppName (string) The client the callee used. |
| callStartedAt (long) Unix epoch timestamps (miliseconds). The date and time the call started. |
| callEndedAt (long) Unix epoch timestamps (miliseconds). The date and time the call ended. |
| callTime (int) The call duration in seconds. If the call did not start, i.e. the other party did not accept or the connection could not be established, this value is 0. |
| callType (string) Indicates whether the call is a video or voice call. "video" : Video call "voice" : Voice call "" : Before Diyalog version 1.6.2, voice and video calls were not distinguished. The type of calls made before that version is unknown, so it may be returned empty. |
| callState (string) Returns the latest state of the call. State values are as follows : "START" : The state is "START" when a call is initiated. This state is not expected to be returned. "ENDED" : The call was initiated, the conversation took place and it was ended. "MISSED" : The call was ended because the other party did not accept or answer it. |
| callViewUrl (string) A dynamic link for watching the call recording. If no recording was created or the call did not start, this field is empty. The call can be watched by opening this link in a browser. When opened, it connects to the Diyalog platform and the call recording is shown there. |
| callUseType (string) Indicates the purpose of the call. It distinguishes whether the call was made within online help, from Diyalog screens, or during video help processes such as customer onboarding. Possible values are as follows : "DIYALOG_STANDART_CALL" : A general Diyalog call, made neither from online help nor from video-call customer onboarding. For example, calls made from the branch application are returned with this type. "VIDEO_HELP_CALL" : A video call with the call center, made for customer onboarding or another process. "ONLINE_HELP_CALL" : A call started from within online help. "UNKOWN" : Calls made before call use types started being stored in the system are returned with an unknown use type. |
Example Response Body :#
| HTTP 500 Response |
|---|
| string When the API encounters an error, it returns a response with the HTTP 500 status code. The API's error message is returned as text. |
If the request fails HMAC validation, the following errors are returned as plain text. See Authentication.
| HTTP status | Message | Description |
|---|---|---|
| 400 | Required headers not found | One or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing. |
| 400 | Authorization failed due to data format not valid | The x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form. |
| 400 | Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requied | The x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling. |
| 401 | Authorization failed | The x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct. |
| 401 | You have no permission on this operation. Contact your admin. | The signature is correct, but your access key has no reporting permission. |
| 403 | Request time may not be correct. | The x-dlg-date value differs from the server time by more than 15 minutes. |