Campaign reports
The following Calls API methods can be used to obtain JSON campaign reports:
POST https://ds.tovie.ai/api/calls/campaign/{token}/callJob/getReport
for the number report.POST https://ds.tovie.ai/api/calls/campaign/{token}/callAttempt/getReport
for the attempt report.
Request body
The body of requests to this method contains a JSON with any of the following properties:
phones
— an array of phone numbers which should have calls to them canceled.ids
— an array of call job IDs which should be canceled.
tip
You can also pass both properties in one request.
Example request
curl --request POST 'https://ds.tovie.ai/api/calls/campaign/8231.7056.1b131df1/callJob/getReport' \
--header 'Content-Type: application/json' \
--data-raw '{
"phones": [
16123456789
],
"ids": [
12345,
67890
]
}'
Report content
The response will be an array of objects containing varied information on call jobs or call attempts. Among the most commonly used of them are:
startedAt
andfinishedAt
— Unix time of call start and end, in milliseconds.callDuration
— the total call duration, in seconds.callResult
— the call result.reportData
— data reported in the script.jobStatus
— call job status at the time of report generation.
Call job statuses
Property value | Description |
---|---|
canceled | The call was canceled. |
inProcess | The call is in progress. |
longCallWithNoResult | The call is completed and has no result set. |
longCallWithResult | The call is completed and has a result set. |
noAnswer | All call attempts were unanswered by the customer. |
nonexistentNumber | The call was made to a non-existent phone number. |
notDone | The call was not completed but the campaign was stopped. |
onRetry | A call attempt retry is in progress. |
planned | The call is queued, e.g. because all the lines are busy. |