Fetch Campaign Messages Stats

This is a BETA version of the API. For any queries, please write to help@quickreply.ai

Fetch Campaign Messages

This API helps you to fetch the data of messages sent to the end-user against a checkout/ order.

This API requires an active WhatsApp Account on QuickReply.ai

Within a single response, the API returns 50 messages data along with an offset value which can be reused to pull in the next batch of 50 messages.

Fetch the Message Stats using an API

POST https://cloudfunc.intelliticks.com/api/companyStats/fetchCampaignsData

The body is a JSON Object

Query Parameters

NameTypeDescription

startTime*

String

Starting time for the data to be fetched

Epoch Timestamp (milliseconds)

endTime*

String

End time for the data to be fetched

Epoch Timestamp (milliseconds)

offset

String

The API returns 50 messages data within one response along with an offset value which can be reused to pull in the next batch of 50 messages.

Default value: 0

Headers

NameTypeDescription

client-id*

String

You can find client-id of your account in Settings > Developers > API credentials

secret-key*

String

You can find secret-key of your account in Settings > Developers > API credentials

{
  "success": true,
  "message": "success",
  "data": [
    {
      "event_id": "25558457545622",
      "type": "Checkout",
      "data": [
        {
          "campaignId": "pouqDjkhjkg4WwbN7_camp",
          "templateId": "e3nzsdjhIsWraRK9_wt",
          "campaignName": "Test Campaign",
          "convUrl": "https://app.quickreply.ai/conversations/all/RFf5HkjghJkgct7b_conv?filter=all",
          "messageState": "DELIVERED",
          "messageSentTime": "2023-09-09T18:31:00.906Z",
          "price": {
            "utility": 0.34,
            "total": 0.34,
            "type": "UTILITY"
          },
          "customerName": "Utkarsh Kala",
          "customerPhone": "+919634687270",
          "text": "This is a test message [Complete Purchase,https://quickrepl.ai/]"
        }
      ]
    }
  ],
  "nextOffset": 50
}

Fields marked with *️ are Required.

Sample cURL Request

curl --location 'https://cloudfunc.intelliticks.com/api/companyStats/fetchCampaignsData?startTime=1702146600000&endTime=1702233000000&offset=0' \
--header 'client-id: pKQYqdsAfd3DKofXo_c' \
--header 'secret-key: bEyckjhR33CHXKLm'

Sample Response Body

{
  "success": true,
  "message": "success",
  "data": [
    {
      "event_id": "25558457545622",
      "type": "Checkout",
      "data": [
        {
          "campaignId": "pouqDjkhjkg4WwbN7_camp",
          "templateId": "e3nzsdjhIsWraRK9_wt",
          "campaignName": "Test Campaign",
          "convUrl": "https://app.quickreply.ai/conversations/all/RFf5HkjghJkgct7b_conv?filter=all",
          "messageState": "DELIVERED",
          "messageSentTime": "2023-09-09T18:31:00.906Z",
          "price": {
            "utility": 0.34,
            "total": 0.34,
            "type": "UTILITY"
          },
          "customerName": "Utkarsh Kala",
          "customerPhone": "+919634687270",
          "text": "This is a test message [Complete Purchase,https://quickrepl.ai/]"
        }
      ]
    }
  ],
  "nextOffset": 50
}

Last updated