read and delivered message status webhooks are processedread, it must have been at least delivered.delivered and read nearly simultaneously. In this and other similar scenarios, the delivered webhook is not sent back. This is because it is implied that the message was delivered since it has been read.sent, delivered or read status webhook. If a message is charged, you can expect that at least one webhook (delivered or read) will contain the pricing information.// All versions
"pricing": {
"billable": "<IS_BILLABLE>",
"pricing_model": "<PRICING_MODEL>", // new value, see table below
"type": "<PRICING_TYPE>", // new property, see table below
"category": "<CONVERSATION_CATEGORY>"
}
// Version 24.0 and higher
"pricing": {
"billable": "<IS_BILLABLE?>",
"pricing_model": "<PRICING_MODEL>", // new value, see table below
"type": "<PRICING_TYPE>", // new property, see table below
"category": "<CONVERSATION_CATEGORY>"
}
// Version 23.0 and lower
"conversation": {
"id": "<CONVERSATION_ID>", // new behavior, see table below
"expiration_timestamp": "<CONVERSATION_EXPIRATION_TIMESTAMP>",
"origin": {
"type": "<CONVERSATION_CATEGORY>"
}
},
"pricing": {
"billable": "<IS_BILLABLE?>",
"pricing_model": "PMP", // Value is now "PMP" instead of "CBP"
"type": "<PRICING_TYPE>", // new property, see table below
"category": "<PRICING_CATEGORY>"
}
| Placeholder | Description |
|---|---|
<CONVERSATION_ID> | Version 24.0 and higher:
Version 23.0 and lower:
|
<CONVERSATION_CATEGORY> | Not changing. |
<CONVERSATION_EXPIRATION_TIMESTAMP> | Not changing. |
<IS_BILLABLE?> | Not changing. However, the billable property will be deprecated in a future versioned release, so we recommend that you start using pricing.type and pricing.category together to determine if a message is billable, and if so, its billing rate. |
<PRICING_TYPE> | New property. Values can be:
|
<PRICING_CATEGORY> | Values are not changing, but can now be interpreted as follows:
|
pricing.type set to regular. The pricing.category value indicates the rate (group_marketing or group_utility).pricing.type set to free_group_customer_service. The pricing.category value tells you why it was free:group_utility — the message was sent within an open group customer service window.group_service — all non-templates messages are free.analytics field provides the number and type of messages sent and delivered by the phone numbers associated with a specific WABA — for conversation metrics, see Conversation Analytics./<WHATSAPP_BUSINESS_ACCOUNT_ID>?fields=analytics.<FILTER_PARAMETER>.<FILTER_PARAMETER>...
| Name | Description |
|---|---|
product_typestype: Array | Optional. The types of messages (notification messages and/or customer support messages) for which you want to retrieve notifications. Provide an array and include:
If the above values are not provided, the API call will be return analytics for all messages together. Inbound product type cannot be queried together with other product types, or you will see an error similar to the one below: |
With Country code filter
{
"analytics": {
"phone_numbers": [
"16505550111",
"16505550112",
"16505550113"
],
"country_codes": [
"US",
"BR"
],
"granularity": "DAY",
"data_points": [
{
"start": 1543543200,
"end": 1543629600,
"sent": 196093,
"delivered": 179715,
"groups_delivered": 4
},
{
"start": 1543629600,
"end": 1543716000,
"sent": 147649,
"delivered": 139032
}
# more data points
]
},
"id": "102290129340398"
}
Without Country code filter
{
"analytics": {
"phone_numbers": [
"16505550111",
"16505550112",
"16505550113"
],
"granularity": "DAY",
"data_points": [
{
"start": 1543543200,
"end": 1543629600,
"sent": 196093,
"delivered": 179715,
"groups_sent": 2,
"groups_delivered": 4
},
{
"start": 1543629600,
"end": 1543716000,
"sent": 147649,
"delivered": 139032
}
# more data points
]
},
"id": "102290129340398"
}
pricing_analytics field allows you to get pricing breakdowns for any messages delivered within a specified date range.GET /<WABA_ID>
?fields=pricing_analytics
.start(<START>)
.end(<END>)
.granularity(<GRANULARITY>)
.phone_numbers(<PHONE_NUMBERS>)
.country_codes(<COUNTRY_CODES>)
.metric_types(<METRIC_TYPES>)
.pricing_types(<PRICING_TYPES>)
.pricing_categories(<PRICING_CATEGORIES>)
.dimensions(<DIMENSIONS>)
| Name | Description |
|---|---|
<PRICING_CATEGORIES>Array of strings | Optional. Array of pricing categories. If you send an empty array, we return results for all pricing categories. Values can be:
|
<PRICING_TYPES>Array of strings | Optional. Array of pricing types. If you send an empty array, we return results for all pricing types. Values can be:
|