Bid Type AUTO requires Bid Amount

ads

#1

Hi All!

I’m having some issues when trying to edit a line item. Basically, when I set automatically_select_bid=true and I don’t specify bid_type, the API it’s returning me the following error:

“bid_amount_local_micro is a required parameter”

Also tried sending bid_type=AUTO and not specyfing automatically_select_bid, but I’m still receiving the same error. Here is the documentation for that endpoint: https://dev.twitter.com/ads/reference/put/accounts/%3Aaccount_id/line_items/%3Aline_item_id. For the automatically_select_bid field it says “If set to true, bid_amount_local_micro must be NULL, and bid_type will be set to AUTO.”, but it’s not working in that way.

Here is one of the requests I’m doing:

URL: https://ads-api-sandbox.twitter.com/0/accounts/gq10ri/line_items/cmnf

Body:
{
“campaign_id”: “g930”,
“product_type”: “PROMOTED_TWEETS”,
“placements”: [
“ALL_ON_TWITTER”
],
“objective”: “WEBSITE_CLICKS”,
“name”: “”,
“bid_amount_local_micro”: null,
“automatically_select_bid”: true,
“total_budget_amount_local_micro”: null,
“paused”: false,
“deleted”: false
}

Thanks in advice!


#2

You are doing a PUT correct? I do not see you actually passing bid_type in the parameters of your request. It may be easier for us to debug if you to try to repro with twurl tool and paste that here.


#3

Good morning @JBabichJapan

Thanks for your response. Finally figured out the issue. I’ll put the comment here, so anyone who has the same issue could find it useful.

The problem with my request was that I wasn’t putting bid_amount_local_micro:null in the body of the request. Basically, my app was ignoring the null fields and wasn’t sending them in the request. So, it wasn’t sending the following:

“bid_amount_local_micro”: null

And that value needs to be specified in the request when:

“automatically_select_bid”: true

Also, consider that if automatically_select_bid is true, you shouldn’t specify the bid_type parameter in the body of the request.

Thanks for your help!