Line Item Apps BUG

bug
campaign-management

#1

Hi, I’m experiencing a little weird bug related with the line_item_apps endpoint:

I do the following request to create a line_item_app

twurl -H https://ads-api.twitter.com -d 'app_store_identifier=com.my.app&os_type=ANDROID&line_item_id=51ZLM' /1/accounts/2aev1e/line_item_apps | python -m json.tool

And the response is OK

{
    "data": {
        "app_store_identifier": "com.my.app",
        "created_at": "2016-04-29T14:31:30Z",
        "deleted": false,
        "id": "xc8y",
        "line_item_id": "51zlm",
        "os_type": "Android",
        "updated_at": "2016-04-29T14:31:30Z"
    },
    "date_type": "line_item_apps"
}

But when I retrieve the information to test if it has been succesfully created or not with this Request:

twurl -H https://ads-api.twitter.com /1/accounts/2aev1e/line_item_apps | python -m json.tool

I get the following:

{
    "data": [],
    "data_type": "line_item_apps",
    "next_cursor": null,
    "request": {
        "params": {
            "account_id": "2aev1e"
        }
    },
    "total_count": 0
}

After some test, i’ve discovered that if the line_item related with the line_item_app is paused, you can’t see the line_item_apps.

Also, if I do the GET request “WITH_DELETED”, I get a strange behaviour,

twurl -H https://ads-api.twitter.com /1/accounts/2aev1e/line_item_apps?with_deleted=true | python -m json.tool

{
    "data": [
        {
            "app_store_identifier": "com.my.app",
            "created_at": "2016-04-28T12:45:25Z",
            "deleted": false,
            "id": "x2nq",
            "line_item_id": "51jd5",
            "os_type": "Android",
            "updated_at": "2016-04-28T12:45:25Z"
        }
    ],
    "data_type": "line_item_apps",
    "next_cursor": null,
    "request": {
        "params": {
            "account_id": "2aev1e",
            "with_deleted": true
        }
    },
    "total_count": 2
}
  1. total_count is 2, but I only can se 1
  2. the data I get is a totally different line_item_app as the one I created before, maybe created yesterday
  3. It looks like is deleted, because it only appears when I put “with_deleted=true” but deleted param is setted to true

Regards!!


#2

Has someone here this problem?

Thanks!


#3

I’m still having the same problem. Have you detected it?

twurl -H https://ads-api-sandbox.twitter.com '/1/accounts/gq0vj7/line_item_apps' | json

{
    "data": [
        {
            "app_store_identifier": "com.twitter",
            "created_at": "2016-05-06T13:00:28Z",
            "deleted": false,
            "id": "1",
            "line_item_id": "cvv0",
            "os_type": "Android",
            "updated_at": "2016-05-06T13:00:28Z"
        }
    ],
    "data_type": "line_item_apps",
    "next_cursor": null,
    "request": {
        "params": {
            "account_id": "gq0vj7"
        }
    },
    "total_count": 5
}

#4

@hwz @jillblaz Can you please take a look at this issue? I can confirm the same as what @hector_borras is seeing.


#5

Thanks for posting this & for all the details. I will ask for follow up also.


#6

Thanks you to up this! xD

I really forget it xD


#7

Thanks for surfacing this, @chris_august7 and @hector_borras. Once we repro, we’ll investigate as a bug.


#8

I am seeing similarly strange behavior for a line item app that I created and linked to the following line item. This line item is both ACTIVE and not paused.

{"request":{"params":{"line_item_id":"<line_item_id>","account_id":"<account_id>","with_deleted":true}},"data_type":"line_item","data":{"bid_type":"MAX","advertiser_user_id":<the_user_id>,"name":"test line item","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":"APP_CLICK","product_type":"PROMOTED_TWEETS","end_time":null,"bid_unit":"APP_CLICK","total_budget_amount_local_micro":null,"objective":"APP_INSTALLS","id":"<id>","entity_status":"ACTIVE","paused":false,"account_id":"<account_id>","optimization":"DEFAULT","categories":[],"currency":"USD","created_at":"2016-11-01T22:17:31Z","tracking_tags":[],"updated_at":"2016-11-01T22:44:43Z","include_sentiment":"POSITIVE_ONLY","campaign_id":"<campaign_id>","creative_source":"MANUAL","deleted":false}}

I can create a line item app, and get HTTP 201 as a response along with its ID. However, after its created, I can’t GET that app line item by line item id, or by line item app id. I also can’t DELETE it by line item app id.

excerpted data from the response to the CREATE line_item_app attempt

//        Response Code = 201  (from CREATE line_item_app)
//        {"date_type":"line_item_apps","data":{"line_item_id":"<line_item_id>","app_store_identifier":"566316743",
//                "id":"<line item app id>","created_at":"2016-11-02T22:18:27Z","updated_at":"2016-11-02T22:18:27Z","os_type":"iOS","deleted":false}}

excerpted data from the response GET request by line item ID:

//        Response Code = 200
//
//        {"request":{"params":{"with_deleted":true,"line_item_id":"<line item id>","account_id":"<account id>"}},
//          "data":[],"data_type":"line_item_apps","total_count":0,"next_cursor":null}

excerpted data from the response GET request by line item app ID

//        Response Code = 200
//        {"request":{"params":{"with_deleted":true,"account_id":"<account id>"}},"data":[],"data_type":"line_item_apps","total_count":0,"next_cursor":null}

@juanshishido ~ I can give you the IDs of all the entities involved privately via email if you like.


#9

@hector_borras: We haven’t been able to repro this.

The following shows what we’ve tried. (Perhaps there are particularities you can identify.)

Creating the line item.

$ twurl -X POST -H ads-api.twitter.com "/1/accounts/18ce54d4x5t/line_items?campaign_id=6eo26&bid_amount_local_micro=100000&product_type=PROMOTED_TWEETS&placements=PUBLISHER_NETWORK&objective=APP_INSTALLS&paused=true&advertiser_domain=twitter.com&categories=IAB12" | jq
{
  "data_type": "line_item",
  "data": {
    "bid_type": "TARGET",
    "advertiser_user_id": 756201191646691300,
    "name": "Untitled",
    "placements": [
      "PUBLISHER_NETWORK"
    ],
    "start_time": null,
    "bid_amount_local_micro": 100000,
    "automatically_select_bid": false,
    "advertiser_domain": "twitter.com",
    "target_cpa_local_micro": null,
    "primary_web_event_tag": null,
    "charge_by": "APP_CLICK",
    "product_type": "PROMOTED_TWEETS",
    "end_time": null,
    "bid_unit": "APP_CLICK",
    "total_budget_amount_local_micro": null,
    "objective": "APP_INSTALLS",
    "id": "6oq2e",
    "entity_status": "PAUSED",
    "paused": true,
    "account_id": "18ce54d4x5t",
    "optimization": "DEFAULT",
    "categories": [
      "IAB12"
    ],
    "currency": "USD",
    "created_at": "2016-11-07T22:12:27Z",
    "tracking_tags": [],
    "updated_at": "2016-11-07T22:12:27Z",
    "include_sentiment": "POSITIVE_ONLY",
    "campaign_id": "6eo26",
    "creative_source": "MANUAL",
    "deleted": false
  },
  "request": {
    "params": {
      "placements": [
        "PUBLISHER_NETWORK"
      ],
      "bid_amount_local_micro": 100000,
      "advertiser_domain": "twitter.com",
      "product_type": "PROMOTED_TWEETS",
      "objective": "APP_INSTALLS",
      "paused": true,
      "account_id": "18ce54d4x5t",
      "categories": [
        "IAB12"
      ],
      "campaign_id": "6eo26"
    }
  }
}

Creating the association between the app and the line item.

$ twurl -X POST -H ads-api.twitter.com "/1/accounts/18ce54d4x5t/line_item_apps?line_item_id=6oq2e&app_store_identifier=com.twitter.android&os_type=ANDROID" | jq
{
  "date_type": "line_item_apps",
  "data": {
    "line_item_id": "6oq2e",
    "app_store_identifier": "com.twitter.android",
    "id": "1dn4u",
    "created_at": "2016-11-07T22:19:56Z",
    "updated_at": "2016-11-07T22:19:56Z",
    "os_type": "Android",
    "deleted": false
  }
}

Retrieving the associations.

$ twurl -H ads-api.twitter.com "/1/accounts/18ce54d4x5t/line_item_apps" | jq
{
  "request": {
    "params": {
      "account_id": "18ce54d4x5t"
    }
  },
  "data": [
    {
      "line_item_id": "6oq2e",
      "app_store_identifier": "com.twitter.android",
      "id": "1dn4u",
      "created_at": "2016-11-07T22:19:56Z",
      "updated_at": "2016-11-07T22:19:56Z",
      "os_type": "Android",
      "deleted": false
    }
  ],
  "data_type": "line_item_apps",
  "total_count": 1,
  "next_cursor": null
}

Same result when including with_deleted=true.

Anything here look different than what you did?


#10

Hi @juanshishido thanks for the support,

I think it could be related to the fact I’ve pointed before:

I’ve tested this and these are my results:

twurl -H https://ads-api.twitter.com /1/accounts/2aev1e/line_item_apps?with_deleted=true | python -m json.tool

{
    "data": [
        {
            "app_store_identifier": "406669841",
            "created_at": "2016-04-28T12:45:25Z",
            "deleted": false,
            "id": "x2nq",
            "line_item_id": "51jd5",
            "os_type": "iOS",
            "updated_at": "2016-04-28T12:45:25Z"
        },
        {
            "app_store_identifier": "com.groupalia.groupalia",
            "created_at": "2016-04-29T14:31:30Z",
            "deleted": false,
            "id": "xc8y",
            "line_item_id": "51zlm",
            "os_type": "Android",
            "updated_at": "2016-04-29T14:31:30Z"
        }
    ],
    "data_type": "line_item_apps",
    "next_cursor": null,
    "request": {
        "params": {
            "account_id": "2aev1e",
            "with_deleted": true
        }
    },
    "total_count": 6
}

I don’t know if you can reproduce this call on your side, but if you can, you’ll see the same behaviour.

Thanks!


#11

@hector_borras: The line item we created is paused. We’re trying to reproduce this on our side with one of our accounts, but haven’t been able to. Does anything else look different?


#12

Hi Juan,

I have been able to reproduce this when the twitter line item is active / unpaused. I think there is a more generic problem having to do with the endpoints not returning an accurate list of line_item_apps. If you like, I can give you very specific examples with IDs via email or post them here.

Thanks,

Chris


#13

Thanks, @chris_august7. We need to be able to repro on our end. Can you identify anything in your repro steps that is different from what we posted above?


#14

Hi @juanshishido,

Yes, what we get is different. We can’t retrieve the associations we’ve created. See below.

------ STEP 1: ------------ View the line item that we will add the association to ------------

$ twurl -H https://ads-api.twitter.com /1/accounts/okrly1/line_items/6n06u | python -m json.tool
{
    "data": {
        "account_id": "okrly1",
        "advertiser_domain": null,
        "advertiser_user_id": 342317535,
        "automatically_select_bid": false,
        "bid_amount_local_micro": 100000,
        "bid_type": "MAX",
        "bid_unit": "APP_CLICK",
        "campaign_id": "6btwf",
        "categories": [],
        "charge_by": "APP_CLICK",
        "created_at": "2016-11-01T22:17:31Z",
        "creative_source": "MANUAL",
        "currency": "USD",
        "deleted": false,
        "end_time": null,
        "entity_status": "ACTIVE",
        "id": "6n06u",
        "include_sentiment": "POSITIVE_ONLY",
        "name": "test line item",
        "objective": "APP_INSTALLS",
        "optimization": "DEFAULT",
        "paused": false,
        "placements": [
            "ALL_ON_TWITTER"
        ],
        "primary_web_event_tag": null,
        "product_type": "PROMOTED_TWEETS",
        "start_time": null,
        "target_cpa_local_micro": null,
        "total_budget_amount_local_micro": null,
        "tracking_tags": [],
        "updated_at": "2016-11-01T22:44:43Z"
    },
    "data_type": "line_item",
    "request": {
        "params": {
            "account_id": "okrly1",
            "line_item_id": "6n06u"
        }
    }
}

------ STEP 2: ------------ create the line item app ------------

$ twurl -X POST -H ads-api.twitter.com "/1/accounts/okrly1/line_item_apps?line_item_id=6n06u&app_store_identifier=com.twitter.android&os_type=ANDROID" | python -m json.tool
{
    "data": {
        "app_store_identifier": "com.twitter.android",
        "created_at": "2016-11-17T19:42:58Z",
        "deleted": false,
        "id": "1e9pq",
        "line_item_id": "6n06u",
        "os_type": "Android",
        "updated_at": "2016-11-17T19:42:58Z"
    },
    "date_type": "line_item_apps"
}

------ STEP 3: ------------ attempt to view the line item apps for the account (none returned) ------------

$ twurl -H ads-api.twitter.com "/1/accounts/okrly1/line_item_apps" | python -m json.tool
{
    "data": [],
    "data_type": "line_item_apps",
    "next_cursor": null,
    "request": {
        "params": {
            "account_id": "okrly1"
        }
    },
    "total_count": 0
}

------ STEP 4: ------------ attempt to view the line item apps for the account including deleted (none returned) –

$ twurl -H ads-api.twitter.com "/1/accounts/okrly1/line_item_apps?with_deleted=true" | python -m json.tool
{
    "data": [],
    "data_type": "line_item_apps",
    "next_cursor": null,
    "request": {
        "params": {
            "account_id": "okrly1",
            "with_deleted": true
        }
    },
    "total_count": 0
}

#15

@chris_august7 and @hector_borras: Thanks again for providing the requests and responses as well as your insights.

We made another request to the GET accounts/:account_id/line_item_apps and are not seeing "total_count": 0 like in your examples.

We have made 4 line item to mobile app associations and see "total_count": 4 in the response.

$ twurl -H ads-api.twitter.com "/1/accounts/18ce54d4x5t/line_item_apps" | jq
{
  "request": {
    "params": {
      "account_id": "18ce54d4x5t"
    }
  },
  "data": [
    {
      "line_item_id": "6oq2e",
      "app_store_identifier": "com.twitter.android",
      "id": "1dn4u",
      "created_at": "2016-11-07T22:19:56Z",
      "updated_at": "2016-11-07T22:19:56Z",
      "os_type": "Android",
      "deleted": false
    },
    {
      "line_item_id": "6oqah",
      "app_store_identifier": "com.vine.android",
      "id": "1dn4y",
      "created_at": "2016-11-07T22:28:56Z",
      "updated_at": "2016-11-07T22:28:56Z",
      "os_type": "Android",
      "deleted": false
    }
  ],
  "data_type": "line_item_apps",
  "total_count": 4,
  "next_cursor": null
}

However, we are only seeing entities with unique app_store_identifier values—the two that aren’t shown are also "com.twitter.android".

But we still can’t determine why, in your requests, you are seeing "total_count": 0. Could you please send us a list of line item IDs that you’ve associated mobile apps with?


#16

Thanks @juanshishido

I can’t access now to that data.

I’ll do it on Monday.

Anyway, could it be that if the Ads API platform doesn’t found the app, it doesn’t include it as a line_item_app? (It’s only an idea… hahaha)


#17

@hector_borras: Not a problem—we were able to get the line items.

That’s not a bad idea. We’ll try with a non-existent app.

Thanks and have a nice weekend!


#18

Hi @juanshishido,

There should be at least two line item apps associated with line item 6n06u in account okrly1.

Thanks,

Chris


#19

Thanks, @chris_august7! We found three line item apps associated with that line item.

In the previous post, we noticed that the line item isn’t paused: "paused": false. Still trying to determine the issue.


#20

I don’t see any reason why the paused status of the line item should be related to whether I can associate a line item app with it.

Do you have access to the okrly1 account?