{"basePath":"http://wshero01.herobase.com/api","resourcePath":"/calls","apis":[{"path":"/calls","description":"Gets calls for an org unit or user in a given time period.","operations":[{"httpMethod":"GET","nickname":"getcalls","summary":"Gets calls for an org unit or user in a given time period.","notes":"Properties that can be included on the call objects are: campaign and user Read more about <a href=\"#doc:about_streamable_formats\">streamable formats</a>.","parameters":[{"name":"OrgCode","description":"The code of the org unit or user to get calls for. Read more about <a href=\"#doc:about_org_codes\">org codes</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"string"},{"name":"StartTime","description":"The start time. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"datetime"},{"name":"TimeSpan","description":"The period. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"timespan"},{"name":"Limit","description":"Max number of calls to get. Do not use for pagination.","paramType":"query","allowMultiple":false,"required":false,"dataType":"int"},{"name":"Include","description":"List of the properties to include on the response object. Read more about <a href=\"#doc:about_include_parameter\">the include parameter</a>.","paramType":"query","allowMultiple":true,"required":false,"dataType":"Array[string]"}],"responseClass":"Array[Call]","errorResponses":[{"code":200,"reason":"Request was processed without errors."},{"code":400,"reason":"Error in request."},{"code":401,"reason":"Authentication failed. Read more about <a href=\"#doc:about_authentication\">authentication</a>."},{"code":403,"reason":"Requested resource is not accessible using those credentials."},{"code":406,"reason":"Accepted response mime types are not supported."},{"code":429,"reason":"Too many requests. Read more about <a href=\"#doc:about_rate_limiting\">rate limiting</a>."},{"code":500,"reason":"Something broke."}]}]},{"path":"/calls/{UniqueId}/recordings","description":"Gets call recordings.","operations":[{"httpMethod":"GET","nickname":"getcallsUniqueIdrecordings","summary":"Gets call recordings.","notes":"Return call recording information for the call","parameters":[{"name":"UniqueId","description":"The call unique id.","paramType":"path","allowMultiple":false,"required":true,"dataType":"string"},{"name":"StartTime","description":"The start time. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":false,"dataType":"datetime"},{"name":"TimeSpan","description":"The period. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":false,"dataType":"timespan"},{"name":"Limit","description":"Max number of calls to get. Do not use for pagination.","paramType":"query","allowMultiple":false,"required":false,"dataType":"int"},{"name":"Include","description":"List of the properties to include on the response object. Read more about <a href=\"#doc:about_include_parameter\">the include parameter</a>.","paramType":"query","allowMultiple":true,"required":false,"dataType":"Array[string]"}],"responseClass":"Array[RecordedConversation]","errorResponses":[{"code":200,"reason":"Request was processed without errors."},{"code":400,"reason":"Error in request."},{"code":401,"reason":"Authentication failed. Read more about <a href=\"#doc:about_authentication\">authentication</a>."},{"code":403,"reason":"Requested resource is not accessible using those credentials."},{"code":406,"reason":"Accepted response mime types are not supported."},{"code":429,"reason":"Too many requests. Read more about <a href=\"#doc:about_rate_limiting\">rate limiting</a>."},{"code":500,"reason":"Something broke."}]}]},{"path":"/calls/agentreadyperiods","description":"Gets agent ready period records for a given time period.\r\n        Only ready periods ENDED in the searched period, are returned.","operations":[{"httpMethod":"GET","nickname":"getcallsagentreadyperiods","summary":"Gets agent ready period records for a given time period.\r\n        Only ready periods ENDED in the searched period, are returned.","notes":" Read more about <a href=\"#doc:about_streamable_formats\">streamable formats</a>.","parameters":[{"name":"FromTime","description":"The start of the time interval to search. Note that this method filters on end time of agent ready records. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"datetime"},{"name":"TimeSpan","description":"The size of the time interval to search. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"timespan"}],"responseClass":"Array[AgentReadyForCallPeriod]","errorResponses":[{"code":200,"reason":"Request was processed without errors."},{"code":400,"reason":"Error in request."},{"code":401,"reason":"Authentication failed. Read more about <a href=\"#doc:about_authentication\">authentication</a>."},{"code":403,"reason":"Requested resource is not accessible using those credentials."},{"code":406,"reason":"Accepted response mime types are not supported."},{"code":429,"reason":"Too many requests. Read more about <a href=\"#doc:about_rate_limiting\">rate limiting</a>."},{"code":500,"reason":"Something broke."}]}]},{"path":"/calls/csv","description":"Gets calls for an org unit or user in a given time period as a csv stream.","operations":[{"httpMethod":"GET","nickname":"getcallscsv","summary":"Gets calls for an org unit or user in a given time period as a csv stream.","notes":"The calls will be returned as a csv stream with content-type: text/csv; charset={Encoding} and content_disposition: attachment;filename=Calls-{OrgCode}-{StartTime:yyyyMMddHHmmss}-{EndTime:yyyyMMddHHmmss}.csv","parameters":[{"name":"OrgCode","description":"The code of the org unit or user to get calls for. Read more about <a href=\"#doc:about_org_codes\">org codes</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"string"},{"name":"Encoding","description":"Encoding to use in the csv stream. Examples: utf-8, windows-1252. Defaults to utf-8","paramType":"query","allowMultiple":false,"required":false,"dataType":"string"},{"name":"CsvFieldSeparator","description":"The separtor used to separate fields in the csv output. Defaul is ; (semicolon)","paramType":"query","allowMultiple":false,"required":false,"dataType":"string"},{"name":"StartTime","description":"The start time. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"datetime"},{"name":"TimeSpan","description":"The period. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"timespan"},{"name":"Limit","description":"Max number of calls to get. Do not use for pagination.","paramType":"query","allowMultiple":false,"required":false,"dataType":"int"},{"name":"Include","description":"List of the properties to include on the response object. Read more about <a href=\"#doc:about_include_parameter\">the include parameter</a>.","paramType":"query","allowMultiple":true,"required":false,"dataType":"Array[string]"}],"responseClass":"Array[FlattenedCall]","errorResponses":[{"code":200,"reason":"Request was processed without errors."},{"code":400,"reason":"Error in request."},{"code":401,"reason":"Authentication failed. Read more about <a href=\"#doc:about_authentication\">authentication</a>."},{"code":403,"reason":"Requested resource is not accessible using those credentials."},{"code":406,"reason":"Accepted response mime types are not supported."},{"code":429,"reason":"Too many requests. Read more about <a href=\"#doc:about_rate_limiting\">rate limiting</a>."},{"code":500,"reason":"Something broke."}]}]},{"path":"/organizationalunits/{OrgCode}/calls","description":"Gets an org units calls in a given time period.","operations":[{"httpMethod":"GET","nickname":"getorganizationalunitsOrgCodecalls","summary":"Gets an org units calls in a given time period.","notes":"Properties that can be included on the call objects are: campaign and user Read more about <a href=\"#doc:about_streamable_formats\">streamable formats</a>.","parameters":[{"name":"OrgCode","description":"The code of the org unit to get calls for. Read more about <a href=\"#doc:about_org_codes\">org codes</a>.","paramType":"path","allowMultiple":false,"required":true,"dataType":"string"},{"name":"StartTime","description":"The start time. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"datetime"},{"name":"TimeSpan","description":"The period. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"timespan"},{"name":"Limit","description":"Max number of calls to get. Do not use for pagination.","paramType":"query","allowMultiple":false,"required":false,"dataType":"int"},{"name":"Include","description":"List of the properties to include on the response object. Read more about <a href=\"#doc:about_include_parameter\">the include parameter</a>.","paramType":"query","allowMultiple":true,"required":false,"dataType":"Array[string]"}],"responseClass":"Array[Call]","errorResponses":[{"code":200,"reason":"Request was processed without errors."},{"code":400,"reason":"Error in request."},{"code":401,"reason":"Authentication failed. Read more about <a href=\"#doc:about_authentication\">authentication</a>."},{"code":403,"reason":"Requested resource is not accessible using those credentials."},{"code":404,"reason":"Resource not found."},{"code":406,"reason":"Accepted response mime types are not supported."},{"code":429,"reason":"Too many requests. Read more about <a href=\"#doc:about_rate_limiting\">rate limiting</a>."},{"code":500,"reason":"Something broke."}]}]},{"path":"/users/{OrgCode}/calls","description":"Gets a users calls in a given time period.","operations":[{"httpMethod":"GET","nickname":"getusersOrgCodecalls","summary":"Gets a users calls in a given time period.","notes":"Properties that can be included on the call objects are: campaign and user. Read more about <a href=\"#doc:about_streamable_formats\">streamable formats</a>.","parameters":[{"name":"OrgCode","description":"The code of the user to get calls for. Read more about <a href=\"#doc:about_org_codes\">org codes</a>.","paramType":"path","allowMultiple":false,"required":true,"dataType":"string"},{"name":"StartTime","description":"The start time. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"datetime"},{"name":"TimeSpan","description":"The period. Read more about <a href=\"#doc:about_basic_types\">basic types</a>.","paramType":"query","allowMultiple":false,"required":true,"dataType":"timespan"},{"name":"Limit","description":"Max number of calls to get. Do not use for pagination.","paramType":"query","allowMultiple":false,"required":false,"dataType":"int"},{"name":"Include","description":"List of the properties to include on the response object. Read more about <a href=\"#doc:about_include_parameter\">the include parameter</a>.","paramType":"query","allowMultiple":true,"required":false,"dataType":"Array[string]"}],"responseClass":"Array[Call]","errorResponses":[{"code":200,"reason":"Request was processed without errors."},{"code":400,"reason":"Error in request."},{"code":401,"reason":"Authentication failed. Read more about <a href=\"#doc:about_authentication\">authentication</a>."},{"code":403,"reason":"Requested resource is not accessible using those credentials."},{"code":404,"reason":"Resource not found."},{"code":406,"reason":"Accepted response mime types are not supported."},{"code":429,"reason":"Too many requests. Read more about <a href=\"#doc:about_rate_limiting\">rate limiting</a>."},{"code":500,"reason":"Something broke."}]}]}],"models":{"GetUserCalls":{"id":"GetUserCalls","properties":{"orgCode":{"type":"string","required":true},"startTime":{"type":"Date","required":true},"timeSpan":{"type":"TimeSpan","required":true},"limit":{"type":"int","required":false},"include":{"type":"Array","items":{"type":"string"},"required":true}}},"GetOrgUnitCalls":{"id":"GetOrgUnitCalls","properties":{"orgCode":{"type":"string","required":true},"startTime":{"type":"Date","required":true},"timeSpan":{"type":"TimeSpan","required":true},"limit":{"type":"int","required":false},"include":{"type":"Array","items":{"type":"string"},"required":true}}},"GetCalls":{"id":"GetCalls","properties":{"orgCode":{"type":"string","required":true},"startTime":{"type":"Date","required":true},"timeSpan":{"type":"TimeSpan","required":true},"limit":{"type":"int","required":false},"include":{"type":"Array","items":{"type":"string"},"required":true}}},"GetCallsAsCSV":{"id":"GetCallsAsCSV","properties":{"orgCode":{"type":"string","required":true},"encoding":{"type":"string","required":true},"csvFieldSeparator":{"type":"string","required":true},"startTime":{"type":"Date","required":true},"timeSpan":{"type":"TimeSpan","required":true},"limit":{"type":"int","required":false},"include":{"type":"Array","items":{"type":"string"},"required":true}}},"GetAgentReadyForCallPeriods":{"id":"GetAgentReadyForCallPeriods","properties":{"fromTime":{"type":"Date","required":true},"timeSpan":{"type":"TimeSpan","required":true}}},"GetCallRecordings":{"id":"GetCallRecordings","properties":{"uniqueId":{"type":"string","required":true},"startTime":{"type":"Date","required":true},"timeSpan":{"type":"TimeSpan","required":true},"limit":{"type":"int","required":false},"include":{"type":"Array","items":{"type":"string"},"required":true}}},"Call":{"id":"Call","properties":{"campaign":{"description":"The campaign which the called lead belongs to","type":"Campaign","required":true},"user":{"description":"The user making the call","type":"User","required":true},"organizationalUnits":{"description":"The organizational unit ancestors of the user making the call","type":"Array","items":{"$ref":"OrgUnit"},"required":true},"uniqueId":{"description":"A unique id for this call","type":"string","required":true},"uniqueLeadId":{"description":"A unique lead id for this call","type":"string","required":true},"leadPhoneNumber":{"type":"string","required":true},"leadExternalKey":{"description":"The lead data field marked as external key","type":"string","required":false},"endCause":{"type":"string","allowableValues":{"valueType":"LIST","values":["NotApplicable","NormalDisconnect","NoResponse","Busy","VoiceMail","DroppedCall","DialingCancelled"]},"required":true},"inProgress":{"description":"True if the call was in progress at the time of object construction","type":"boolean","required":true},"connected":{"description":"True if the call ever resulted in a connected event. This is _not_ an indication of whether the call is currently connected","type":"boolean","required":true},"incoming":{"description":"True if the call started as an incoming call","type":"boolean","required":true},"startTime":{"description":"Indicates when dialing started or when incoming call arrived","type":"Date","required":true},"connectTime":{"description":"Time of connection. Only available if 'Connected' is true","type":"Date","required":false},"endTime":{"description":"End time of the call. Only available when not in progress","type":"Date","required":false},"previewDuration":{"description":"Preview duration occurs before StartTime","type":"TimeSpan","required":true},"dialingDuration":{"description":"Not available during dialing","type":"TimeSpan","required":false},"conversationDuration":{"description":"Only available when Connected is true and not in progress","type":"TimeSpan","required":false},"wrapUpDuration":{"description":"Only available after wrap up or after abandoned timeout","type":"TimeSpan","required":false},"leadStatus":{"description":"The status set on the lead at wrap up. Only available after wrap up or after abandoned timeout. If the status on the lead is set to Unresolved then this property is set to Abandoned.","type":"string","allowableValues":{"valueType":"LIST","values":["NotSet","RedialAutomatic","RedialManualCommon","RedialManualPrivate","VIPRedial","FollowUpRedial","NextNumberDialed","AlternativeNumberDialed","UserProcessed","Depleted","Transferred","ThirdPartyCall","InternalCall","Abandoned","Failed"]},"required":false},"preCallLeadStatus":{"description":"The status of the lead before the call was initiated.","type":"string","allowableValues":{"valueType":"LIST","values":["New","RedialAutomatic","RedialManualCommon","RedialManualPrivate","VIPRedial","Unresolved","NextNumberDialed","AlternativeNumberDialed"]},"required":false},"leadClosure":{"description":"The closure set on the lead at wrap up. Only available if LeadStatus = UserProcessed","type":"string","allowableValues":{"valueType":"LIST","values":["NotSet","Success","NotInterested","InvalidLead","Unqualified"]},"required":false},"campaignType":{"description":"The type of the campaign which the called lead belongs to","type":"string","allowableValues":{"valueType":"LIST","values":["Master","PowerDialer","BasketDialer","PredictiveDialer"]},"required":false}}},"Campaign":{"id":"Campaign","properties":{"uniqueId":{"type":"string","required":true},"name":{"type":"string","required":true},"code":{"type":"string","required":true},"project":{"type":"string","required":true},"leadDefinitionUniqueId":{"type":"string","required":true}}},"User":{"id":"User","properties":{"uniqueId":{"type":"string","required":true},"username":{"type":"string","required":true},"name":{"type":"string","required":true},"orgCode":{"description":"The organizational code for this user","type":"string","required":true},"email":{"description":"The users email address. Used for forgotten password, email and sms text merging.","type":"string","required":false},"inboundPhoneNumber":{"description":"The users inbound phone number. Used for email and sms text merging.","type":"string","required":false},"parent":{"description":"The organizational unit this user belongs to","type":"OrgUnit","required":false},"campaigns":{"description":"Active campaigns that this user currently have access to","type":"Array","items":{"$ref":"Campaign"},"required":false},"projects":{"description":"The projects of the campaigns that this user currently have access to","type":"Array","items":{"type":"string"},"required":false},"roles":{"description":"The roles that this user is assigned to","type":"Array","items":{"type":"string"},"required":false},"employeeNumber":{"description":"The users employee number. Used for TimeTrack reports.","type":"string","required":false},"payrollNumber":{"description":"The users payroll number. Used for TimeTrack reports.","type":"string","required":false}}},"OrgUnit":{"id":"OrgUnit","properties":{"uniqueId":{"type":"string","required":true},"name":{"type":"string","required":true},"orgCode":{"description":"The organizational code for this unit","type":"string","required":true},"level":{"description":"The level in the hierarchy of this organizational unit. 0 equals root","type":"int","required":true},"parent":{"description":"The parent of this organizational unit. Is null for root","type":"OrgUnit","required":false},"children":{"description":"The children of this organizational unit","type":"Array","items":{"$ref":"OrgUnit"},"required":false},"users":{"description":"The users of this organizational unit","type":"Array","items":{"$ref":"User"},"required":false}}},"FlattenedCall":{"id":"FlattenedCall","properties":{"campaignCode":{"description":"The code of the campaign which the called lead belongs to","type":"string","required":true},"campaignName":{"description":"The name of the campaign which the called lead belongs to","type":"string","required":false},"campaignProject":{"description":"The project of the campaign which the called lead belongs to","type":"string","required":false},"userOrgCode":{"description":"The orgcode of the user making the call","type":"string","required":false},"userUsername":{"description":"The username of the user making the call","type":"string","required":false},"userName":{"description":"The name of the user making the call","type":"string","required":false},"organizationalUnit0OrgCode":{"description":"The level 0 (root) organizational unit of the user making the call","type":"string","required":true},"organizationalUnit1OrgCode":{"description":"The level 1 organizational unit ancestor of the user making the call","type":"string","required":false},"organizationalUnit2OrgCode":{"description":"The level 2 organizational unit ancestor of the user making the call","type":"string","required":false},"organizationalUnit3OrgCode":{"description":"The level 3 organizational unit ancestor of the user making the call","type":"string","required":false},"organizationalUnit4OrgCode":{"description":"The level 4 organizational unit ancestor of the user making the call","type":"string","required":false},"uniqueId":{"description":"A unique id for this call","type":"string","required":true},"uniqueLeadId":{"description":"A unique lead id for this call","type":"string","required":true},"leadPhoneNumber":{"type":"string","required":true},"leadExternalKey":{"description":"The lead data field marked as external key","type":"string","required":false},"endCause":{"type":"string","allowableValues":{"valueType":"LIST","values":["NotApplicable","NormalDisconnect","NoResponse","Busy","VoiceMail","DroppedCall","DialingCancelled"]},"required":true},"inProgress":{"description":"True if the call was in progress at the time of object construction","type":"boolean","required":true},"connected":{"description":"True if the call ever resulted in a connected event. This is _not_ an indication of whether the call is currently connected","type":"boolean","required":true},"incoming":{"description":"True if the call started as an incoming call","type":"boolean","required":true},"startTime":{"description":"Indicates when dialing started or when incoming call arrived","type":"Date","required":true},"connectTime":{"description":"Time of connection. Only available if 'Connected' is true","type":"Date","required":false},"endTime":{"description":"End time of the call. Only available when not in progress","type":"Date","required":false},"previewDuration":{"description":"Preview duration occurs before StartTime","type":"TimeSpan","required":true},"dialingDuration":{"description":"Not available during dialing","type":"TimeSpan","required":false},"conversationDuration":{"description":"Only available when Connected is true and not in progress","type":"TimeSpan","required":false},"wrapUpDuration":{"description":"Only available after wrap up or after abandoned timeout","type":"TimeSpan","required":false},"leadStatus":{"description":"The status set on the lead at wrap up. Only available after wrap up or after abandoned timeout. If the status on the lead is set to Unresolved then this property is set to Abandoned.","type":"string","allowableValues":{"valueType":"LIST","values":["NotSet","RedialAutomatic","RedialManualCommon","RedialManualPrivate","VIPRedial","FollowUpRedial","NextNumberDialed","AlternativeNumberDialed","UserProcessed","Depleted","Transferred","ThirdPartyCall","InternalCall","Abandoned","Failed"]},"required":false},"preCallLeadStatus":{"description":"The status of the lead before the call was initiated.","type":"string","allowableValues":{"valueType":"LIST","values":["New","RedialAutomatic","RedialManualCommon","RedialManualPrivate","VIPRedial","Unresolved","NextNumberDialed","AlternativeNumberDialed"]},"required":false},"leadClosure":{"description":"The closure set on the lead at wrap up. Only available if LeadStatus = UserProcessed","type":"string","allowableValues":{"valueType":"LIST","values":["NotSet","Success","NotInterested","InvalidLead","Unqualified"]},"required":false},"campaignType":{"description":"The type of the campaign which the called lead belongs to","type":"string","allowableValues":{"valueType":"LIST","values":["Master","PowerDialer","BasketDialer","PredictiveDialer"]},"required":false}}},"AgentReadyForCallPeriod":{"id":"AgentReadyForCallPeriod","properties":{"uniqueId":{"type":"string","required":true},"orgCode":{"type":"string","required":true},"campaign":{"type":"Campaign","required":true},"startTime":{"type":"Date","required":true},"seconds":{"type":"int","required":true},"campaignType":{"type":"string","allowableValues":{"valueType":"LIST","values":["Master","PowerDialer","BasketDialer","PredictiveDialer"]},"required":true}}},"RecordedConversation":{"id":"RecordedConversation","properties":{"startTime":{"type":"Date","required":true},"endTime":{"type":"Date","required":false},"recordingType":{"type":"string","allowableValues":{"valueType":"LIST","values":["FullRecording","PartialRecording"]},"required":true},"fileName":{"type":"string","required":true}}}}}