1. Overview

Announcement and calendar APIs complement the Easy Announcement and business calendar services.

1.1. Version information

Version : 11.1.17

1.2. URI scheme

BasePath : /efadminpanel
Schemes : HTTP

1.3. Tags

  • Announcements : APIs for all types of announcments.

  • Business Calendars : API used for business calendar integration.

1.4. Produces

  • application/json

2. Resources

2.1. Announcements

APIs for all types of announcments.

2.1.1. Fetch Specific Announcements

GET /easyAnnouncement/getAnnouncements
Description

This is the generic REST API call that we can use to fetch any type of announcement by specifying the announcement type/kind.

Parameters
Type Name Description Schema

Query

ani
required

Calling number along with the prefix which is used to filter announcements based on caller region/prefix.

string

Query

dn
required

Service Dial Number

string

Query

kind
required

1, 2 or 3 <br>1 = General Announcement <br>2 = Holiday Announcement <br>3 = Working Announcement

string

Query

placeHolder
optional

“A label or tag that can later be used to filter the announcement”

string

Responses
HTTP Code Description Schema

200

Specific Announcements Fetched Successfully

announcementsFetchedSuccessfully

400

Bad Request (Request parameters are Invalid)

No Content

401

Unauthorized (User is valid but does not have permission to perform the specified action)

No Content

404

Not Found (If the record that was supposed to be updated, is not found on the server)

No Content

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)

No Content

406

Not acceptable Method (Request parameters are invalid)

No Content

500

Internal Server Error (If there is an issue on the server side while processing the request)

No Content

Example HTTP request
Request path
/easyAnnouncement/getAnnouncements
Request query
{
  "ani" : "string",
  "dn" : "string",
  "kind" : "string",
  "placeHolder" : "string"
}
Example HTTP response
Response 200
{
  "prompts" : "how treated.wav,promotion.wav,thankyou.wav,goodbye.wav",
  "announcementsDetails" : [ {
    "announcementId" : "69",
    "announcementName" : "Promotion",
    "prompts_list" : [ "howtreated.wav", "promotion.wav", "thankyou.wav", "goodbye.wav" ]
  }, {
    "announcementId" : "70",
    "announcementName" : "Promotion02",
    "prompts_list" : [ "thankyou.wav", "how treated.wav" ]
  } ],
  "status" : {
    "enumType" : "org.springframework.http.HttpStatus",
    "name" : "OK"
  },
  "message" : "Request Completed Successfully."
}

2.1.2. Fetch General Announcements

GET /generalAnnouncement/getAnnouncements
Description

This API can be used to fetch all announcement(s) of type General.

Parameters
Type Name Description Schema

Query

ani
required

Calling number along with the prefix which is used to filter announcements based on caller region/prefix.

string

Query

dn
required

Service Dial Number

string

Query

placeHolder
optional

A label or tag that can later be used to filter the announcement

string

Responses
HTTP Code Description Schema

200

Success response of fetching general announcements

generalAnnouncementsSuccessResponse

400

Bad Request (Request parameters are Invalid)

No Content

401

Unauthorized (User is valid but does not have permission to perform the specified action)

No Content

404

Not Found (If the record that was supposed to be updated, is not found on the server)

No Content

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)

No Content

406

Not acceptable Method (Request parameters are invalid)

No Content

500

Internal Server Error (If there is an issue on the server side while processing the request)

No Content

Example HTTP request
Request path
/generalAnnouncement/getAnnouncements
Request query
{
  "ani" : "string",
  "dn" : "string",
  "placeHolder" : "string"
}
Example HTTP response
Response 200
{
  "prompts" : "incident.wav,goodbye.wav",
  "announcementsDetails" : [ {
    "announcementId" : "51",
    "announcementName" : "Outage",
    "prompts_list" : [ "incident.wav", "goodbye.wav" ]
  } ],
  "status" : {
    "enumType" : "org.springframework.http.HttpStatus",
    "name" : "OK"
  },
  "message" : "Request Completed Successfully."
}

2.1.3. Fetch Service Status Announcements

GET /serviceStatus/getAnnouncements
Description

This API call is used to get service status. First of all, it will check and return holiday announcement if there is any and if not found, it will check working announcement.

Parameters
Type Name Description Schema

Query

ani
required

Calling number along with the prefix which is used to filter announcements based on caller region/prefix.

string

Query

dn
required

Service Dial Number

string

Query

placeHolder
optional

A label or tag that can later be used to filter the announcement

string

Responses
HTTP Code Description Schema

200

Success Response of Fetch Service Status Announcements

announcementsStatusSuccess

400

Bad Request (Request parameters are Invalid)

No Content

401

Unauthorized (User is valid but does not have permission to perform the specified action)

No Content

404

Not Found (If the record that was supposed to be updated, is not found on the server)

No Content

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)

No Content

406

Not acceptable Method (Request parameters are invalid)

No Content

500

Internal Server Error (If there is an issue on the server side while processing the request)

No Content

Example HTTP request
Request path
/serviceStatus/getAnnouncements
Request query
{
  "ani" : "string",
  "dn" : "string",
  "placeHolder" : "string"
}
Example HTTP response
Response 200
{
  "service_status" : "NOT_ACTIVE",
  "Error_code" : 1,
  "type" : "HOLIDAY",
  "prompts" : "holiday.wav,goodbye.wav",
  "announcementsDetails" : [ {
    "announcementId" : "71",
    "announcementName" : "Holiday",
    "prompts_list" : [ "holiday.wav", "goodbye.wav" ]
  } ],
  "status" : {
    "enumType" : "org.springframework.http.HttpStatus",
    "name" : "OK"
  },
  "message" : "Request Completed Successfully."
}

2.2. Business Calendars

API used for business calendar integration.

2.2.1. Business Calendar Service Status API

GET /BCServiceStatus/getServiceStatus
Description

This API call is used to retrieve business shifts status for an agency or a site.

Parameters
Type Name Description Schema

Query

agencyName
required

Agency name

string

Query

serviceName
optional

Service name

string

Responses
HTTP Code Description Schema

200

BCStatus Success Response

BCSStatusSuccess

400

Bad Request (Request parameters are Invalid)

No Content

401

Unauthorized (User is valid but does not have permission to perform the specified action)

No Content

404

Not Found (If the record that was supposed to be updated, is not found on the server)

No Content

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)

No Content

406

Not acceptable Method (Request parameters are invalid)

No Content

500

Internal Server Error (If there is an issue on the server side while processing the request)

No Content

Example HTTP request
Request path
/BCServiceStatus/getServiceStatus
Request query
{
  "agencyName" : "string",
  "serviceName" : "string"
}
Example HTTP response
Response 200
{
  "message" : "CLOSED_winter",
  "event_name" : "winter"
}

3. Definitions

3.1. BCSStatusSuccess

  • {message":"CLOSED_winter","event_name":"winter"}

This message is returned if the site is closed and there are no opened shifts at the time of the call. In this case we would return event name along with status.

  • {"message":"OPEN","event_name":"winter"}

When any shift is open at the time of the call. In this case, we just send the status solely while event name is added separately.

  • {"message":"EXCEPT"}

This status is returned if the API finds an exceptional event at the time of the call.

  • {"message":"FERIE","holiday_name":"test_holiday"}

This status is returned if the API finds an foliday profile attached at the time of the call.

  • {"message":"NOTHING"}

This status is returned if the API doesn’t find any shift schedule defined for the time when API is called."

Name Description Schema

event_name
optional

Name of the event. It’s just sent when status is ‘CLOSED’
Example : "string"

string

message
optional

This field defines the actual business shifts status. It attached the event name as well along with shift status.
Example : "{CLOSED / OPEN /EXCEPT / FERIE /NOTHING}_event_name"

string

3.2. announcementsArrayObjects

Parameters of announcements objects

Name Description Schema

announcementId
optional

Example : 69

integer

announcementName
optional

Example : "promotion"

string

prompts_list
optional

Example : "promptsListArray"

promptsListArray

3.3. announcementsFetchedSuccessfully

Success response ‘200’ on Fetching Specific Announcements

Name Description Schema

announcementsDetails
optional

Announcements details
Example : [ "announcementsArrayObjects" ]

< announcementsArrayObjects > array

message
optional

Example : "Request Completed Successfully"

string

prompts
optional

Example : "How treated.wav,promotion.wav,thankyou.wav"

string

status
optional

Shows the file status of caller
Example : "object"

status

status

Name Description Schema

enumType
optional

Example : "org.springframework.http.HttpStatus"

string

name
optional

Example : "OK"

string

3.4. announcementsStatusSuccess

Success response ‘200’ for announcements status

Name Description Schema

announcementsDetails
optional

This is the details announcement, not mandatory in the script.
Example : [ "announcementsArrayObjects" ]

< announcementsArrayObjects > array

eror_code
optional

. 0: This means that the service runs successfully and gives some result.<br>2. 1: This means one of the following is true:<br> a. The service is closed,<br> b. It is a holiday.<br> c. An error occurred in servicing the request.
Example : 1

integer

message
optional

Example : "Request Completed Successfully"

string

prompts
optional

It will return associated prompts
Example : "holiday.wav"

string

service_status
optional

. ACTIVE: This means that the service has an opening hour.<br>2. NOT_ACTIVE: This means that either service is closed or it is a holiday.
Example : "NOT_ACTIVE"

string

status
optional

Shows the file status of caller
Example : "object"

status

type
optional

. Working: If there is any opening found.<br>2. Holiday: If there is any holiday found.<br>3. Either not holiday nor any working found.
Example : "HOLIDAY"

string

status

Name Description Schema

enumType
optional

Example : "org.springframework.http.HttpStatus"

string

name
optional

Example : "OK"

string

3.5. generalAnnouncementsSuccessResponse

Success Response ‘200’

Name Description Schema

announcementsDetails
optional

Announcements details
Example : [ "announcementsArrayObjects" ]

< announcementsArrayObjects > array

message
optional

Example : "Request Completed Successfully"

string

prompts
optional

Example : "incident.wav,goodbye.wav"

string

status
optional

Shows the file status of caller
Example : "object"

status

status

Name Description Schema

enumType
optional

Example : "org.springframework.http.HttpStatus"

string

name
optional

Example : "OK"

string

3.6. promptsListArray

Shows the list of prompts

Type : < string > array