Download PDF
Download page Context Data API.
Context Data API
Introduction
The LiveVox Context Data API provides methods that allow for the manipulation of client-specific key-value pairs; these key-value pairs can be associated with different elements (i.e. a call, an account, etc.) in LiveVox depending on the method used. This will provide Clients with a method to attach information that may not be in an account when the file is loaded but is important to assessing things like customer satisfaction or missing account information.
For a general overview of the LiveVox APIs, include security aspects, see the LiveVox API Overview.
Prerequisites
- The user must have successfully logged into the LiveVox platform to obtain a valid Session ID. See Session Management for more information.
- The user must have an active subscription to the Configuration API, in order to obtain an Access Token for use in all API requests. See Access Tokens for details.
- All messages in this API may be subject to rate limits and other restrictions.
Context Data API WADL/Swagger
The Session API WADL/Swagger is publicly available; to obtain the WADL/Swagger for any other API category a user will need to include the LV-Session header with a valid session ID in the WADL/Swagger request.
The Context Data API v17.0 WADL/Swagger is available at the following URL:
The URLs listed below are for the LiveVox NA3 environment and will change slightly if your portal is in a different environment. To know how the URL changes per environment, see the LiveVox Environments and APIs section.
Context API Resource | Link |
---|---|
Call WADL | |
Call Swagger |
User Roles
Unless otherwise specified in this documentation, for a user to be able to access any data through the Context Data API, the user must belong to either the Sysadmin, Superuser, or Agent role. These roles are defined in the LiveVox Configuration Manager and correspond to users who can access LiveVox configuration data through the LiveVox user interfaces.
API Methods
Call Context Data
The Call Context Data methods allow for the attachment of data to a specific call. Currently, the Read, Update, and Delete methods are available; with options to Read/Delete all key-value pairs or individual key-value pairs. The Create functionality is contained within the Update method, if a key
passed in a request does not exist then it will be created.
Delete Context Data
Description: Deletes all Context Data for a Call.
Method: DELETE /context/call/{session}/{txId}/{account}[?client={client}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | The ID of the Client the call is associated to |
session | sessionId | String | Yes | The Session ID of the call to have its Context Data deleted |
txId | transactionId | Integer | Yes | The Transaction ID of the call to have its Context Data deleted |
account | account | String | Yes | The Account of the call to have its Context Data deleted |
Body:
None
Response Code: 204 No Content
Body:
None
Delete Call Context Data
#Request (JSON)
DELETE /context/call/U70D91T533151E6@10.40.88.32/28479905424/ARB_WSAPI_1?client=7419
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
204 No Content
Content-Type: application/json
Attempt to delete Call Context Data when none exists
#Request (JSON)
DELETE /context/call/U70D91T533151E6@10.40.88.32/28479905424/ARB_WSAPI_1?client=7419
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
404 Not Found
Content-Type: application/json
Delete Context Key
Description: Deletes a single key value pair from a Calls Context Data.
Method: DELETE /context/call/{session}/{txId}/{account}/{key}[?client={client}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | The ID of the Client the call is associated to |
session | sessionId | String | Yes | The Session ID of the call |
txId | transactionId | Integer | Yes | The Transaction ID of the call |
account | account | String | Yes | The Account of the call |
key | key | String | Yes | The The |
Body:
None
Response Code: 204 No Content
Body:
None
Delete a single key value pair of a Calls Context Data
#Request (JSON)
DELETE /context/call/U70D91T533151E6@10.40.88.32/28479905424/ARB_WSAPI_1/key1?client=7419
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
204 No Content
Content-Type: application/json
Read Context Data
Description: Reads all Context Data for a Call.
Method: GET /context/call/{session}/{txId}/{account}[?client={client}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | The ID of the Client the call is associated to |
session | sessionId | String | Yes | The Session ID of the call to be read |
txId | transactionId | Integer | Yes | The Transaction ID of the call to be read |
account | account | String | Yes | The Account of the call to be read |
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
entry | Array | No | The
|
Read Call Context Data
#Request (JSON)
GET /context/call/U70D91T533151E6@10.40.88.32/28479905424/ARB_WSAPI_1?client=7419
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
200 Ok
Content-Type: application/json
{"entry": [
{
"key": "Documentatin",
"value": "testers"
},
{
"key": "Key1",
"value": "Value1"
},
{
"key": "Key2",
},
{
"key": "Key3",
"value": "Value3"
},
{
"key": "random",
"value": "testing"
}
]}
Attempt to read Call Context Data when none exists
#Request (JSON)
GET /context/call/U70D91T533151E6@10.40.88.32/28479905424/ARB_WSAPI_1?client=7419
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
204 Not Found
Content-Type: application/json
Read Context Key
Description: Reads a single key value pair of a Calls Context Data.
Method: GET /context/call/{session}/{txId}/{account}/{key}[?client={client}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | The ID of the Client the call is associated to |
session | sessionId | String | Yes | The Session ID of the call to be read |
txId | transactionId | Integer | Yes | The Transaction ID of the call to be read |
account | account | String | Yes | The Account of the call to be read |
key | key | String | Yes | The The |
Body:
None
Response Code: 200 Ok
Body:
Key or Attribute | Type | Mandatory? | Description |
---|---|---|---|
value | String | Yes | The value associated to the supplied key |
Read a single key value pair of a Calls Context Data
#Request (JSON)
GET /context/call/U70D91T533151E6@10.40.88.32/28479905424/ARB_WSAPI_1/Documentation?client=7419
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
200 Ok
Content-Type: application/json
{"value": "testers"}
Update Context Data
Description: Adds/Updates the Context Data associated to a Call. If a key
included in the request already exists, the value
associated to the key
will be updated, but if the key
does not exist, the key-value pair will be created.
Method: POST /context/call/{session}/{txId}/{account}[?client={client}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | The ID of the Client the call is associated to |
session | sessionId | String | Yes | The Session ID of the call to be updated |
txId | transactionId | Integer | Yes | The Transaction ID of the call to be updated |
account | account | String | Yes | The Account of the call to be updated |
Body:
Key | Type | Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
entry | Array | Yes | The
|
Response Code: 204 No Content
Body:
None
Update/Add Call Context Data
#Request (JSON)
POST /context/call/U70D91T533151E6@10.40.88.32/28479905424/ARB_WSAPI_1?client=7419
Host: localhost.com
Content-Type: application/json
Accept: application/json
{"entry":[
{"key":"Key1","value":"Value1"}
,
{"key":"Key2","value":"Value2"}
,
{"key":"Key3","value":"Value3"}
]}
#Response
204 No Content
Content-Type: application/json
Errors
For more information, see the Errors topic on the REST APIs page.