Sample response from campaign stats

39 views
Skip to first unread message

mak...@tenjin.com

unread,
Jan 4, 2018, 4:08:03 AM1/4/18
to PocketMath API
Hi, Is there any way to get the sample response from campaigns and campaign_stats endpoint? We haven't run any campaign, so there is no data currently. We need to implement reporting API before we run campaign

Andi Susanto

unread,
Aug 23, 2018, 11:15:03 PM8/23/18
to PocketMath API
Hi Makoto,

Apologies for the late response. Currently we don't have any sample response from our API documentation page, but I can give you some sample responses.

Campaign response should be available once you tried to create a campaign.
{
 
"data": {
   
"id": "200000000",
   
"type": "campaign",
   
"attributes": {
     
"name": "Campaign 001",
     
"advertiser_id": 200000000,
     
"start_at": "2018-07-19T09:51:12.000Z",
     
"end_at": "2018-08-02T09:49:59.000Z",
     
"total_running_time": 1209527000,
     
"elapsed_time": 1209527000,
     
"status": "expired",
     
"is_delivering": false,
     
"objective": "awareness",
     
"final_conversion_metric": null,
     
"total_budget": "100.00",
     
"total_spend": "0.00",
     
"ad_set_ids": [
       
200001808
     
]
   
}
 
}
}


Campaign stats endpoint will give you the sum of stats for a time period of a campaign, here is the response:
{
  "data": {
    "id": "200000000",
    "type": "stats",
    "attributes": {
      "bid_count": 71113,
      "clicks": 165,
      "impressions": 50811,
      "conversions": 0,
      "spend": 9.98259875,
      "vast_start": 0,
      "vast_first_quartile": 0,
      "vast_midpoint": 0,
      "vast_third_quartile": 0,
      "vast_complete": 0
    }
  },
  "meta": {
    "from": "2018-08-20T00:00:00.000Z",
    "to": "2018-08-22T23:59:59.999Z"
  }
}

However, if you would like to implement a more granular control of your data, our `/api/v1/statistics` endpoint might be better for your use case.

Cheers!

- Andi
Reply all
Reply to author
Forward
0 new messages