Template Comparison API

Use this API to compare templates

Request Parameters

KeyDescriptionConstraints
PARTNER_TOKENJWT Token issues post Partner loginShould be a valid Partner JWT Token.
appIdAppId of the app for which embed link needs to generate.Should be a valid appId associated with the account.
gsTemplateId IdID of the WhatsApp Message Template to target.Should be a valid template ID
template_idsArray of template Ids to compare.The array should contain exactly one valid template id.
start_timestampStart timestart and end time both are in milli second in long form
end_timestampEnd time

Sample Request

curl --location '{{partner_portal_base_url}}/partner/app/{{appId}}/template/analytics/{{gsTemplateId}}/compare?templateList={{template_list}}&end={{end_timestamp}}start={{start_timestamp}}' \
--header 'token: {{PARTNER_TOKEN}}'

Sample Response

{
    "data": [
        {
            "metric": "BLOCK_RATE",
            "order_by_relative_metric": [ {{list_of_gs_templateId}} ],
            "type": "RELATIVE"
        },
        {
            "metric": "MESSAGE_SENDS",
            "number_values": [
                {
                    "key": "{{gs_template_id_1}}",
                    "value": {{Number_of_messages_sent}}
                },
                {
                    "key": "{{gs_template_id_2}}",
                    "value": {{Number_of_messages_sent}}
                }
            ],
            "type": "NUMBER_VALUES"
        },
        {
            "metric": "TOP_BLOCK_REASON",
            "string_values": [
                {
                    "key": "{{gs_template_id}}",
                    "value": "{{block_reason}}"
                },
                {
                    "key": "{{gs_template_id}}",
                    "value": "{{block_reason}}"
                }
            ],
            "type": "STRING_VALUES"
        }
    ],
    "status": "success"
}

Status Code

Status CodeResponseComment
Success
200{ "data": \[ { "metric": "BLOCK_RATE", "order_by_relative_metric": [ {{list_of_gs_templateId}} ], "type": "RELATIVE" }, { "metric": "MESSAGE_SENDS", "number_values": [ { "key": "{{gs_template_id_1}}", "value": {{Number_of_messages_sent}} }, { "key": "{{gs_template_id_2}}", "value": {{Number_of_messages_sent}} } ], "type": "NUMBER_VALUES" }, { "metric": "TOP_BLOCK_REASON", "string_values": [ { "key": "{{gs_template_id}}", "value": "{{block_reason}}" }, { "key": "{{gs_template_id}}", "value": "{{block_reason}}" } ], "type": "STRING_VALUES" } ], "status": "success" }The speed_processed may not be the same as the one sent in the request as it depends on the payment gateway
Error
400{ "status": "error", "message": "Authentication Failed" }
400{ "message": "The difference between start and end times should be the number of seconds in 7, 30, 60 or 90 days.", "status": "error" }
400{ "message": "One or more templates in the list is not approved.", "status": "error" }
400{ "message": "The parameter start_timestamp should be less than end_timestamp.", "status": "error" }
400{ "message": "Not Template Owner", "status": "error" }
429{ "status": "error", "message": "Too Many Requests" }When request rate limit exceeds.
Language
Click Try It! to start a request and see the response here!