Receiving Error while trying to pause ads


#1

We are trying to pause a line item that is near running out of budget, however twitter is responding with an error that the line item bid is lower than the daily budget, but it’s running now and we’re trying to make it stop, so this doesn’t really make any sense, right? We’re trying to make it stop spending, not launch anything. anyway here’s the call and response:

System tries to pause LineItem as expected
2015-09-12 15:32:48 -0700 - [INFO] - from com.boostable.integration.twitter.service.TwitterAdService$ in play-akka.actor.default-dispatcher-99
Update LineItem: twurl -H ads-api.twitter.com -d “paused=true” /0/accounts/plymv/line_items/2za5z

Twitter restricts pause due to following error
2015-09-12 15:32:49 -0700 - [INFO] - from com.boostable.integration.twitter.service.TwitterAdService$ in play-akka.actor.default-dispatcher-105
400: {“errors”:[{“code”:“INVALID”,“message”:“LineItem’s bid amount 3900000 exceeds its Campaign daily_budget_amount_local_micro: 2540000”,“attribute”:“daily_budget_amount_local_micro”}],“request”:{" params":{“line_item_id”:“2za5z”,“paused”:true,“account_id”:“plymv”}}}


#2

Inquiring minds want to know:
@RickApicella @spacer59


#3

There’s nothing special about performing a write to pause a line item that lets you skip the normal validations that are in place. All writes are treated as modifications to the line item and all necessary validations are performed on any modification. Any write operation you perform on a line item validates the exact same way to ensure the line item always remains in a valid state.

You aren’t allowed to set a bid higher than your campaign’s daily budget (which looks as if it was adjusted after this line item was created).

As a best practice, I’d recommend ensuring that you always adjust line item bid values when you do things like adjust campaign level spend limits to keep them in sync and set to sensible levels. However, for this specific case as noted in the error response you can only pause the line item if you adjust the bid_amount_local_micro value to a valid value as well.

twurl -X PUT -H ads-api.twitter.com "/0/accounts/plymv/line_items/2za5z" -d "paused=true&bid_amount_local_micro=2540000"