Sinch Contact Center License Reporting Interface (LRI) API documentation 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
- 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
- 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
- search: (string)
Can be searched by any string field
Example:
userName=Doe, John
- 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
- 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."
)
Note: Requested time period cannot exceed 3 full months
Example:
startTime=2016-01-01T00:00:00.000Z
Get the extended data containing the users' detailed information
Example:
details=1
Get the data filtered by the feature name
Example:
feature=U.MULTI
Choose the set of data you want to get about the Sinch Contact Center application usage for the License reporting needs, either version 1 or 2.
Version 1 includes features:
MAX.CALLS.IVR
R.NON
R.TELEPHONY
R.EXPERT
R.VOICE
R.OUTBOUND
R.MULTI
M.NON
M.TELEPHONY
M.EXPERT
M.VOICE
M.OUTBOUND
M.MULTI
Data about system usage per person are added to the result set when the details=1 parameter is set.
A.NON
A.TELEPHONY
A.EXPERT
A.VOICE
A.OUTBOUND
A.MULTI
U.NON
U.TELEPHONY
U.EXPERT
U.VOICE
U.OUTBOUND
U.MULTI
Version 2 includes features:
MAX.CALLS.IVR
R.NOCHANNEL
R.PHONECHANNEL
R.ECHANNEL
R.MULTICHANNEL
M.NOCHANNEL
M.PHONECHANNEL
M.ECHANNEL
M.MULTICHANNEL
Data about system usage per person are added to the result set when the details=1 parameter is set.
A.NOCHANNEL
A.PHONECHANNEL
A.ECHANNEL
A.MULTICHANNEL
U.NOCHANNEL
U.PHONECHANNEL
U.ECHANNEL
U.MULTICHANNEL
Example:
version=1
HTTP status code 200
Body
Type: application/xml
Example:
<datas>
<data>
<date>2016-01-01T00:00:00.000Z</date>
<feature>U.MULTI</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.MULTI</feature>
<maxAmount>1</maxAmount>
<sumAmount>1</sumAmount>
<userId>000000000000000000000000000B</userId>
<userLogin>loginN</userLogin>
<userName>Fox, Jim</userName>
</data>
</datas>
Type: application/json
Example:
{
"date": "2016-01-01T00:00:00.000Z",
"feature": "U.MULTI",
"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.MULTI",
"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
- 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
- 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
- search: (string)
Can be searched by any string field
Example:
feature=U.MULTI
- 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
- 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
- feature: (string)
Get the data filtered by the feature name
Example:
feature=U.MULTI
- 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, either version 1 or 2.
Version 1 includes features:
MAX.CALLS.IVR
R.NON
R.TELEPHONY
R.EXPERT
R.VOICE
R.OUTBOUND
R.MULTI
M.NON
M.TELEPHONY
M.EXPERT
M.VOICE
M.OUTBOUND
M.MULTI
U.NON
U.TELEPHONY
U.EXPERT
U.VOICE
U.OUTBOUND
U.MULTI
Version 2 includes features:
MAX.CALLS.IVR
R.NOCHANNEL
R.PHONECHANNEL
R.ECHANNEL
R.MULTICHANNEL
M.NOCHANNEL
M.PHONECHANNEL
M.ECHANNEL
M.MULTICHANNEL
U.NOCHANNEL
U.PHONECHANNEL
U.ECHANNEL
U.MULTICHANNELExample:
version=1
HTTP status code 200
Body
Type: application/xml
Example:
<reports>
<report>
<feature>R.MULTI</feature>
<count>10</count>
</report>
<report>
<count>6</count>
<feature>M.MULTI</feature>
</report>
<report>
<count>8</count>
<feature>U.MULTI</feature>
</report>
</reports>
Type: application/json
Example:
[
{
"count": "10",
"feature": "R.MULTI"
},
{"count":"6",
"feature":"M.MULTI"
},
{"count":"8",
"feature":"U.MULTI"
}
]
HTTP status code 404
Body
Type: application/json
Example:
{"message": "No data for the report was found" }
Requested time period cannot exceed 3 full months
get /lri/contact
Query Parameters
- 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
- 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
- search: (string)
Can be searched by any string field
Example:
category=CRQueue
- 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
- 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."
)
Note: Requested time period cannot exceed 3 full months
Example:
startTime=2016-01-01T00:00:00.000Z
Get the contact counts/billing data split by Month or Day
Example:
timeCategory=Day
Get the extended contact counts/billing data with billing category and description
Example:
details=1
HTTP status code 200
Body
Type: application/xml
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>
Type: application/json
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)"
}