Hi,
I am trying to update bids for line items that were created on dashboard and did not have any category set. I want to update bids for those line items through API but I get the error :

“message”: “A minimum of 1 items must be provided for categories”

Is there not any way to update bids without explicitly mentioning categories for line items that did not have any categories to begin with.

@SaadAhmedQure10 What’s your Ads account ID and the line_item_id in question?

By the way, do you think is that because of this?

categories: sometimes required
Note : Required when the line item’s placement is set to PUBLISHER_NETWORK.

PUT accounts/:account_id/line_items/:line_item_id

Hi,

No the placement was set to " [‘TWITTER_PROFILE’, ‘TWITTER_TIMELINE’]" . My question is that if I can change the bids for these campaigns on dashboard without being prompted for categories. Why do I get prompted to enter Categories in API when trying to update bids.

Can you please provide an example line item ID so we can take a closer look? Thanks, @SaadAhmedQure10.

Hi Juan,

The line Id for the item is eyljw .

Regards,

Saad Qureshi

Thanks for the information.

I’m not able to reproduce this. I’ve created a line item with the same values (except name and currency) and am able to successfully update the bid.

$ twurl -X PUT -H ads-api.twitter.com "/5/accounts/18ce54d4x5t/line_items/f8hpn?bid_amount_local_micro=490000"
{
  "data": {
    "bid_type": "TARGET",
    "advertiser_user_id": 756201191646691328,
    "name": "Untitled",
    "placements": [
      "TWITTER_TIMELINE",
      "TWITTER_PROFILE"
    ],
    "start_time": null,
    "bid_amount_local_micro": 490000,
    "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_ENGAGEMENTS",
    "id": "f8hpn",
    "entity_status": "ACTIVE",
    "optimization": "DEFAULT",
    "categories": [],
    "currency": "USD",
    "created_at": "2019-06-04T17:08:52Z",
    "tracking_tags": [],
    "updated_at": "2019-06-04T17:11:02Z",
    "include_sentiment": "ALL",
    "campaign_id": "cmajj",
    "creative_source": "MANUAL",
    "deleted": false
  },
  "request": {
    "params": {
      "line_item_id": "f8hpn",
      "bid_amount_local_micro": 490000,
      "account_id": "18ce54d4x5t"
    }
  }
}

Could you please provide the full request and response? (Are you using an SDK by chance?)

Hi Juan
Yes I am using the python SDK. Just to experment I created a test adgroup id f8qrh without any category, with placements on TWITTER_TIMELINE. It did not ask me for category ID when I updated the bids using Twurl. But it asks me for category when I use the SDK. Can you suggest a way to circumvent this issue because most of the development we do will be using the SDK.

Regards,

Saad Qureshi

Thanks for confirming that you are using the Python SDK. Let us look into it. It looks like there is a PR (#119) that may address this.