eTelecom docs
English
English
  • INSTRUCTIONS FOR USE
    • Administration page for cs.etelecom
    • Google Chrome Extension
    • App eTelecom
  • API INTEGRATION
    • Shop
      • Account
      • Usage
    • Partner
      • Account
      • Usage
    • VPBX
      • VoIP SDK
        • Android
        • iOS
        • Web
        • Flutter
      • PBX REST APIs
        • Partner Get Tenant List
        • Partner Add Hotline
        • Partner Get Hotline List
        • Partner Activate Tenant
        • Partner Add Hotline To Tenant
        • Partner Removed Hotline From Tenant
        • Partner Remove Hotline
        • Create Tenant
        • Get Tenant information
        • Get Driver Config
        • Get hotline list
        • Create Account User
        • Get List User
        • Create extension
        • Get extension information
        • Get extension list
        • Assign extension to user
        • Change hotline for extension
        • Remove User Of Extension
        • Get call history
    • Zalo Cloud
      • Instructions for connecting Zalo Cloud
      • Zalo Cloud API
        • Create OA authorization link
        • Connect OA
        • Get refresh token
        • Get OA list
        • Get OA information
        • Update Webhook for OA
        • Get list of users
        • Send Text Consulting
        • Send Consulting message according to user information request form
        • Send advice message with sticker
        • Send message Consulting with attached photo
        • Send message Consulting attached file
        • Send transaction message
        • Upload file
        • Send request for calling permission
        • Check if the customer has granted calling permission
        • Get list of requests for calling permission
        • Create a news template
        • Get sample details
        • Get list of news samples
        • Journey Token Creation
        • Get Journey Token Details
        • Get Journey Token List
        • Get message list
        • Get message details
        • Send ZNS
        • Send ZNS with Journey Token
  • SMS BRANDNAME
    • User manual
    • SMS API
      • Send SMS
      • Get message status
      • Get sample details
Powered by GitBook
On this page
  1. API INTEGRATION
  2. VPBX
  3. PBX REST APIs

Get call history

This API is used to get call history on tenant.

PreviousRemove User Of ExtensionNextZalo Cloud

Last updated 5 months ago

Note:

  • For APIs used for Shop, the API key is: . The base_url information of the .

  • For APIs used for Partner, the API key is: . The base_url information of the .

Request:

curl --location '$BASE_URL.Etelecom/ListCallLogs' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API-KEY' \
--data '{
  "filter": {
    "call_number": "<string>",
    "call_state": "not_answered",
    "date_from": "<dateTime>",
    "date_to": "<dateTime>",
    "department_id": "<int64>",
    "direction": "in",
    "duration": {
      "comparison": "less_than_or_equal_to",
      "value": "<integer>"
    },
    "extension_ids": [
      "<int64>",
      "<int64>"
    ],
    "external_id": "<string>",
    "external_session_id": "<string>",
    "hotline_ids": [
      "<int64>",
      "<int64>"
    ],
    "user_id": "<int64>"
  },
  "paging": {
    "after": "<string>",
    "before": "<string>",
    "limit": "<integer>",
    "sort": "<string>"
  }
}'

Response:

{
  "call_logs": [
    {
      "call_state": "unknown",
      "call_status": "Z",
      "call_targets": [
        {
          "add_time": "2019-08-24T14:15:22Z",
          "answered_time": "2019-08-24T14:15:22Z",
          "end_reason": "string",
          "ended_time": "2019-08-24T14:15:22Z",
          "fail_code": 0,
          "ring_duration": 0,
          "ring_time": "2019-08-24T14:15:22Z",
          "status": "string",
          "target_number": "string",
          "trunk_name": "string"
        }
      ],
      "callee": "string",
      "caller": "string",
      "contact_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "direction": "unknown",
      "duration": 0,
      "ended_at": "2019-08-24T14:15:22Z",
      "extension_id": "string",
      "external_id": "string",
      "external_session_id": "string",
      "id": "string",
      "note": "string",
      "recording_urls": [
        "string"
      ],
      "started_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "user_id": "string"
    }
  ],
  "paging": {
    "after": "string",
    "before": "string",
    "limit": 0,
    "next": "string",
    "prev": "string",
    "sort": "string"
  }
}

Request body structure:

School name
Data type
Describe

extension_ids

string[]

List of extensions

extension_ids

string

Calling number

hotline_ids

string[]

Hotline list

call_state

enum

Call status ( unknown answered not_answered)

date_from

string

Start date (eg: "2021-03-10T17:07:19+07:00")

date_to

string

End date (eg: "2021-03-10T17:07:19+07:00")

external_id

string

Get it when making a call on web/mobile

external_session_id

string

Get it when making a call on web/mobile

Return data attribute structure:

School name
Data type
Describe

extension_id

string

Extension Id

silence

string

Recipient phone number

caller

string

Caller phone number

direction

enum

Call direction ( unknown in out ext ext_in ext_out)

call_targets

array

List of related extensions

recording_urls

array

Recording file

Note :

  • Response is returned in paginated fashion. Typically: 100elements (call logs) / pages sorted by newest, pass limitif changes are desired.

  • The response returned will be accompanied bypaging

  • Passing nextthe query string afterin the above request will get the next page, conversely passing prevthe query string afterin the above request will get the previous page (if any).

<api_key>
Shop
<shop_key>
Partner

ListCallLogs

post
Body
Responses
200
A successful response
application/json
post
POST /ListCallLogs HTTP/1.1
Host: $BASE_URL.ETelecom
Content-Type: application/json
Accept: */*
Content-Length: 403

{
  "filter": {
    "call_number": "text",
    "call_state": "unknown",
    "date_from": "2025-06-14T17:19:03.876Z",
    "date_to": "2025-06-14T17:19:03.876Z",
    "department_id": "text",
    "direction": "unknown",
    "duration": {
      "comparison": "unknow",
      "value": 1
    },
    "extension_ids": [
      "text"
    ],
    "external_id": "text",
    "external_session_id": "text",
    "hotline_ids": [
      "text"
    ],
    "user_id": "text"
  },
  "paging": {
    "after": "text",
    "before": "text",
    "limit": 1,
    "sort": "text"
  }
}
200

A successful response

{
  "call_logs": [
    {
      "call_state": "unknown",
      "call_status": "Z",
      "call_targets": [
        {
          "add_time": "2025-06-14T17:19:03.876Z",
          "answered_time": "2025-06-14T17:19:03.876Z",
          "end_reason": "text",
          "ended_time": "2025-06-14T17:19:03.876Z",
          "fail_code": 1,
          "ring_duration": 1,
          "ring_time": "2025-06-14T17:19:03.876Z",
          "status": "text",
          "target_number": "text",
          "trunk_name": "text"
        }
      ],
      "callee": "text",
      "caller": "text",
      "contact_id": "text",
      "created_at": "2025-06-14T17:19:03.876Z",
      "direction": "unknown",
      "duration": 1,
      "ended_at": "2025-06-14T17:19:03.876Z",
      "extension_id": "text",
      "external_id": "text",
      "external_session_id": "text",
      "id": "text",
      "note": "text",
      "recording_urls": [
        "text"
      ],
      "started_at": "2025-06-14T17:19:03.876Z",
      "updated_at": "2025-06-14T17:19:03.876Z",
      "user_id": "text"
    }
  ],
  "paging": {
    "after": "text",
    "before": "text",
    "limit": 1,
    "next": "text",
    "prev": "text",
    "sort": "text"
  }
}