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