I am trying to upload a conversion using REST API, as I am writing code in rust hence no library is there for that, I am struggling to get the correct response, as, I am not aware of what should the proper request body, and there is no sample payload for a request given by google, the help available is not sufficient to make my request thru.

URL https://googleads.googleapis.com/v10/customers/948-412-1501:uploadClickConversions

Header: 'developer-token': 'X8ec', Authorization: 'Bearer ya29', 'Content-Type': 'application/json'

Post Body { "gclid": "0988098080", "conversionAction": "Submit lead form", "conversionDateTime": "2022-08-06 12:32:45-08:00", "conversionValue": "10", "currencyCode": "10", "orderId": "11111" }

Response

{ "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name "gclid": Cannot find field.\nInvalid JSON payload received. Unknown name "conversionAction": Cannot find field.\nInvalid JSON payload received. Unknown name "conversionDateTime": Cannot find field.\nInvalid JSON payload received. Unknown name "conversionValue": Cannot find field.\nInvalid JSON payload received. Unknown name "currencyCode": Cannot find field.\nInvalid JSON payload received. Unknown name "orderId": Cannot find field.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "description": "Invalid JSON payload received. Unknown name "gclid": Cannot find field." }, { "description": "Invalid JSON payload received. Unknown name "conversionAction": Cannot find field." }, { "description": "Invalid JSON payload received. Unknown name "conversionDateTime": Cannot find field." }, { "description": "Invalid JSON payload received. Unknown name "conversionValue": Cannot find field." }, { "description": "Invalid JSON payload received. Unknown name "currencyCode": Cannot find field." }, { "description": "Invalid JSON payload received. Unknown name "orderId": Cannot find field." } ] } ] } }

Tag:google-ads-api, rest

Only one comment.

  1. user14118621

    I think u have invalid POST request Look up Google api documentation

    { "conversions": [ { object (ClickConversion) <-- gclid must be here } ], "partialFailure": boolean, "validateOnly": boolean }

Add a new comment.