GET accounts/:account_id/line_items

Retrieve details for some or all line items associated with the current account.

Resource URL

https://ads-api.twitter.com/2/accounts/:account_id/line_items

Resource Information

Response formats JSON
Requires authentication? Yes (user context only)
Rate limited? Yes

Parameters

Name Description
account_id
required

The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticating user.

Type: string

Example: 18ce54d4x5t

campaign_ids
optional

Scope the response to just the line items under specific campaigns by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 8gdx6

count
optional

Specifies the number of records to try and retrieve per distinct request.

Type: int

Default: 200
Min, Max: 1, 1000
cursor
optional

Specifies a cursor to get the next page of results. See Pagination for more information.

Type: string

Example: 8x7v00oow

draft_only
optional

Scope the response to just line items under draft campaigns.

Type: boolean

Default: false
Possible values: true, false
funding_instrument_ids
optional

Scope the response to just the line items under specific funding instruments by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: lygyi

line_item_ids
optional

Scope the response to just the desired line items by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 8v7jo

sort_by
optional

Sorts by supported attribute in ascending or descending order. See Sorting for more information.

Type: string

Example: created_at-asc

with_deleted
optional

Include deleted results in your request.

Type: boolean

Default: false
Possible values: true, false
with_total_count
optional

Include the total_count response attribute.

Note: This parameter will be ignored if cursor is specified.

Note: Requests which include total_count will have lower rate limits, currently set at 200 per 15 minutes.

Type: boolean

Default: false
Possible values: true, false

Example Request

GET https://ads-api.twitter.com/2/accounts/18ce54d4x5t/line_items?line_item_ids=8v7jo

Example Response

{
  "request": {
    "params": {
      "line_item_ids": [
        "8v7jo"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "bid_type": "MAX",
      "advertiser_user_id": 756201191646691328,
      "name": "Untitled",
      "placements": [
        "ALL_ON_TWITTER"
      ],
      "start_time": null,
      "bid_amount_local_micro": 100000,
      "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": "8v7jo",
      "entity_status": "ACTIVE",
      "account_id": "18ce54d4x5t",
      "optimization": "DEFAULT",
      "categories": [],
      "currency": "USD",
      "created_at": "2017-05-27T08:04:00Z",
      "tracking_tags": [],
      "updated_at": "2017-05-27T08:06:25Z",
      "include_sentiment": "POSITIVE_ONLY",
      "campaign_id": "8gdx6",
      "creative_source": "MANUAL",
      "deleted": false
    }
  ]
}