The error message is stating that "Both the percent off and money amount off fields are set.", which means that you cannot set both values at the same time. When you update the resource, looking at your request, I don't see that you're clearing out the old value.
I don't see you clearing out the old money amount off you had set. First, I would try including the field for the `moneyAmountOff` in the `updateMask` (and not include that field in the update request), so that it deletes that field from the resource. You can refer to the clearing fields guide for more information.
If that still gives you the same error, then I would try clearing the `moneyAmountOff` field first, and then sending a second request to update it to use `percentOff`. That should solve the error. However, I am providing you the sample request and response on how to update the discount type from 'moneyAmountOff' to 'percentOff':
Request Body: ============== POST https://googleads.googleapis.com/v18/customers/{customerId}/assets:mutate?key=[YOUR_API_KEY] HTTP/1.1 developer-token: ********************** Authorization: Bearer [YOUR_ACCESS_TOKEN] Accept: application/json Content-Type: application/json { "operations": [ { "update": { "resourceName": "customers/{customerId}/assets/{assetId}", "promotionAsset": { "percentOff": 50000 } }, "updateMask": "promotionAsset.percentOff,promotionAsset.moneyAmountOff" } ] } Response: ============ HTTP/1.1 200 content-encoding: gzip content-length: 106 content-type: application/json; charset=UTF-8 date: Mon, 10 Feb 2025 11:59:03 GMT server: ESF vary: Origin, X-Origin, Referer { "results": [ { "resourceName": "customers/{customerId}/assets/{assetId}" } ] }
I hope this helps.
![]() |
Google Ads API Team |