Maximum cost-per-click limit

45 views
Skip to first unread message

Сергей Александрович

unread,
Mar 7, 2025, 7:01:25 AM3/7/25
to Google Ads API and AdWords API Forum
Good afternoon I am trying to set the value of the maximum price per click with this request:

{
  "operations": [
    {
      "update": {
        "targetSpend": {
          "cpcBidCeilingMicros": 5300000
        },
        "resourceName": "customers/*********/campaigns/*******"
      },
      "updateMask": "target_spend.cpc_bid_ceiling_micros"
    }
  ]

}

But I get an error:
{
    "error": {
        "code": 400,
        "message": "Invalid JSON payload received. Unknown name \"targetSpend\" at 'operations[0].update': Cannot find field.",
        "status": "INVALID_ARGUMENT",
        "details": [{
            "@type": "type.googleapis.com/google.rpc.BadRequest",
            "fieldViolations": [{
                "field": "operations[0].update",
                "description": "Invalid JSON payload received. Unknown name \"targetSpend\" at 'operations[0].update': Cannot find field."
            }]
        }]
    }
}

Help please

Сергей Александрович

unread,
Mar 7, 2025, 10:57:37 AM3/7/25
to adwor...@googlegroups.com

Google Ads API Forum Advisor

unread,
Mar 7, 2025, 11:27:15 AM3/7/25
to che...@gmail.com, adwor...@googlegroups.com
Hi,

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

The error message states: "Invalid JSON payload received. Unknown name 'targetSpend' at 'operations[0].update': Cannot find field." This indicates that you are attempting to update a field that does not exist.

I recommend that before updating any field, you first verify whether the field exists and has a corresponding value. You can use the following GAQL query to check:
SELECT campaign_group.id, campaign.name, campaign.advertising_channel_type, 
campaign.target_spend.cpc_bid_ceiling_micros 
FROM campaign WHERE campaign.id = 'campaign.id' 
Based on the information provided, it appears you are trying to update the Maximum Conversions target cost-per-click. You may try the following sample request:
{
  "operations": [
    {
      "update": {
        "resourceName": "customers/**********/campaigns/"***********,
        "maximizeConversions": {
          "targetCpaMicros": 58000000
          
        }
        
      },
      "updateMask": "maximizeConversions.targetCpaMicros"
      
    }
    
  ]
  
}
If you still face any issues even after following the above suggestions, kindly share the latest complete API logs (request and response with request-id and request header) generated at your end.

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.NetPHPPythonRuby 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.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-03-07 16:26:18Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH75g:ref" (ADR-00292245)



Message has been deleted

Google Ads API Forum Advisor

unread,
Mar 10, 2025, 4:00:43 PM3/10/25
to che...@gmail.com, adwor...@googlegroups.com
Hi,

From the provided logs, I could see that the customer Id and campaign Id fields are redacted. Could you please provide us with the complete API logs (request and response logs with request-id and request header) without redacting any fields.


You can send the details via Reply privately to the author option, or direct private reply to this email.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-03-10 20:00:10Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH75g:ref" (ADR-00292245)



Message has been deleted

Google Ads API Forum Advisor

unread,
Mar 11, 2025, 10:21:19 AM3/11/25
to che...@gmail.com, adwor...@googlegroups.com
Hi,

Please be informed that I have removed your response from the forums as it contained the PII information.

We understand that you are encountering an 'INVALID_ARGUMENT' error while attempting to update the campaign's bidding strategy from 'Maximize clicks' to 'Maximize conversions' and modify the 'targetCpaMicros' value. We've reviewed the request ID and logs you provided, and they appear to be related to a query execution rather than the reported error. As requested earlier, could you please provide us with the complete API logs (request and response logs with request-id and request header) without redacting any fields pertaining to the reported error.

You can send the requested details via Reply privately to the author option, or direct private reply to this email.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-03-11 14:20:28Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH75g:ref" (ADR-00292245)



Reply all
Reply to author
Forward
0 new messages