Calls
Calls
- Method
- GET
- Search Endpoint
- https://api.callcap.com/v2/get/calls/
- Query accessible phone calls
- Resource Endpoint
- https://api.callcap.com/v2/get/calls/<call_id>/
- Returns data for a single phone call specified by its call_id
Parameters
Name | Description | Default | Accepted values |
---|---|---|---|
corporate_id | One Callcap top level "Corporate" account ID | (No restriction) | Numeric; Corporate account ID your login has access to |
division_id | Any amount of Callcap 2nd level "Division" account IDs | (No restriction) | Numeric; Division account IDs your login has access to |
location_id | Any amount of Callcap 3rd level "Location" account IDs | (No restriction) | Numeric; Location account IDs your login has access to |
campaign_id | Any amount of Callcap Campaign IDs | (No restriction) | Numeric; Campaign IDs your login has access to |
search_range | Handy shortcuts to preset date ranges | custom | String; One/none of the following:
custom (If this is set to custom, search_startdate and search_enddate should be set as well (they do have defaults though))
today
yesterday
week (The current week, starting on Sunday)
last7days
monthtodate
lastmonth
last30days
last3months
last6months
yeartodate
New time ranges! last1minutes
last5minutes
last10minutes
last30minutes
last60minutes
|
search_startdate | The earliest date in a date range for which you'd like to search calls | (One date in the past) | Date string in the format yyyy-mm-dd; Note: search_startdate must be less than search_enddate |
search_enddate | The latest date in a date range for which you'd like to search calls | (Today's date) | Date string in the format yyyy-mm-dd; Note: search_enddate must be greater than search_startdate |
search_last_modified_start | The earliest date in a date range for which you'd like to search last modified | (No restriction) *Note: if no time is added, the time will default to midnight | Date and time string in the format yyyy-mm-dd HH:nn |
search_last_modified_end | The latest date in a date range for which you'd like to search last modified | (No restriction) *Note: if no time is added, the time will default to 23:59:59 | Date and time string in the format yyyy-mm-dd HH:nn |
search_daysofweek | Limit the returned calls to only specific days of the week | (No restriction) | Numeric list; The desired days in numeric form. 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday. |
search_timezone | Timezone for time comparison and formatting. Date range searches will be based on this timezone. All datetimes returned will be converted to this timezone. | The timezone set for your login on My Profile. Login timezone defaults to US/Central. | IANA timezone name; One/none of the following:
US/Hawaii (Hawaii (GMT -10:00))
US/Alaska (Alaska (GMT -9:00))
US/Pacific (Pacific Time (GMT -8:00))
US/Mountain (Mountain Time (GMT -7:00))
US/Arizona (Arizona Time (GMT -7:00, No DST))
US/Central (Central Time (GMT -6:00))
US/Eastern (Eastern Time (GMT -5:00))
Canada/Atlantic (Atlantic Time (GMT -4:00))
Or Most timezone names in the IANA timezone database |
search_duration_min | The lowest value in a duration range for which you'd like to limit calls | 0 | Integer seconds; Note: search_duration_min must be less than search_duration_max |
search_duration_max | The highest value in a duration range for which you'd like to limit calls | (No restriction) | Integer seconds; Note: search_duration_max must be less than search_duration_min. A value greater than or equal to 600 seconds (10 minutes) will return all calls with no maximum duration. |
search_action | The "Action" or result status of the phone call | (No restriction) | String; Comma delimited list of any/all/none of the following:
ans (Call answered)
missed (Call was not answered due to hangup or busy signal)
blocked (Call was from a number on the Blacklist)
inprogress (Calls currently on the line that have not yet ended). |
search_feature | Limit the calls returned to only those with certain features | (No restriction) | String; Comma delimited list of any/all/none of the following:
outbound (An outbound call)
callsaver (A Negative call that has been worked through Callsaver)
webmatch (A call that has been matched to a website visitor)
callconnect (A call originating from a Click-to-Call event)
callsurance (A call that has been worked by Callsurance call analysts)
|
conversation_type | Choose which types of conversations to get in the request | all | String:
all Return all conversations
call Only return calls
text Only return text conversations
|
Note: to get the content of text conversations you'll need to hit the NEXTms API
search_medium | A list of mediatype IDs corresponding to account specific Campaign mediums for which you'd like to limit calls | (No restriction) | Comma-delimited list of numeric mediatype IDs; Note: An API endpoint to query for mediatypes is coming soon. |
search_major | A list of Callsurance major IDs for which you'd like to limit calls | (No restriction) | Comma-delimited list of numeric Callsurance major IDs; Comma delimited list of any/all/none of the following:
1 (Positive calls)
2 (Negative calls)
3 (Neutral calls)
4 (Filtered calls. Not worked because the Caller is on the Callsurance filter)
0 (Unworked calls. These calls haven't been worked by an Analyst yet or are from campaigns with Callsurance turned off)
|
search_csr | A list of CSR (Calltaker) IDs for which you'd like to limit calls. | (No restriction) | Comma-delimited list of numeric CSR IDs; Note: An API endpoint to query for CSR IDs is coming soon. |
search_callsaver_status | A list of Callsaver status IDs for which you'd like to limit calls. | (No restriction) | Comma-delimited list of numeric Callsaver status IDs; Comma delimited list of any/all/none of the following:
1 (Call was Saved)
2 (Call was NOT saved)
|
search_evaluation_change_status | Returns only the calls that match the given evaluation change status. | (None) |
approved
denied
pending
|
search_revenue_entered | Boolean flag to limit calls based on whether Revenue data has been entered or not | (No restriction) | Boolean numeric (0,1); One of the following:
1 (Revenue data was entered)
0 (Revenue data was NOT entered)
|
search_term | Freeform query parameter. search_term is checked against Campaign name, phone numbers, notes, etc. Fields checked are subject to change. |
(None) | String |
search_caller_id | Caller phone number (Caller ID) to check against calls. If a formatted phone number is used, we will strip out the formatting for searching. Can also search for parts of the phone number such as "316-832-555", "316-832", or "316". | (None) | String/Numeric |
search_destination | The destination number, or ring-to number, that the call connected to. If a formatted phone number is used, we will strip out the formatting for searching. Can also search for parts of the phone number such as "316-832-555", "316-832", or "316". | (None) | String/Numeric |
search_reference_id | An external reference id to search calls for -- this typically applies to imported calls. | (None) | String/Numeric |
search_direction | Call direction filtering for inbound, outbound, and internal calls | all | String; One of the following:
inbound
outbound
internal
|
search_location_external_id | alphanumeric ID from the Location | none | String |
search_division_external_id | alphanumeric ID from the Division | none | String |
call_id | To get details for a single call, pass the call's unique call_id as the only parameter. Only calls your login can access will return results. | (None) | String Callcap Call ID |
order | Order the results | newest | String; One/none of the following:
newest
oldest
account (Orders alphabetically by Corporate name, then Division name, then Location name, then Campaign name)
callerid (Orders numerically by the Caller's phone number)
callername (Orders alphabetically by the Caller's name)
callsurance (Orders numerically by Callsurance major, then by Callsurance minor)
|
page | Specify the page of data to view. Paging is based on the total number of records from your request and the amount of records shown per page. | 1 | Numeric; Greater than 1, less than or equal to the last_page parameter returned. |
show | Specify how many records to show per page. | 50 | Numeric; Greater than 0, less than or equal to 1000. |
detail | Control the level of detail for each Call result. Note: Basic call data is shown for every request. | all | String; Comma delimited list of any/all/none of the following:
all (Shows everything except: Call Notes, demographics, scorecards)
notes (Must be explicitly set to show Call Notes. Example: detail=all,notes) demographics (Only if enabled for account. Must be explicitly set. Example: detail=all,demographics) callsurance (Shows Callsurance data; Major, Minor and CSR)
webmatch (Shows Webmatch data)
caller (Shows captured Caller information)
accounts (Shows Callcap Account information; Corporate, Division, Location and Campaign [including campaign phone number and destination])
scorecards (Shows scorecard info. Must be explicitly set: detail=all,scorecards)
import (Shows the imported reference_id. Must be explicitly set: detail=all,import)
summaries (Shows the call summaries. Must be explicitly set: detail=all,summaries)
sentiment (Shows Sentiment Suite signals. detail=all,sentiment)
|
Example JSON response (formatted for clarity)
{ "pagination": { "page": 1, "last_page": 1, "records_returned": 1, "show": 50, "total_records": 1 }, "status": "success", "search": { "timezone": "US/Central" }, "call": [{ "call_id": "987654_23_11_19_2012_17:07:29_12", "recording": "https://app.callcap.com/recording/987654_23_11_19_2012_10_01_29_12.mp3", "action": "Answer", "start_datetime": "2020-09-01 09:07:15", "last_modified": "2021-11-01 19:10:46", "end_datetime": "2020-09-01 09:47:15", "dtmf": "123#", "import": { "reference_id": "zyx321_xyz" }, "sentiment": { "frustrated_reason": "", "concern_class": "", "sentiment": "Neutral", "frustrated": false, "view_reason": "The caller was reaching out to confirm their appointment time." "view": "Neutral", "satisfied": true }, "duration": 570, "rings": 4, "revenue": 0, "notes": "-----{Callsurance update: 11/19/12 5:10 PM Agent: Administrator}----- CSR did not say name. The caller would like to set an appointment to fix their leaking sink. Positive/Plumbing Appt", "caller": { "city": "Wichita", "class": "Residential", "state": "KS", "name": "John Danger Doe", "address": "NF", "zip": "67202", "caller_id": "316-555-3333" }, "demographics": { "person": {}, "demographics": {}, "property": {}, "addresses": [], "emails": [], "vehicles": [] }, "callsurance": { "major": { "label": "Positive", "id": 1 }, "minor": { "label": "Appointment Booked", "id": 54800824 }, "csr": { "id": 0, "name": "Administrator" }, "change_request": { "status": "Approved", "major": { "label": "Positive", "id": 1 }, "csr": { "id": 1122334, "name": "Fred Smith" }, "original": { "csr": { "id": 123456, "name": "Tony Jones" }, "major": { "label": "Negative", "id": 2 }, "minor": { "label": "No sale", "id": 7654321, "tag": "noSale" } }, "customer": { "email": "[email protected]", "name": "Melissa Zhang" }, "minor": { "label": "Appointment Booked", "id": 12345678, "tag": "appointmentBooked" }, "inaccuracy": "Callsurance Analyst Mistake" }, } "callsaver": { "date": "2020-06-12 16:46:33", "outcome": { "label": "Lost", "id": 2 }, "reason": { "label": "Customer repaired problem", "id": 111, "opportunity": true }, "user": { "lastname": "Smith", "firstname": "Jane", "email": "[email protected]" } }, "webmatch": { "ad_group": "", "creative_id": "", "search": "air conditioning service and repair", "keyword_id": "", "ad_placement": "", "referrer": "http://www.google.com/url?sa=t&rct=j&q=air conditioning service and repair&source=web&cd=4&ved=0CGIQFjAD&url=http://www.example.com/", "traffic_type": "organic", "call_page": "http://www.example.com/", "visitor": { "device": { "type": "mobile" }, "os": { "name": "Android", "version": "4.4.2" }, "browser": { "name": "Chrome", "version": "28.0.1500.94" } } }, "summaries": [ { "type":"Outcome Focused", "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." }, { "type":"Agent Focused", "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." } ], "scorecards": [ { "name": "Scorecard name", "results": [ { "question": "Did the CSR answer the phone with the Shop Name? ", "answers": [ { "entry": true, "value": 8, "max_value": 8.0000, "min_value": 0.0000 } ] }, { "question": "What products did they request? ", "answers": [ { "entry": "Widgets", "value": 2, "max_value": 2.0000, "min_value": 0.0000 }, { "entry": "Gadgets", "value": 2, "max_value": 2.0000, "min_value": 0.0000 } ] } ] } ], "accounts": { "corporate": { "id": 1, "name": "Callcap" }, "division": { "external_id": "abc123", "id": 1669, "name": "Midwest", "corporate_label": "3555" }, "location": { "external_id": "abc987", "id": 222222, "corporate_label": "3555", "name": "Example Location No. 3555" }, "campaign": { "id": 111111, "callcap_number": "866-555-4444", "dialed_number": "866-555-4446", "destination_number": "316-555-5555", "ivr_option": 2, "medium": "Website", "name": "Website number", "line-memo": "Memo", "default_revenue_value": "", "medium_type": "Collateral", "cost_per_piece_final": 0.0100, "addtl_line_memo": "Memo", "cost_per_piece_est": 0.0100, "brand": "Brand", "service_line": "Service Line", "target": "Target", "offer": "Offer/Coupon", "direction": "inbound", } } }] }
pagination
is an object with attributes describing how to page through the data.status
is a string attribute present on every response and will be "success" when a successful request is completed.search
is an object containing details on the API query. Right now only timezone is included (since a default Login timezone could be used).call
is an array of objects, with each object containing details on a specific call.
Updated 7 months ago