Campaign objective and product type



As far as I know, line items (ad groups) cannot have different objective/product type than campaign ones. I wonder how do I know campaign’s objective or product type without querying for line item? These properties seem to belong to Campaign but are found in line item?


@TwitterDev, @Nennad, Anyone found a solution or a workaround for this…?


@Nennad and @HMMdigital: Every line item under a campaign must share the same objective and product type. While our campaigns are objective-based, this is specified and retrieved at the line item-level.


@juanshishido Thanks for the quick reply! Does retrieving data for all line items of an ad account will cover all the campaigns…? or in other words, is it ever possible to have campaigns with no line items.? I guess, I am not sure about the relationship between line item, Ad group and the Tweet.



You can retrieve all of the line items for an ad account by making a request to the GET accounts/:account_id/line_items endpoint. Note that, by default, you will not see deleted line items. To retrieve those, use with_deleted=true. In addition, you may have to use the cursor parameter if you have lots of line items.

It is possible to have a campaign without a line item, but the campaign will not serve. In general, if your campaign does not have all the necessary components (e.g., a line item or promoted tweet), you’ll see INCOMPLETE in the reasons_not_servable array when calling the GET accounts/:account_id/campaigns endpoint.

For more information on how entities in Twitter Ads relate to each other, see Hierarchy and Terminology.

Hope this helps!


objective and product type must be same in campaigns line items, which suggest it should be property of campaign, rather than going to first line item and rely on that (which is little bit awkward)

Unless Twitter is planning to make the objective and product type vary in line items under single campaign in the near future.


@juanshishido Thank you for the clarification. I do make a get request to the accounts/:account_id/line_items endpoint with recursively handling cursors. Then I make asynchronous API calls to get data for 20 line items at a time. Based on what you said about not having any “servable” campaigns without a line item, I should not loose any data. Thanks again.!