Recommendations

GET accounts/:account_id/recommendations

Status: Closed Beta

Retrieve campaign recommendations associated with this ads account. Currently there is a limit of 1 recommendation per funding instrument.

Resource URL

https://ads-api.twitter.com/4/accounts/:account_id/recommendations

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 authenticated user.

Type: string

Example: 18ce54d4x5t

Example Request

GET https://ads-api.twitter.com/4/accounts/18ce54d4x5t/recommendations

Example Response

"request": {
  "params": {
    "account_id": "18ce54d4x5t"
  }
},
"total_count": 1,
"data": [
  {
    "funding_instrument_id": "gpvzb",
    "id": "62ce8zza1q0w",
    "account_id": "18ce54d4x5t",
    "status": "PENDING",
    "message": "Recommendation for testing",
    "created_at": "2016-11-14T23:07:54Z",
    "updated_at": "2016-11-14T23:07:54Z"
  }
]

GET accounts/:account_id/recommendations/:recommendation_id

Status: Closed Beta

Retrieve a specific campaign recommendation associated with this ads account.

The campaign recommendation contains a full set of changes suggested for the campaign structure represented as an object tree. The response tree is intended to work in conjunction with the Batch API endpoints, but it can also be mapped to single update endpoints as appropriate (Create for POST, Update for PUT, Delete for DELETE).

Resource URL

https://ads-api.twitter.com/4/accounts/:account_id/recommendations/:recommendation_id

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 authenticated user.

Type: string

Example: 18ce54d4x5t

recommendation_id
required

A reference to the recommendation ID you are operating within the request

Type: string

Example: 62ce8zza1q0w

Example Request

GET https://ads-api.twitter.com/4/accounts/18ce54d4x5t/recommendations/62ce8zza1q0w

Example Response

{
"request": {
  "params": {
    "recommendation_id": "62ce8zza1q0w",
    "account_id": "18ce54d4x5t"
  }
},
"data_type": "recommendations",
  "data": {
  "changes": [
    {
      "entity_type": "campaigns",
      "params": {
        "start_time": "2016-11-08T22:00:00Z",
        "daily_budget_amount_local_micro": 2200000,
        "end_time": "2016-11-16T07:59:00Z",
        "total_budget_amount_local_micro": 12000000,
        "id": "64m0d"
      },
      "operation_type": "Update",
      "dependent_entities": [
        {
          "entity_type": "line_items",
          "params": {
            "name": "Campaign for recommendations",
            "placements": [
              "TWITTER_TIMELINE"
            ],
            "bid_amount_local_micro": 1430000,
            "id": "6f5kq",
            "include_sentiment": "ALL"
          },
          "operation_type": "Update",
          "dependent_entities": [
            {
              "entity_type": "targeting_criteria",
              "params": {
                "id": "a8po6p"
              },
              "operation_type": null,
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "line_item_id": "6f5kq",
                "name": "election results",
                "targeting_value": "election results",
                "targeting_type": "PHRASE_KEYWORD"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "promoted_tweets",
              "params": {
                "id": "101ftp"
              },
              "operation_type": "Delete",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "line_item_id": "6f5kq",
                "name": "Male",
                "targeting_value": 1,
                "targeting_type": "GENDER"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "line_item_id": "6f5kq",
                "name": "San Francisco-Oakland-San Jose CA, US",
                "targeting_value": "",
                "targeting_type": "LOCATION"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "promoted_tweets",
              "params": {
                "id": "101fto"
              },
              "operation_type": "Delete",
              "dependent_entities": []
            },
            {
              "entity_type": "promoted_tweets",
              "params": {
                "line_item_id": "6f5kq",
                "display_properties": [],
                "paused": false,
                "approval_status": "ACCEPTED",
                "tweet_id": "91125952589766656"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "line_item_id": "6f5kq",
                "name": "Partner audience targeting",
                "targeting_value": "v2cx",
                "targeting_type": "NEGATIVE_BEHAVIOR"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "line_item_id": "6f5kq",
                "name": "AGE_21_TO_34",
                "targeting_value": "AGE_21_TO_34",
                "targeting_type": "AGE"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "id": "a8po6o"
              },
              "operation_type": "Delete",
              "dependent_entities": []
            },
            {
              "entity_type": "promoted_tweets",
              "params": {
                "line_item_id": "6f5kq",
                "display_properties": [],
                "paused": false,
                "approval_status": "ACCEPTED",
                "tweet_id": "991101965843460096"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "promoted_tweets",
              "params": {
                "line_item_id": "6f5kq",
                "display_properties": [],
                "paused": false,
                "approval_status": "ACCEPTED",
                "tweet_id": "991127212156096516"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "line_item_id": "6f5kq",
                "name": "debate",
                "targeting_value": "debate",
                "targeting_type": "NEGATIVE_PHRASE_KEYWORD"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "line_item_id": "6f5kq",
                "name": "60004, IL, US",
                "targeting_value": "",
                "targeting_type": "LOCATION"
              },
              "operation_type": "Create",
              "dependent_entities": []
            },
            {
              "entity_type": "targeting_criteria",
              "params": {
                "id": "a8po6n"
              },
              "operation_type": null,
              "dependent_entities": []
            },
            {
              "entity_type": "promoted_tweets",
              "params": {
                "id": "101ftn"
              },
              "operation_type": null,
              "dependent_entities": []
            }
          ]
        }
      ]
    }
  ],
  "funding_instrument_id": "gpvzb",
  "id": "62ce8zza1q0w",
  "account_id": "18ce54d4x5t",
  "status": "PENDING",
  "message": "Recommendation for testing",
  "created_at": "2016-11-14T23:07:54Z",
  "updated_at": "2016-11-14T23:07:54Z"
  }
}