(13.4) API Guide
Introduction
ST offers RESTful APIs for integration with UCCX IVR. Each object supports five methods (except where documented otherwise) that can be invoked on the URL which is associated with the object.
The structure of the URL is
http://<st-server>:<port>/eabc/<object>/<instanceId>
URL Structure | Description |
<adminpanel-server> | Routable address (IP address) of the CCAdmin Server. |
<port> | Tomcat port |
<object> | One of the supported objects. |
<instanceId> | Optional component needed for GET, DELETE,PUT methods referring to a specific instance of the object. |
Supported Operations
Operation | HTTP Method | Description | Input | Output |
LIST | GET | List all the instances of an object | None | List of objects |
GET | GET | Get details of an instance specified by instanceId | ID/Name | Single Object instance |
SAVE | POST | Create a new instance object | New instance data | None |
UPDATE | PUT | Modify the instance specified by the instanceId | Modified instance data |
|
DELETE | DELETE | Delete the instance specified by the instanceId | ID | None |
All methods support Application/JSON as input MIME types.
Failure Response Codes
The failure response codes for CCAdmin REST APIs are listed here:
Code | Message | Description |
---|---|---|
400 | Bad Request | Request parameters are invalid. |
401 | Unauthorized | User is valid but does not have permission to perform the specified action. |
404 | Not Found | If the record that was supposed to be updated, is not found on the server. |
405 | Method Not Allowed | If the requested action/method is not allowed with the requested object. For instance, if the defined action for an object is GET and the request is made with POST. |
406 | Not Acceptable | Request parameters are invalid. |
500 | Internal Server Error | If there is an issue on the server side while processing the request. |
CORS
Cross-Origin Resource Sharing (CORS) is supported that allows you to place requests to configuration APIs from any origin.
Business Calendars
Business calendars allow the businesses to set hours of operation, public holidays and exceptional openings/closings of the service. Based on these calendar configurations, scripting engineers can either route a caller to an appropriate CSQ or play a static CCX prompt on the CCX script to the caller, to drop the call on the IVR.
Note:
Business calendars allow to insert shift opening/closing hours on the calendar and take intelligent routing decisions based on that information. It does not yet include announcements to be played on the IVR. If you need to play/change announcements dynamically such as to play public holidays on the IVR, you can create an Easy Announcement for the event (such as a holiday or non-working hour). To learn more, see Easy Announcements.
Get Service Status (of business calendars)
A business calendar is created with an Agency and/or a Service (that is offered within the agency).
The Service Status API for business calendars allows to retrieve business shifts for an Agency or a site. An Agency could be a site, a contact center or a specific CSQ which can have its own shift timings and public holidays.
The Service Status API checks the status of a calendar, i.e. if the agency is Opened, Closed, has a Holiday or an Exceptional opening or closing.
The order in which the API checks the status is the following:
Based on the date/time of the API call, it first checks if there is an Exceptional event (exceptional opening/closure). Then queries to see if there is a Holiday. If no exceptional or holiday event is found, it returns OPENED, CLOSED or NOTHING based on the defined shift schedule.
HTTP Method | GET |
URI | http://<adminpanel-server>:<port>/eabc/BCServiceStatus/getServiceStatus?agencyName={?}&serviceName={?} |
Content Type | Application/JSON |
HTTP Success Code | 200 |
HTTP Failure Code | 404,406,405 |
Request Params
Following parameters should be sent with request by specifying them in the URL
Parameter | Required | Description |
agency | true | Agency name |
service | false | Service name |
Response Params
Following parameters would be received.
Parameter | Expected Result | Description |
message | {CLOSED / OPEN / EXCEPT / FERIE / NOTHING }_event_name | This messages returns the current status of the business calendar. In the message, it also returns the name of the event or the shift schedule only when the agency is found to be CLOSED. |
event_name | string | Name of the shift schedule. This is a label assigned to each new shift schedule that is created in CCAdmin Business Calendars module. This helps in creating multiple shift schedules for an agency with different schedule names. For instance, define separate shift timings for winters and summers. |
Sample Success Responses
Following are the possible status messages: