Get pricing analytics
POST
/v1/channels/{channelID}/analytics/pricingAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredPath parameters
channelIDstringrequiredChannel ID
Request body
requiredapplication/jsoncountry_codesstring[] | nullFilter by country codes
dimensionsstring[] | nullDimensions for breakdown
endinteger<int64>requiredEnd timestamp (Unix epoch)
granularitystringrequiredData granularity
Allowed:
DAYHOURHALF_HOURmetric_typesstring[] | nullMetric types
phone_numbersstring[] | nullFilter by phone numbers
pricing_categoriesstring[] | nullPricing categories
pricing_typesstring[] | nullPricing types
startinteger<int64>requiredStart timestamp (Unix epoch)
Responses
200OK
dataPricingAnalyticsData[] | nullShow propertiesHide properties
Array of
PricingAnalyticsDatadata_pointsAnalyticsDataPoint[] | nullShow propertiesHide properties
Array of
AnalyticsDataPointconversationinteger<int64>conversation_categorystringconversation_directionstringconversation_typestringcostnumber<double>countrystringdeliveredinteger<int64>endinteger<int64>phone_numberstringpricing_categorystringpricing_typestringsentinteger<int64>startinteger<int64>volumeinteger<int64>400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring404Not Found
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/channels/string/analytics/pricing" \
-H "Content-Type: application/json" \
-d '{
"country_codes": [
"string"
],
"dimensions": [
"string"
],
"end": 0,
"granularity": "DAY",
"metric_types": [
"string"
],
"phone_numbers": [
"string"
],
"pricing_categories": [
"string"
],
"pricing_types": [
"string"
],
"start": 0
}'const response = await fetch("/v1/channels/string/analytics/pricing", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"country_codes": [
"string"
],
"dimensions": [
"string"
],
"end": 0,
"granularity": "DAY",
"metric_types": [
"string"
],
"phone_numbers": [
"string"
],
"pricing_categories": [
"string"
],
"pricing_types": [
"string"
],
"start": 0
})
});import requests
response = requests.post(
"/v1/channels/string/analytics/pricing",
headers={
"Content-Type": "application/json"
},
json={
"country_codes": [
"string"
],
"dimensions": [
"string"
],
"end": 0,
"granularity": "DAY",
"metric_types": [
"string"
],
"phone_numbers": [
"string"
],
"pricing_categories": [
"string"
],
"pricing_types": [
"string"
],
"start": 0
},
)Response
{
"data": [
{
"data_points": [
{
"conversation": 0,
"conversation_category": "string",
"conversation_direction": "string",
"conversation_type": "string",
"cost": 0,
"country": "string",
"delivered": 0,
"end": 0,
"phone_number": "string",
"pricing_category": "string",
"pricing_type": "string",
"sent": 0,
"start": 0,
"volume": 0
}
]
}
]
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}