Bulk Delete Call Logs

Deletes multiple call logs in one request. You can delete the specified call logs, or delete all call logs that match the filter conditions except the specified ones.

Request URL

DELETE {base_url}/uc-creport/api/v1/call-logs/batch

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Body parameters
Parameter Required Type Description
ids No Array<String> The list of call log IDs. When excludeSelected is false, these are the IDs of the call logs to delete. When excludeSelected is true, these are the IDs of the call logs to keep. You can obtain the IDs using the Query Call Logs interface.
clientRequestId No String The custom ID of the request, which is passed through to the requestId of the deletion notification.
excludeSelected No Boolean

Whether to delete call logs by exclusion.

Valid value:

  • true: Delete all call logs that match filter, excluding those in ids.
  • false: Delete the call logs in ids.

If not specified, false is used.

filter No Object<Delete_Filter> The filter conditions that are used when excludeSelected is true.
Delete_Filter
Parameter Required Type Description
tabType No String

The scope of call logs to delete.

Valid value:

  • personal: Call logs on the Personal tab.
  • queue: Call logs on the Queue tab.
  • all: All call logs.

If not specified, all is used.

processResultStatus No Integer

The process status to filter by. This parameter is valid only when tabType is queue.

Valid value:

  • 0: Do not filter by process status.
  • 1: Pending.
  • 2: Processing.
  • 3: Processed.

If not specified, 0 is used.

status No String

The call status to filter by.

Valid value:

  • all: All calls.
  • incoming: Incoming calls.
  • missed: Missed calls.
  • outgoing: Outgoing calls.
timeFrom No String The start of the time range to delete, in Unix timestamp format (microseconds).
timeTo No String The end of the time range to delete, in Unix timestamp format (microseconds).
keyword No String The keyword used to search for call logs by name or number.
hasRecording No Boolean

Whether to include only call logs that have recordings in the deletion scope.

Valid value:

  • true: Include only call logs that have recordings.
  • false: Include all call logs.
answeredBy No String The extension numbers of the agents who answered the calls, separated by commas. This parameter is valid only when tabType is queue.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Deletion_Result> The deletion result.
Deletion_Result
Parameter Type Description
successCount Integer The number of call logs deleted successfully.
failedCount Integer The number of call logs that fail to be deleted.
failures Array<Failure_Item> The list of call logs that fail to be deleted, with failure reasons.
Failure_Item
Parameter Type Description
id String The ID of the call log that fails to be deleted.
errorCode String The error code of the failure.
errorMessage String The description of the failure reason.

Example

Request example

DELETE /uc-creport/api/v1/call-logs/batch HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJ5dXhmQHllYXN0YXIuY29tIiwiYXBwX2tleSI6Imd1akF1cGx2Z3hzaUZwNTFxQjFCc0VoQThJYm90cnppIiwiZ3JhbnRfdHlwZSI6Im9wZW5hcGkiLCJjbGllbnRfZXh0Ijp7ImRlc2NyaXB0aW9uIjoi56ys5LiJ5pa55ZCI5L2c5LyZ5Ly05bqU55SoIiwicGFydG5lciI6IuekuuS-i-WQiOS9nOS8meS8tCJ9LCJjbGllbnRfdHlwZSI6Im9wZW5hcGkiLCJleHAiOjE3OTMzNDgzMDgsImlhdCI6MTc5MzMyNjcwOCwianRpIjoiYzNiMzY2ZjUtYzFlZi00MTg3LWFhOWUtOTdmZTVlYjIxNjc4IiwiY2xpZW50X2lkIjoibm92by1vcGVuLXBsYXRmb3JtIiwidXNlcl9leHQiOnsicm9sZUlkcyI6WzNdLCJzdHlwZSI6IkFETUlOIiwidGVuYW50Q29kZSI6bnVsbCwidHlwZSI6IlBfQUNDT1VOVCIsInVzZXJJZCI6MzQyMzMzNTk1NTk1Mjk2MzU4NCwiZW1haWwiOiJ5dXhmQHllYXN0YXIuY29tIiwidXNlcm5hbWUiOiJ5dXhmQHllYXN0YXIuY29tIiwidWNJZCI6MzQyMzMzNTk1NTkzNjE4NjM2OH19.PXOLRPDJMFsIV47z01YdXjmgBlNwFntnpy3G-MxKsXLW3r5yaJUyIvuTfp1BjR5564Avhw6XfSwPmV2nt2myH-OkZq4rLrfm_3VpFX0iZwkOUK2CXQ1UJIrDfP0GS2301JKAzHE65FlEFVAnWWe1m_KqTwSLJ4X24IXIl84DdnOFA5dhlgMUFe1Fa8ku2Tsy5zfZedB6xhgnLaJsS7tKyTRESXuFSYqA2oz_iieDSzqqiW1b6Kwvj6tcX5mbDmovnmqKh-ui8k-mgtfO5yHAoC1V0-Br1VVXMCtGI3NfxWNP7VBahyIzQ-o1X6ZySOkXafw_NKsl0gWqEevMf7uuGg
x-tenant-code: yxf819.com
Content-Type: application/json
{
  "ids": [],
  "excludeSelected": true,
  "filter": {
    "tabType": "all",
    "status": "missed"
  }
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "b4093551681b50f72773aec75ab31683",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "successCount": 0,
    "failedCount": 0,
    "failures": []
  }
}