Skip to content

Retrieves information about uploaded calls

Method get.uploaded_calls
Description Retrieves information about uploaded calls
Available to Agent, Client
Required component Data API for Configuration
Method weight 1 point

Request parameters

Name Type Required Valid values Description
access_token string yes Access token used to authenticate the request.
user_id number no Unique ID of the client user on whose behalf the agent is making the request. Required for agents. To retrieve a list of client users, use the get.customer_users method.
limit number no Maximum number of records to return. See the "Paging" section.
offset number no Zero-based offset of the first record to return. The default is 0. See the "Paging" section.
date_from iso8601 yes YYYY-MM-DD hh:mm:ss Start of the upload_time range used for the report.
date_till iso8601 yes YYYY-MM-DD hh:mm:ss End of the upload_time range used for the report.
filter object no Filtering criteria. See "Filters".
fields array no Fields to include in the response. See "Viewing returned data".
sort array no Sorting criteria. See "Sorting".

Response parameters

Name Type Valid values Filtering Sorting Default response Description
ext_id string yes yes yes Unique call ID in your system.
ext_request_id string yes yes yes ID of the API request that uploaded the call.
upload_time iso8601 YYYY-MM-DD hh:mm:ss no no no Date and time when the call was uploaded.
direction enum in - inbound; out - outbound yes yes yes Call direction.
calling_phone_number string E164 yes yes yes Caller phone number.
called_phone_number string E164 yes yes yes Called phone number.
start_time iso8601 YYYY-MM-DD hh:mm:ss yes yes yes Date and time when the call session started.
finish_time iso8601 YYYY-MM-DD hh:mm:ss yes yes yes Date and time when the call session ended.
is_lost boolean yes yes yes Indicates whether the call was lost.
is_transfer boolean yes yes yes Indicates whether the call was transferred.
wait_duration number yes yes yes Time, in seconds, from the start of the call until the first employee answers.
talk_duration number yes yes yes Total conversation duration, in seconds.
visitor_session_id number yes yes yes CallGear visitor session ID.
campaign_id number yes yes yes CallGear advertising campaign ID.
source_id number yes yes yes CallGear traffic source ID.
site_id number yes yes yes CallGear site ID.
comment string yes yes yes Comment associated with the call.
record_type enum wav; mp3 yes yes yes Recording format.
status enum new - queued; in_process - upload in progress; not_processed - processing not completed; cancelled - upload cancelled; processed - processing completed and the recording is available; error - upload failed yes yes yes Call upload status.
error_code enum internal_error; download_error; connection_download_error; http_status_download_error; http_content_type_download_error; max_file_size_download_error; timeout_download_error; decode_error; processing_error; wav_min_duration_processing_error; wav_channels_processing_error yes yes yes Call upload or processing error code.
call_session_id number yes yes yes CallGear call session ID. Returned only when status is processed.
Call-processing notifications
callback object no no no Callback settings for call-processing status notifications.
url string no no no HTTP or HTTPS URL to which call-processing notifications are sent.
events array processed; in_process; not_processed; error; new; cancelled no no no Call-processing statuses that trigger a notification.
Call tags
tags array no no no Tags assigned to the call.
tag_id number no no no Unique tag ID in CallGear.
tag_name string no no no Tag name.
Recordings
records array no no no Recording details for playback in the client account.
employee_name string nono no Employee full name.
employee_id number no no no Unique employee ID in CallGear.
employee_channel enum left - left channel; right - right channel no no no Audio channel containing the employee's speech.
record_url string no no no URL from which the recording can be downloaded.

Example request

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.uploaded_calls",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "date_from":"iso8601",
    "date_till":"iso8601",
    "filter":{
    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

Example response

{
    "jsonrpc": "2.0",
    "id": "rMiS6Y5qt1OYo2m9S3S3z",
    "result": {
        "data": [
            {
                "tags": [
                    {
                        "tag_name": "Maxim"
                    }
                ],
                "ext_id": "yud2022081125",
                "status": "processed",
                "comment": "yud2022081125",
                "is_lost": false,
                "records": null,
                "site_id": 25187,
                "callback": {
                    "url": "https://webhook.site/dab0fb9d-25e7-48e0-bd2d-a60c9f9f61d9",
                    "events": [
                        "processed",
                        "in_process",
                        "error"
                    ]
                },
                "direction": "in",
                "error_code": null,
                "start_time": "2022-08-11 08:48:43",
                "campaign_id": null,
                "source_id": null,
                "finish_time": "2022-08-11 08:48:44",
                "is_transfer": false,
                "record_type": null,
                "upload_time": "2022-08-11 13:18:19",
                "talk_duration": 13,
                "wait_duration": 12,
                "ext_request_id": "test_request",
                "call_session_id": 2427195081,
                "visitor_session_id": 9161005360,
                "called_phone_number": "74950324069",
                "calling_phone_number": "79539693061"
            }
        ]
    }
}

Possible errors

See the "Errors for get methods" section.