Sinch Contact Center License Reporting Interface (LRI) version v1
http://localhost:8080/RI
Description
This interface provides usage statistics from Sinch Contact Center application for the License reporting needs. The only method used is GET.
Request Header Data Requirements
To GET JSON response, the request must have "Accept = application/json" header.
To GET XML response, the request should have "Accept = application/xml" header.
/lri
Requested time period cannot exceed 3 full months
get /lri/data
Query Parameters
- version: (string - default: 2)
Choose the set of data you want to get about the Sinch Contact Center application usage for the License reporting needs, version 1, 2 or 3.
Features have the following prefix separated by dot (for example R.NONE.V3).- R - Rights per feature.
- M - Maximum number of simultaneous usage per feature.
- A - Rights per user. Returned only when details=1 parameter is set in GET /lri/data.
- U - Usage per user. Returned only when details=1 parameter is set in GET /lri/data.
- MAX - only MAX.CALLS.IVR
Version 1 features:
- MAX.CALLS.IVR - maximum number of simultaneous IVR calls
- NON - non-telephony user
- TELEPHONY - telephony user
- EXPERT - expert agent
- VOICE - voice only agent
- OUTBOUND - outbound agent
- MULTI - multichannel agent
Version 2 features:
- MAX.CALLS.IVR - maximum number of simultaneous IVR calls
- NOCHANNEL - no phone, no outbound, no email, no chat
- PHONECHANNEL - phone or outbound, no email no chat
- ECHANNEL - no phone, no outbound, email or chat
- MULTICHANNEL - phone or outbound, email or chat
Version 3 features:
- MAX.CALLS.IVR - maximum number of simultaneous IVR calls
- NONE.V3 - user does not have serve rights to queues
- SINGLE_VOICE.V3 - user has serve right to single phone queue only
- MESSAGING.V3 - user has serve rights to chat queues only
- VOICE_OR_EMAIL.V3 - user has serve rights to phone/email queues
- MULTICHANNEL.V3 - user has serve rights to chat and phone/email queues
- SINCH_INTERNAL.V3 - Sinch internal user in cloud
- PARTNER_INTERNAL.V3 - partner internal user in cloud
Example:
version=3
- feature: (string)
Get the data filtered by the feature name
Example:
feature=M.MULTICHANNEL.V3
- details: (string - default: 2)
Get the extended data containing the users' detailed information
Example:
details=1
- startTime: (string)
Get the data starting from the given date
startTime and endTime defaults:- if startTime and endTime parameters are not set in the request, then the result will be limited to 3 full months preceding the current month
(example: current date 2016-04-20; => startTime=2016-01-01; endTime=2016-03-31) - if startTime parameter or endTime parameter is not set, then the error will be returned
(examples:
startTime=2016-02-01; endTime not set => error, "Both startTime and endTime should be set or not set together."
startTime not set; endTime=2016-04-01 => error, "Both startTime and endTime should be set or not set together."
) - if startTime and endTime parameters are set in the request and the requested period will not exceed 3 months, then the result will be limited by these dates
(examples:
startTime=2016-02-01; endTime=2016-03-01 => data set limited by startTime=2016-02-01; endTime=2016-03-01
startTime=2016-01-01; endTime=2016-05-01 => error, "Allowed period has been exceeded. Report provides 3 months of raw data at maximum."
)
Example:
startTime=2016-01-01T00:00:00.000Z
- if startTime and endTime parameters are not set in the request, then the result will be limited to 3 full months preceding the current month
- endTime: (string)
Get the data ending with the given date
startTime and endTime defaults: see startTime parameter description for more detailsExample:
endTime=2016-02-01T00:00:00.000Z
- search: (string)
Can be searched by any string field
Example:
userName=Doe, John
- sort: (string)
Can be sorted by any string field. Default sort is userName,LOCALE-en. "-" in front of the field name will sort descending order. With the postfix ",LOCALE-xx" where xx can be for example en,en-US,de,fi, a user may sort with given locale that are based on standard "IETF BCP 47".
Example:
sort=userName,LOCALE-en
- offset: (integer - default: 0)
Skip a number of elements by specifying an offset value for the query
Example:
offset=100
- limit: (integer)
Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: type
Type: array of object
Items: data
- date: required(datetime)
Contains date part only in UTC, for example: 2022-01-09T00:00:00Z
- feature: required(string)
For example: R.MESSAGING.V3
- maxAmount: required(integer)
R and M features have 0. A and U features have 1. MAX.CALLS.IVR has the result.
- sumAmount: required(integer)
R and M features have count of users. A and U features have 1. MAX.CALLS.IVR has 0.
- userId: (string - minLength: 32 - maxLength: 32)
User ID in A and U features.
- userLogin: (string)
User login in A and U features.
- userName: (string)
User name in A and U features.
Media type: application/xml
Type: any
Example:
<datas>
<data>
<date>2016-01-01T00:00:00.000Z</date>
<feature>U.MULTICHANNEL.V3</feature>
<maxAmount>1</maxAmount>
<sumAmount>1</sumAmount>
<!-- Next fields come visible when details=1 -->
<userId>000000000000000000000000000A</userId>
<userLogin>login1</userLogin>
<userName>Doe, John</userName>
</data>
<data>
<date>2016-01-01T00:00:00.000Z</date>
<feature>U.MULTICHANNEL.V3</feature>
<maxAmount>1</maxAmount>
<sumAmount>1</sumAmount>
<userId>000000000000000000000000000B</userId>
<userLogin>loginN</userLogin>
<userName>Fox, Jim</userName>
</data>
</datas>
Media type: application/json
Type: any
Example:
[
{
"date": "2016-01-01T00:00:00.000Z",
"feature": "U.MULTICHANNEL.V3",
"maxAmount": 1,
"sumAmount": 1,
// Next fields come visible when details=1
"userId": "000000000000000000000000000A",
"userLogin": "login1",
"userName": "Doe, John"
},
{
"date": "2016-01-01T00:00:00.000Z",
"feature": "U.MULTICHANNEL.V3",
"maxAmount": 1,
"sumAmount": 1,
// Next fields come visible when details=1
"userId": "000000000000000000000000000B",
"userLogin": "loginN",
"userName": "Fox, Jim"
}
]
Requested time period is not limited for the report
get /lri/report
Query Parameters
- version: (string - default: 2)
Choose the set of data you want to get about the Sinch Contact Center application usage for the License reporting needs, version 1, 2 or 3.
Features have the following prefix separated by dot (for example R.NONE.V3).- R - Rights per feature.
- M - Maximum number of simultaneous usage per feature.
- A - Rights per user. Returned only when details=1 parameter is set in GET /lri/data.
- U - Usage per user. Returned only when details=1 parameter is set in GET /lri/data.
- MAX - only MAX.CALLS.IVR
Version 1 features:
- MAX.CALLS.IVR - maximum number of simultaneous IVR calls
- NON - non-telephony user
- TELEPHONY - telephony user
- EXPERT - expert agent
- VOICE - voice only agent
- OUTBOUND - outbound agent
- MULTI - multichannel agent
Version 2 features:
- MAX.CALLS.IVR - maximum number of simultaneous IVR calls
- NOCHANNEL - no phone, no outbound, no email, no chat
- PHONECHANNEL - phone or outbound, no email no chat
- ECHANNEL - no phone, no outbound, email or chat
- MULTICHANNEL - phone or outbound, email or chat
Version 3 features:
- MAX.CALLS.IVR - maximum number of simultaneous IVR calls
- NONE.V3 - user does not have serve rights to queues
- SINGLE_VOICE.V3 - user has serve right to single phone queue only
- MESSAGING.V3 - user has serve rights to chat queues only
- VOICE_OR_EMAIL.V3 - user has serve rights to phone/email queues
- MULTICHANNEL.V3 - user has serve rights to chat and phone/email queues
- SINCH_INTERNAL.V3 - Sinch internal user in cloud
- PARTNER_INTERNAL.V3 - partner internal user in cloud
Example:
version=3
- feature: (string)
Get the data filtered by the feature name
Example:
feature=M.MULTICHANNEL.V3
- startTime: (string)
Get the data starting from the given date
startTime and endTime defaults:- if startTime and endTime parameters are not set in the request, then the result will be limited to 3 full months preceding the current month
(example: current date 2016-04-20; => startTime=2016-01-01; endTime=2016-03-31) - if startTime parameter or endTime parameter is not set, then the error will be returned
(examples:
startTime=2016-02-01; endTime not set => error, "Both startTime and endTime should be set or not set together."
startTime not set; endTime=2016-04-01 => error, "Both startTime and endTime should be set or not set together."
) - if startTime and endTime parameters are set in the request, then the result will be limited by these dates
Example:
startTime=2016-01-01T00:00:00.000Z
- if startTime and endTime parameters are not set in the request, then the result will be limited to 3 full months preceding the current month
- endTime: (string)
Get the data ending with the given date
startTime and endTime defaults: see startTime parameter description for more detailsExample:
endTime=2016-02-01T00:00:00.000Z
- search: (string)
Can be searched by any string field
Example:
feature=M.MULTICHANNEL.V3
- sort: (string)
Can be sorted by any string field. Default sort is feature. "-" in front of the field name will sort descending order. With the postfix ",LOCALE-xx" where xx can be for example en,en-US,de,fi, a user may sort with given locale that are based on standard "IETF BCP 47".
Example:
sort=feature
- offset: (integer - default: 0)
Skip a number of elements by specifying an offset value for the query
Example:
offset=100
- limit: (integer)
Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: type
Type: array of object
Items: report
- feature: required(string)
For example: R.MESSAGING.V3
- count: required(integer)
Number of users having this feature.
Media type: application/xml
Type: any
Example:
<reports>
<report>
<feature>R.MULTICHANNEL.V3</feature>
<count>10</count>
</report>
<report>
<count>6</count>
<feature>M.MULTICHANNEL.V3</feature>
</report>
<report>
<count>8</count>
<feature>U.MULTICHANNEL.V3</feature>
</report>
</reports>
Media type: application/json
Type: any
Example:
[
{
"count": 10,
"feature": "R.MULTICHANNEL.V3"
},
{"count":6,
"feature":"M.MULTICHANNEL.V3"
},
{"count":8,
"feature":"U.MULTICHANNEL.V3"
}
]
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "No data for the report was found" }
Requested time period cannot exceed 3 full months
get /lri/contact
Query Parameters
- details: (string - default: 0)
Get the extended contact counts/billing data with billing category and description
Example:
details=1
- timeCategory: (string - default: Month)
Get the contact counts/billing data split by Month or Day
Example:
timeCategory=Day
- startTime: (string)
Get the data starting from the given date
startTime and endTime defaults:- if startTime and endTime parameters are not set in the request, then the result will be limited to 3 full months preceding the current month
(example: current date 2016-04-20; => startTime=2016-01-01; endTime=2016-03-31) - if startTime parameter or endTime parameter is not set, then the error will be returned
(examples:
startTime=2016-02-01; endTime not set => error, "Both startTime and endTime should be set or not set together."
startTime not set; endTime=2016-04-01 => error, "Both startTime and endTime should be set or not set together."
) - if startTime and endTime parameters are set in the request and the requested period will not exceed 3 months, then the result will be limited by these dates
(examples:
startTime=2016-02-01; endTime=2016-03-01 => data set limited by startTime=2016-02-01; endTime=2016-03-01
startTime=2016-01-01; endTime=2016-05-01 => error, "Allowed period has been exceeded. Report provides 3 months of raw data at maximum."
)
Example:
startTime=2016-01-01T00:00:00.000Z
- if startTime and endTime parameters are not set in the request, then the result will be limited to 3 full months preceding the current month
- endTime: (string)
Get the data ending with the given date
startTime and endTime defaults: see startTime parameter description for more detailsExample:
endTime=2016-02-01T00:00:00.000Z
- search: (string)
Can be searched by any string field
Example:
category=CRQueue
- sort: (string)
Can be sorted by any string field. Default sort is category. "-" in front of the field name will sort descending order. With the postfix ",LOCALE-xx" where xx can be for example en,en-US,de,fi, a user may sort with given locale that are based on standard "IETF BCP 47".
Example:
sort=category
- offset: (integer - default: 0)
Skip a number of elements by specifying an offset value for the query
Example:
offset=100
- limit: (integer)
Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: type
Type: array of object
Items: contact
- dateTime: required(string)
Year and month in yyyy-mm format.
- category: required(string)
For example: ObExternal
- description: required(string)
For example: Outbound calls (user dialed)
- contactCount: required(integer)
Number of contacts.
- billableCount: required(integer)
Number of billable contacts.
Media type: application/xml
Type: any
Example:
<contacts>
<contact>
<billableCount>24</billableCount>
<category>ObExternal</category>
<contactCount>24</contactCount>
<dateTime>2019-06</dateTime>
<description>Outbound calls (user dialed)</description>
</contact>
<contact>
<billableCount>28</billableCount>
<category>ObExternal</category>
<contactCount>28</contactCount>
<dateTime>2019-07</dateTime>
<description>Outbound calls (user dialed)</description>
</contact>
<contact>
<billableCount>67</billableCount>
<category>ObExternal</category>
<contactCount>67</contactCount>
<dateTime>2019-08</dateTime>
<description>Outbound calls (user dialed)</description>
</contact>
</contacts>
Media type: application/json
Type: any
Example:
[
{
"billableCount": 24,
"contactCount": 24,
"dateTime": "2019-06",
// Next fields come visible when details=1
"category": "ObExternal",
"description": "Outbound calls (user dialed)"
},
{
"billableCount": 28,
"contactCount": 28,
"dateTime": "2019-07",
// Next fields come visible when details=1
"category": "ObExternal",
"description": "Outbound calls (user dialed)"
},
{
"billableCount": 67,
"contactCount": 67,
"dateTime": "2019-08",
// Next fields come visible when details=1
"category": "ObExternal",
"description": "Outbound calls (user dialed)"
}
]