Session API Version Differences
| New Field | Renamed Field | Deleted Field |
Session APIs
Summary of changes:
- The path has changed (base path + API path). "accountId" is mandatory in path of each API
- "channelProviderId" which had to be passed while creating engagements has been shifted to "Create Session" API
- Timestamps have changed from Epoch timestamp (int64) to 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z' format
- New structure to pass customer identifiers like email address, phone numbers, etc.
- Few new fields renamed, added or removed in request and response payload to make the data more consistent
| API Version | /v1 | /v1beta | ||||||
|---|---|---|---|---|---|---|---|---|
| Base Path | https://HOST-REGION.cc.avayacloud.com/api/digital/channel | |||||||
Create Session |
POST /v1/sessions |
POST /v1beta/accounts/{accountId}/sessions |
||||||
| Fields | Mandatory | Comment | Fields | Mandatory | Comment | |||
| Path Parameter | accountId | Y | ||||||
| Request Payload | accountId | Y | Shifted to path parameter | channelProviderId | Y | New Field | ||
| customerIdentifier | Y | customerIdentifiers | Y | |||||
| displayName | displayName | |||||||
| sessionParameters | sessionParameters | |||||||
| firstName | use displayName | providerCustomerId | New Field | |||||
| lastName | use displayName | correlationId | New Field | |||||
| emailAddress | use customerIdentifiers | |||||||
| contactNumber | use customerIdentifiers | |||||||
| Response | ||||||||
|
Sample Request |
|
|
||||||
|
Sample Response |
Refer to Sample response for /v1 and /v1beta |
|||||||
Get Session |
GET /v1/sessions/{sessionId}
|
GET /v1beta/accounts/{accountId}/sessions/{sessionId}
|
||||||
| Fields | Mandatory | Comment | Fields | Mandatory | Comment | |||
| Path Parameters | accountId | Y | ||||||
| sessionId | Y | sessionId | Y | |||||
| Response | Refer to Comparison of response for /v1 and /v1beta model | |||||||
| Sample response |
Refer to Sample response for /v1 and /v1beta |
|
||||||
Update Session Parameters |
POST /v1/sessions/{sessionId}:update |
POST /v1beta/accounts/{accountId}/sessions/{sessionId}:updateSessionParameters |
||||||
| Fields | Mandatory | Comment | Fields | Mandatory | Comment | |||
| Path Parameters | accountId | Y | ||||||
| sessionId | Y | sessionId | Y | |||||
| Request Payload | sessionParameters | Y | Map<String, String> | Y | ||||
| Response | Refer to Comparison of response for /v1 and /v1beta model | |||||||
| Sample request |
|
|
||||||
| Sample response |
Refer to Sample response for /v1 and /v1beta |
|||||||
Terminate Session |
POST /v1/sessions/{sessionId}:terminate
|
DELETE /v1beta/accounts/{accountId}/sessions/{sessionId}
|
||||||
| Fields | Mandatory | Comment | Fields | Mandatory | Comment | |||
| Path Parameters | accountId | Y | ||||||
| sessionId | Y | sessionId | Y | |||||
| Query Parameters | reason | Y | ||||||
| Response | 200 OK | 204 No content | ||||||
Append Identifiers |
Not available in /v1 |
POST /v1beta/accounts/{accountId}/sessions/{sessionId}:appendIdentifiers |
||||||
| Path Parameters | accountId | Y | ||||||
| sessionId | Y | |||||||
| Request Payload | Identifiers: | Y | ||||||
| Identifiers.universalIds | ||||||||
| Identifiers.phoneNumbers | ||||||||
| Identifiers.emailAddresses | ||||||||
| Identifiers.accountIds | ||||||||
| < * > | ||||||||
| Response | Refer to /v1beta Session | |||||||
| Sample Request |
|
|||||||
| Sample Response |
|
Refer to Sample response for /v1beta |
||||||
Comparison of response for /v1 and /v1beta model
Session
| API Version | /v1 |
/v1beta |
||||
|---|---|---|---|---|---|---|
| Model |
Session |
Session |
||||
Response model |
sessionId | Y | sessionId | Y | ||
| displayName | Y | displayName | ||||
| customerIdentifier | customerIdentifiers | Y | ||||
| sessionParameters | sessionParameters | |||||
| sessionStatus | sessionStatus | |||||
| createTimeMillis | createdAt | Y | ||||
| updateTimeMillis | lastUpdatedAt | Y | ||||
| accountId | Y | accountId | Y | |||
| uri | url | Y | ||||
| firstName | providerCustomerId | |||||
| lastName | channelProviderId | |||||
| emailAddress | correlationId | |||||
| contactNumber | participantId | |||||
Sample response for /v1 and /v1beta
Sample Session response
| API Versiob | /v1 | /v1beta | ||
|---|---|---|---|---|
| Model Name |
Session |
Session |
||
|
|