Hello,
I’d like to set daily_budget_amount_local_micro to line item but I got an error when I tried to set it.
{
"errors": [
{
"code": "INVALID",
"message": "You can’t set an ad group daily budget when campaign budget optimization is on.",
"attribute": ""
}
],
}
Therefore, I thought that it was necessary to register the budget_optimization=LINE_ITEM of campaign from the error content, so I tried to set it, but an error occurred.
$ twurl -H ads-api.twitter.com -X POST '/11/accounts/18ce54vi2tf/campaigns?name=newCampaign&funding_instrument_id=unqmj&entity_status=PAUSED&standard_delivery=true&budget_optimization=LINE_ITEM'
{
"errors": [
{
"code": "INVALID",
"message": "Your account is not eligible to set campaign budget optimization to LINE_ITEM.",
"attribute": "budget_optimization"
}
],
"request": {
"params": {
"name": "newCampaign",
"budget_optimization": "LINE_ITEM",
"funding_instrument_id": "unqmj",
"standard_delivery": true,
"entity_status": "PAUSED",
"account_id": "18ce54vi2tf"
}
}
}
Is it still possible to set a daily budget with Ads API version 11?
Hello,
Thanks for reaching out. The parameter daily_budget_amount_local_micro is only required when the budget optimization is CAMPAIGN. If the budget optimization is LINE_ITEM, the parameter cannot be set. This updated information can be found here. Hope this clarifies.
Thank you for your reply.
The parameter daily_budget_amount_local_micro could not be set when the budget optimization is CAMPAIGN.
The settings of the campaign are as follows.
The parameter budget_optimization is CAMPAIGN.
$ twurl -H ads-api.twitter.com -X GET '/11/accounts/18ce54vi2tf/campaigns/ho41l' | jq .
{
"request": {
"params": {
"campaign_id": "ho41l",
"account_id": "18ce54vi2tf"
}
},
"data": {
"name": "testCampaign",
"budget_optimization": "CAMPAIGN",
"reasons_not_servable": [
"PAUSED_BY_ADVERTISER"
],
"servable": false,
"purchase_order_number": null,
"effective_status": "PAUSED",
"daily_budget_amount_local_micro": 1000000,
"funding_instrument_id": "unqmj",
"duration_in_days": null,
"standard_delivery": true,
"total_budget_amount_local_micro": null,
"id": "ho41l",
"entity_status": "PAUSED",
"frequency_cap": null,
"currency": "JPY",
"created_at": "2022-04-27T00:55:17Z",
"updated_at": "2022-04-27T06:52:50Z",
"deleted": false
}
}
But I got the following error when setting to daily_budget_amount_local_micro to line item :
$ twurl -H ads-api.twitter.com -X POST '/11/accounts/18ce54vi2tf/line_items?android_app_store_identifier=test_app_identifier&bid_strategy=AUTO&campaign_id=ho41l&entity_status=PAUSED&goal=APP_CLICKS&name=teststest&objective=APP_INSTALLS&pay_by=APP_CLICK&placements=ALL_ON_TWITTER&product_type=PROMOTED_TWEETS&start_time=2022-04-12&daily_budget_amount_local_micro=1000000' | jq .
{
"errors": [
{
"code": "INVALID",
"message": "You can’t set an ad group daily budget when campaign budget optimization is on.",
"attribute": ""
}
],
I don’t know why.
Hello,
You should use this endpoint instead to set the daily_budget_amount_local_micro for the campaign. POST accounts/:account_id/campaigns
Hello,
Campaign endpoint?
Doesn’t this daily_budget_amount_local_micro parameter have been added to the line_item endpoint in version 11?
Hello,
The daily_budget_amount_local_micro param can only be found in the POST accounts/:account_id/campaigns endpoint.
For the POST accounts/:account_id/line_items endpoint, the only param that can be set is total_budget_amount_local_micro
From your request:
$ twurl -H ads-api.twitter.com -X POST '/11/accounts/18ce54vi2tf/line_items?android_app_store_identifier=test_app_identifier&bid_strategy=AUTO&campaign_id=ho41l&entity_status=PAUSED&goal=APP_CLICKS&name=teststest&objective=APP_INSTALLS&pay_by=APP_CLICK&placements=ALL_ON_TWITTER&product_type=PROMOTED_TWEETS&start_time=2022-04-12&daily_budget_amount_local_micro=1000000' | jq .
At the back, you are using daily_budget_amount_local_micro, which from the LINE_ITEM documentation, this parameter cannot be found. It is only in the CAMPAIGN endpoint documentation which has the param.
Hope this clarifies.
I understood your explanation perfectly!
Thank you very much.
I found out how to set it.