Announcements
Customer Announcements
The announcement
endpoint allows clients to retrieve announcements available
to a customer.
GET /api/customer/:customer_id/announcement
Retrieve a list of announcements configured in the underlying OCNCC system for which a specific customer has access, and which match a specific query term.
This request supports the following parameters:
Parameter | Example | Description |
---|---|---|
customer_id
|
3213
|
[URL parameter], [Required] The ID of the customer whose announcements are to be retrieved. |
query
|
The search term. This term will be used in a case insensitive substring match against configured announcement set names, announcement entry names, and announcement entry descriptions. |
Response Content
The response will be a JSON array of objects, with each object consisting of the following information. Unlike most other responses the key name are shortened due to the quantity of data transferred with the query response:
Key | Type | Description |
---|---|---|
d |
String | The description of the announcement, if one is defined. |
i |
Integer | The unique ID of the announcement. |
e |
String | The name of the announcment. |
s |
String | The name of the announcement set that this announcement belongs to. |
Examples
Request:
curl 'http://localhost/jarvis-agent/n2fe/api/customer/8043/announcement?query=UMS' -H 'Cookie: N2FE_CGISESSID=4876c530f3d7252330a95ea51007f252'
Response:
[
{
"s" : "Public Announcements",
"i" : "6346",
"e" : "10 UMS"
},
{
"e" : "12851 UMS",
"i" : "6687",
"s" : "Public Announcements"
}
]
GET /api/customer/:customer_id/announcement/:announcement_id
Retrieve details for a single announcement as configured in the underlying OCNCC system. The currently authenticated user must have access to the announcement, otherwise the details will not be returned.
This request supports the following parameters:
Parameter | Example | Description |
---|---|---|
customer_id
|
3213
|
[URL parameter], [Required] The ID of the customer whose announcements are to be retrieved. |
announcement_id
|
1010
|
[URL parameter], [Required] The ID of the annoumcement to be retrieved. |
Response Content
The response will be a JSON object with the same content as the objects returned by the search query api/customer/:customer_id/announcement
Examples
Request:
curl 'http://localhost/jarvis-agent/n2fe/api/customer/8043/announcement/1234' -H 'Cookie: N2FE_CGISESSID=4876c530f3d7252330a95ea51007f252'
Response:
[
{
"d" : "DMS Please enter the number you wish to call.",
"s" : "Public Announcements",
"e" : "10",
"i" : "1234"
}
]