@itdevfirstent: Keep in mind that the date range matters. If you request data for a time period prior to when the entity was created, for example, you should expect to see null values.
As an example, the following line item was created on 2017-12-21.
$ twurl -H ads-api.twitter.com "/2/accounts/18ce54d4x5t/line_items/aq4uw"
{
"request": {
"params": {
"line_item_id": "aq4uw",
"account_id": "18ce54d4x5t"
}
},
"data": {
"bid_type": "MAX",
"advertiser_user_id": 756201191646691328,
"name": "Untitled",
"placements": [
"ALL_ON_TWITTER"
],
"start_time": null,
"bid_amount_local_micro": 5000000,
"automatically_select_bid": false,
"advertiser_domain": null,
"target_cpa_local_micro": null,
"primary_web_event_tag": null,
"charge_by": "ENGAGEMENT",
"product_type": "PROMOTED_TWEETS",
"end_time": null,
"bid_unit": "ENGAGEMENT",
"total_budget_amount_local_micro": null,
"objective": "TWEET_ENGAGEMENTS",
"id": "aq4uw",
"entity_status": "ACTIVE",
"account_id": "18ce54d4x5t",
"optimization": "DEFAULT",
"categories": [],
"currency": "USD",
"created_at": "2017-12-21T07:14:58Z",
"tracking_tags": [],
"updated_at": "2017-12-21T07:19:40Z",
"include_sentiment": "POSITIVE_ONLY",
"campaign_id": "a3mnn",
"creative_source": "MANUAL",
"deleted": false
}
}
However, because I’m requesting data for 2017-12-15—before this line item was created—I see null values.
$ twurl -H ads-api.twitter.com "/2/stats/accounts/18ce54d4x5t?entity=LINE_ITEM&entity_ids=aq4uw&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&start_time=2017-12-15&end_time=2017-12-16&granularity=TOTAL"
{
"data_type": "stats",
"time_series_length": 1,
"data": [
{
"id": "aq4uw",
"id_data": [
{
"segment": null,
"metrics": {
"impressions": null,
"tweets_send": null,
"qualified_impressions": null,
"follows": null,
"app_clicks": null,
"retweets": null,
"likes": null,
"engagements": null,
"clicks": null,
"card_engagements": null,
"poll_card_vote": null,
"replies": null,
"url_clicks": null,
"carousel_swipes": null
}
}
]
}
],
"request": {
"params": {
"start_time": "2017-12-15T08:00:00Z",
"segmentation_type": null,
"entity_ids": [
"aq4uw"
],
"end_time": "2017-12-16T08:00:00Z",
"country": null,
"placement": "ALL_ON_TWITTER",
"granularity": "TOTAL",
"entity": "LINE_ITEM",
"platform": null,
"metric_groups": [
"ENGAGEMENT"
]
}
}
}
On ads.twitter.com, you’ll see 0s instead of nulls. See this thread for more information on that in case that is causing confusion.
If there is some other issue, please let us know.
Thanks!