TABLE OF CONTENTS [Document Version - 1.0]




Usage


This API is designed as a Management Remote Control. The API methods allow the caller to perform the following actions.

  • Retrieve Existing Callbacks
  • Create, Update & Delete Callbacks
  • Dial an Existing Callback



Authentication


An authentication token is required to access this API. A token can be requested from the token service using the Token API.



Tokens API


All API methods require a security token to use the system. This token is stored in the HTTP cookie to allow multiple API calls from one authentication request.

A token is requested by authenticating with a user and password combination. The Token service API will return a token on success.


Token URL

https://[CUSTOMER].maxcontact.com/webservices/services/apitoken/login/{login}


Password

The password needs to be sent in the authorization header of the request; the password needs to be converted to Base64 with ASCII encoding to get the bytes[] from the password string.


Steps

  1. Make a request to the token Uri
  2. Store token key for any subsequent requests
  3. Make request to the Callbacks API

Recommendations

  • It is recommended that you keep track of the Token Key and its expiry as making a request every time can slow down the import process.
  • Login should be plain text.

When a successful API call is made to the API Token service, it will return a json/xml object A token key must be passed to each API endpoint along with the request.



Common API Parameters


The following is a list of some common parameters that are used by a number of the API methods, along with details of what each parameter represents.

  • Callback Id – This is the unique id of a callback once created by the system as recorded in the MaxContact database.
  • Lead Id – This is the unique id of a particular lead, lead ids can be accessed via the ‘Lead Search and Edit’ page in Manager Portal.
  • Lead Phone Id – This is the unique id of a particular phone belonging to a lead these values can be obtained from the correspondingly named table in the MaxContact database.
  • List Id – When leads are imported into the system they are grouped together into lists, this is the unique id of a particular list. List Ids can be obtained from the ‘Lists’ page in Manager Portal
  • User Id – Unique id of a particular user within the system, user ids can be obtained from the CTU page (Campaigns, Team and Users) within Manager Portal.
  • Notes – Optional free-text note supplied by the caller. It is worth noting that notes containing certain characters (i.e. < > “ ‘) will be escaped as a security precaution.



Important Notes


  • Where date time values are supplied to the API (either as query parameters or within the body of the request) they should be formatted in ISO8601 format (‘yyyy-mm-ddThh:mm:ss’)
  • Dates and times will be treated as being within the time zone of the web server (assuming no offset is supplied).
  • The TimeZoneId value used by a number of the methods is an integer (from 1 to 138) relating to the Windows Time Zone of the end customer to be called. A default value of 0 is also allowed if the time zone id is unknown consult the appendix for a full list of the Windows Time Zones that are supported.
  • When creating or updating a callback the supplied callback time must be in the future (i.e. callbacks cannot be created or updated to dates and times in the past).
  • It is worth noting that the Dial Callback API method sends instructions to the live CCaaS system. A successful response from this API method simply indicates that the instruction has been relayed to the system but, this does not indicate that the requested action was necessarily successful. For instance, if an instruction is sent to dial a callback when the agent is not logged into the system or they are already talking to a customer then the instruction from the API will be ignored by the system




Responses


All endpoints return either JSON or XML depending on the Accept header. Successful responses return a CallbackResponse or DialCallbackResponse object. Errors return standard HTTP status codes with optional error messages.


CallbackResponse

The CallbackResponse (or an array of these responses) is returned by the majority of the API methods including Create, Get, Update etc.


{
"Id": int,
"PhoneNumber": string,
"ListId": int,
"LeadId": int,
"LeadPhoneId": int,
"UserId": int,
"TimeZoneId": int,
"CallDateTime": datetime,
“Notes”: string
}


DialCallbackResponse

The following response is returned by the Dial method.


{
"CallbackId": int,
"IsSuccess": bool,
"CallId": string,
"Message": string,
"DialedAt": datetime
}



Methods


Get Callback

Returns a single callback based on the supplied callback ID.


GET
/webservices/services/callbacks/{CallbackID}
Params:
CallbackID: int
Returns:
CallbackResponse


Get Callbacks by User ID

Returns an array of callbacks for the supplied user ID and an optional date range. If the date filter is required then values must be supplied for both the start date and the end date.


GET
/webservices/services/callbacks/{UserID}?startDate={StartDate}&endDate={En
dDate}
Params:
UserID: int
StartDate: Start date time string (in ISO8601 format)
EndDate: End date time string (in ISO8601 format)
Returns:
CallbackResponse[]


Create Callback

Creates a new callback at the specified date and time for the supplied user ID and lead phone ID.


POST
/webservices/services/callbacks
Body:
{
"UserId": int,
"LeadPhoneId": int,
"CallDateTime": datetime,
"TimeZoneId": int,
“Notes”: string
}
Returns:
CallbackResponse


Update Callback

Updates the date and time of an existing callback or the user that the callback is associated with. It is possible to update either the callback time or the user ID or both by supplying the corresponding values in the request.


PUT
/webservices/services/callbacks/{CallbackID}
Params:
CallbackID: int
Body:
{
"UserId": int?,
"CallDateTime": datetime?,
“Notes”: string
}
Returns:
CallbackResponse


Notes

  • Using this API method, it is possible to update just one of the callback properties in isolation (e.g. just the CallDateTime) without effecting any of the other existing values.


Delete Callback

Deletes an existing callback based on a supplied callback ID.


DELETE
/webservices/services/callbacks/{CallbackID}
Params:
CallbackID: int
Returns:
No content


Dial Callback

Dials the phone number linked to the specified callback.


POST
/webservices/services/callbacks/{CallbackID}/dial
Params:
CallbackID: int
Returns:
DialCallbackResponse




Appendix

Appendix 1: Windows Time Zones

The following table contains a list of the Windows Time Zones supported by the API.


ID

Name

Display Name

0UnknownUnknown
1Dateline Standard Time (UTC-12:00) International Date Line West
2UTC-11 (UTC-11:00) Coordinated Universal Time-11
3Aleutian Standard Time (UTC-10:00) Aleutian Islands
4Hawaiian Standard Time (UTC-10:00) Hawaii
5Marquesas Standard Time (UTC-09:30) Marquesas Islands
6Alaskan Standard Time (UTC-09:00) Alaska
7UTC-09 (UTC-09:00) Coordinated Universal Time-09
8Pacific Standard Time (Mexico) (UTC-08:00) Baja California
9UTC-08 (UTC-08:00) Coordinated Universal Time-08
10Pacific Standard Time (UTC-08:00) Pacific Time (US & Canada)
11US Mountain Standard Time (UTC-07:00) Arizona
12Mountain Standard Time(Mexico)(UTC-07:00) La Paz, Mazatlan
13Mountain Standard Time (UTC-07:00) Mountain Time (US & Canada)
14Yukon Standard Time (UTC-07:00) Yukon
15Central America Standard Time (UTC-06:00) Central America
16Central Standard Time (UTC-06:00) Central Time (US & Canada)
17Easter Island Standard Time (UTC-06:00) Easter Island
18Central Standard Time (Mexico) (UTC-06:00) Guadalajara, Mexico City, Monterrey
19Canada Central Standard Time (UTC-06:00) Saskatchewan
20SA Pacific Standard Time (UTC-05:00) Bogota, Lima, Quito, Rio Branco
21Eastern Standard Time (Mexico) (UTC-05:00) Chetumal
22Eastern Standard Time (UTC-05:00) Eastern Time (US & Canada)
23Haiti Standard Time (UTC-05:00) Haiti
24Cuba Standard Time (UTC-05:00) Havana
25US Eastern Standard Time (UTC-05:00) Indiana (East)
26Turks And Caicos Standard Time (UTC-05:00) Turks and Caicos
27Paraguay Standard Time (UTC-04:00) Asuncion
28Atlantic Standard Time (UTC-04:00) Atlantic Time (Canada)
29Venezuela Standard Time (UTC-04:00) Caracas
30Central Brazilian Standard Time (UTC-04:00) Cuiaba
31SA Western Standard Time (UTC-04:00) Georgetown,     La Paz, Manaus, San Juan
32Pacific SA Standard Time (UTC-04:00) Santiago
33Newfoundland Standard Time (UTC-03:30) Newfoundland
34Tocantins Standard Time (UTC-03:00) Araguaina
35E. South America Standard Time (UTC-03:00) Brasilia
36SA Eastern Standard Time (UTC-03:00) Cayenne, Fortaleza
37Argentina Standard Time (UTC-03:00) City of Buenos Aires
38Montevideo Standard Time (UTC-03:00) Montevideo
39Magallanes Standard Time (UTC-03:00) Punta Arenas
40Saint Pierre Standard Time (UTC-03:00) Saint Pierre and Miquelon
41Bahia Standard Time (UTC-03:00) Salvador
42UTC-02 (UTC-02:00) Coordinated Universal Time-02
43Greenland Standard Time (UTC-02:00) Greenland
44Mid-Atlantic Standard Time (UTC-02:00) Mid-Atlantic - Old
45Azores Standard Time (UTC-01:00) Azores
46Cape Verde Standard Time (UTC-01:00) Cabo Verde Is.
47UTC (UTC) Coordinated Universal Time
48GMT Standard Time (UTC+00:00) Dublin, Edinburgh, Lisbon, London
49Greenwich Standard Time (UTC+00:00)     Monrovia, Reykjavik
50Sao Tome Standard Time (UTC+00:00) Sao Tome
51Morocco Standard Time (UTC+01:00) Casablanca
52W. Europe Standard Time (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm,Vienna
53Central Europe Standard Time (UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana,Prague
54Romance Standard Time (UTC+01:00) Brussels, Copenhagen, Madrid, Paris
55Central European Standard Time (UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb
56W. Central Africa Standard Time (UTC+01:00) West Central Africa
57GTB Standard Time (UTC+02:00) Athens, Bucharest
58Middle East Standard Time (UTC+02:00) Beirut
59Egypt Standard Time (UTC+02:00) Cairo
60E. Europe Standard Time (UTC+02:00) Chisinau
61West Bank Standard Time (UTC+02:00) Gaza, Hebron
62South Africa Standard Time (UTC+02:00) Harare, Pretoria
63FLE Standard Time (UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
64Israel Standard Time (UTC+02:00) Jerusalem
65South Sudan Standard Time (UTC+02:00) Juba
66Kaliningrad Standard Time (UTC+02:00) Kaliningrad
67Sudan Standard Time (UTC+02:00) Khartoum
68Libya Standard Time (UTC+02:00) Tripoli
69Namibia Standard Time (UTC+02:00) Windhoek
70Jordan Standard Time (UTC+03:00) Amman
71Arabic Standard Time (UTC+03:00) Baghdad
72Syria Standard Time (UTC+03:00) Damascus
73Turkey Standard Time (UTC+03:00) Istanbul
74Arab Standard Time (UTC+03:00) Kuwait, Riyadh
75Belarus Standard Time (UTC+03:00) Minsk
76Russian Standard Time (UTC+03:00) Moscow, St. Petersburg
77E. Africa Standard Time (UTC+03:00) Nairobi
78Volgograd Standard Time (UTC+03:00) Volgograd
79Iran Standard Time (UTC+03:30) Tehran
80Arabian Standard Time (UTC+04:00) Abu Dhabi, Muscat
81Astrakhan Standard Time (UTC+04:00) Astrakhan, Ulyanovsk
82Azerbaijan Standard Time (UTC+04:00) Baku
83Russia Time Zone 3 (UTC+04:00) Izhevsk, Samara
84Mauritius Standard Time (UTC+04:00) Port Louis
85Saratov Standard Time (UTC+04:00) Saratov
86Georgian Standard Time (UTC+04:00) Tbilisi
87Caucasus Standard Time (UTC+04:00) Yerevan
88Afghanistan Standard Time (UTC+04:30) Kabul
89West Asia Standard Time (UTC+05:00) Ashgabat, Tashkent
90Qyzylorda Standard Time (UTC+05:00) Astana
91Ekaterinburg Standard Time (UTC+05:00) Ekaterinburg
92Pakistan Standard Time (UTC+05:00) Islamabad, Karachi
93India Standard Time (UTC+05:30)  Chennai, Kolkata, Mumbai, New Delhi
94Sri Lanka Standard Time (UTC+05:30) Sri Jayawardenepura
95Nepal Standard Time (UTC+05:45) Kathmandu
96Central Asia Standard Time (UTC+06:00) Bishkek
97Bangladesh Standard Time (UTC+06:00) Dhaka
98Omsk Standard Time (UTC+06:00) Omsk
99Myanmar Standard Time (UTC+06:30) Yangon (Rangoon)
100SE Asia Standard Time (UTC+07:00) Bangkok, Hanoi, Jakarta
101Altai Standard Time (UTC+07:00) Barnaul, Gorno-Altaysk
102W. Mongolia Standard Time (UTC+07:00) Hovd
103North Asia Standard Time (UTC+07:00) Krasnoyarsk
104N. Central Asia Standard Time (UTC+07:00) Novosibirsk
105Tomsk Standard Time (UTC+07:00) Tomsk
106China Standard Time (UTC+08:00)  Beijing, Chongqing, Hong Kong, Urumqi
107North Asia East Standard Time (UTC+08:00) Irkutsk
108Singapore Standard Time (UTC+08:00) Kuala Lumpur, Singapore
109W. Australia Standard Time (UTC+08:00) Perth
110Taipei Standard Time (UTC+08:00) Taipei
111Ulaanbaatar Standard Time (UTC+08:00) Ulaanbaatar
112Aus Central W. Standard Time (UTC+08:45) Eucla
113Transbaikal Standard Time (UTC+09:00) Chita
114Tokyo Standard Time (UTC+09:00) Osaka, Sapporo, Tokyo
115North Korea Standard Time (UTC+09:00) Pyongyang
116Korea Standard Time (UTC+09:00) Seoul
117Yakutsk Standard Time (UTC+09:00) Yakutsk
118Cen. Australia Standard Time (UTC+09:30) Adelaide
119AUS Central Standard Time (UTC+09:30) Darwin
120E. Australia Standard Time (UTC+10:00) Brisbane
121AUS Eastern Standard Time (UTC+10:00) Canberra, Melbourne, Sydney
122West Pacific Standard Time (UTC+10:00) Guam,     Port Moresby
123Tasmania Standard Time (UTC+10:00) Hobart
124Vladivostok Standard Time (UTC+10:00) Vladivostok
125Lord Howe Standard Time (UTC+10:30) Lord Howe Island
126Bougainville Standard Time (UTC+11:00) Bougainville Island
127Russia Time Zone 10 (UTC+11:00) Chokurdakh
128Magadan Standard Time (UTC+11:00) Magadan
129Norfolk Standard Time (UTC+11:00) Norfolk Island
130Sakhalin Standard Time (UTC+11:00) Sakhalin
131Central Pacific Standard Time (UTC+11:00) Solomon Is., New Caledonia
132Russia Time Zone 11 (UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky
133New Zealand Standard Time (UTC+12:00) Auckland,  Wellington
134UTC+12 (UTC+12:00) Coordinated Universal Time+12
135Fiji Standard Time (UTC+12:00) Fiji
136Kamchatka Standard Time (UTC+12:00) Petropavlovsk-Kamchatsky - Old
137Chatham Islands Standard Time (UTC+12:45) Chatham Islands
138UTC+13 (UTC+13:00) Coordinated Universal Time+13
139Tonga Standard Time (UTC+13:00) Nuku'alofa
140Samoa Standard Time (UTC+13:00) Samoa
141Line Islands Standard Time (UTC+14:00) Kiritimati Island
142Pacific-Mountain Ambiguous (UTC-07:00) - (UTC-08:00) Pacific -Mountain Ambiguous
143Mountain-Central Ambiguous (UTC-06:00) - (UTC-07:00) Mountain-Central Ambiguous
144Central-Eastern Ambiguous (UTC-05:00) - (UTC-06:00) Central-Eastern Ambiguous
145Atlantic-Newfoundland Ambiguous(UTC-03:30) - (UTC-04:00) Atlantic-Newfoundland Ambiguous