bid_amount_local_micro not allowing NULL


#1

While creating a line_item, the documentation says about “bid_type”

If set to AUTO, bid_amount_local_micro must be NULL.

However when bid_amount_local_micro is sent as NULL. This error pops up:

twurl -H ads-api-sandbox.twitter.com -X POST -d “campaign_id=gq106g&bid_amount_local_micro=NULL&bid_type=AUTO&name=Bumpin Test Default Line Item&product_type=PROMOTED_TWEETS&placements=TWITTER_TIMELINE&objective=QUALIFIED_IMPRESSIONS&include_sentiment=ALL&optimization=DEFAULT&paused=false” /0/accounts/gq106g/line_items | jsonpretty
{
“errors”: [
{
“code”: “INVALID_PARAMETER”,
“message”: “Expected Long, got “NULL” for bid_amount_local_micro”,
“parameter”: “bid_amount_local_micro”
}
],
“request”: {
“params”: {
“bid_type”: “AUTO”,
“name”: “Bumpin Test Default Line Item”,
“placements”: [
“TWITTER_TIMELINE”
],
“product_type”: “PROMOTED_TWEETS”,
“objective”: “QUALIFIED_IMPRESSIONS”,
“paused”: false,
“account_id”: “gq106g”,
“optimization”: “DEFAULT”,
“include_sentiment”: “ALL”,
“campaign_id”: “gq106g”
}
}
}


#2

Have you tried omitting bid_amount_local_micro=NULL? By omitting it, you are not setting it to anything, which is what you are after here - I do admit the documentation isn’t entirely clear! Let us know if this does the trick for you.