Analytics
Get template analytics
POST
/
v1
/
channels
/
{channelID}
/
analytics
/
templates
Get template analytics
curl --request POST \
--url https://api.wazapin.com/v1/channels/{channelID}/analytics/templates \
--header 'Content-Type: application/json' \
--data '
{
"end": 123,
"start": 123,
"template_ids": [
"<string>"
],
"metric_types": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({end: 123, start: 123, template_ids: ['<string>'], metric_types: ['<string>']})
};
fetch('https://api.wazapin.com/v1/channels/{channelID}/analytics/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/channels/{channelID}/analytics/templates"
payload = {
"end": 123,
"start": 123,
"template_ids": ["<string>"],
"metric_types": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"data_points": [
{
"clicked": [
{
"button_content": "<string>",
"count": 123,
"type": "<string>"
}
],
"cost": [
{
"type": "<string>",
"value": 123
}
],
"delivered": 123,
"end": 123,
"read": 123,
"replied": 123,
"sent": 123,
"start": 123,
"template_id": "<string>"
}
],
"granularity": "<string>",
"product_type": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}Path Parameters
Channel ID
Body
application/json
Response
OK
Show child attributes
Show child attributes
⌘I
Get template analytics
curl --request POST \
--url https://api.wazapin.com/v1/channels/{channelID}/analytics/templates \
--header 'Content-Type: application/json' \
--data '
{
"end": 123,
"start": 123,
"template_ids": [
"<string>"
],
"metric_types": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({end: 123, start: 123, template_ids: ['<string>'], metric_types: ['<string>']})
};
fetch('https://api.wazapin.com/v1/channels/{channelID}/analytics/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/channels/{channelID}/analytics/templates"
payload = {
"end": 123,
"start": 123,
"template_ids": ["<string>"],
"metric_types": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"data_points": [
{
"clicked": [
{
"button_content": "<string>",
"count": 123,
"type": "<string>"
}
],
"cost": [
{
"type": "<string>",
"value": 123
}
],
"delivered": 123,
"end": 123,
"read": 123,
"replied": 123,
"sent": 123,
"start": 123,
"template_id": "<string>"
}
],
"granularity": "<string>",
"product_type": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}