Total Budget Search Campaign

99 views
Skip to first unread message

Maxime Heurtevent

unread,
Mar 3, 2024, 7:53:03 PM3/3/24
to Google Ads API and AdWords API Forum
Hello, 

I'm trying to create a Search campaign using a Total Amount Budget using the REST interface.

Params to create the total budget: (no errors)
create:{
    name: <NAME>,
    totalAmountMicros: <TOTAL_AMOUNT_MICROS>, 
    explicitly_shared: false,
    status: "ENABLED",
    delivery_method: "STANDARD",
    period: "CUSTOM_PERIOD"
}

Params to create the Campaign (works if DAILY budget period and amountMicros param instead of totalAmoutMicros):
{
  "operations": [
    {
      "create": {
        "name": "<CAMPAIGN_NAME>",
        "status": "PAUSED",
        "advertisingChannelType": "SEARCH",
        "networkSettings": {
          "targetGoogleSearch": true,
          "targetSearchNetwork": true,
          "targetContentNetwork": false,
          "targetPartnerSearchNetwork": false
        },
        "manualCpc": {
          "enhancedCpcEnabled": false
        },
        "campaignBudget": "customers/1980789725/campaignBudgets/13411425829",
      }
    }
  ]
}

Even with start & end date params, I still have the same issue: (below the error I got)
{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.ads.googleads.v16.errors.GoogleAdsFailure",
        "errors": [
          {
            "errorCode": {
              "campaignBudgetError": "INVALID_PERIOD"
            },
            "message": "The period of the budget is not allowed.",
            "trigger": {
              "int64Value": "13411425829"
            },
            "location": {
              "fieldPathElements": [
                {
                  "fieldName": "operations",
                  "index": 0
                },
                {
                  "fieldName": "create"
                },
                {
                  "fieldName": "campaign_budget"
                }
              ]
            }
          }
        ],
        "requestId": "yPqlO-Tw9N1uMwBP5olR0g"
      }
    ]
  }
}

So i wanted to know how can I create campaigns using Total Amount Budget (No set date + consume budget until exhausted), and if not, what are the campaigns i cannot use with this type of Budget.
I can provide you more informations if needed

Thank you

Sincerely, 

Google Ads API Forum Advisor

unread,
Mar 4, 2024, 2:52:28 AM3/4/24
to m.77.heurtev...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your concern, I understand that you are encountering an "INVALID_PERIOD" error while setting the campaign budget in the Google Ads API. The standard delivery method aims to evenly distribute your budget across the entire day (12 AM – 11:59 PM). I would recommend you to kindly refer to this help center article "About ad scheduling" for more information on ad delivery. 

In order to investigate your issue further, kindly provide us with the complete API logs (request and response logs with request-id and request header) generated at your end to better you further. 

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rzdME:ref"

Thanks,
 
Google Logo Google Ads API Team


Maxime Heurtevent

unread,
Mar 4, 2024, 7:53:17 AM3/4/24
to Google Ads API and AdWords API Forum
That's not what I was asking. I'd like to know how and what parameters to enter in order to create a Global Campaign budget. This budget will not be daily but will be total and will run until the entire budget is used up.

Thanks, 

Google Ads API Forum Advisor

unread,
Mar 4, 2024, 1:51:41 PM3/4/24
to m.77.heurtev...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your concern, I understand that you are trying to know about the parameters while creating a Global Campaign budget. In order to create a campaign budget, I would suggest you refer to the Create a Campaign Budget code sample and to know about its parameters kindly refer to the Request body of Method:customers.campaignBudgets.mutate.

If this is not what you are looking for, kindly provide us with more information on the Global Campaign budget to assist you better.
Reply all
Reply to author
Forward
0 new messages