I am using the rest interface because I have my application in go and there 
is no standard lib for it.
Here is the curl
curl --location 
'https://googleads.googleapis.com/v17/customers/4926841893/campaigns:mutate' 
\
--header 'developer-token: hN6dsqjNmj3tWdITcPd_Qg' \
--header 'login-customer-id: 3263459376' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 
ya29.a0AXooCgv756eKpN5h9TWccVdZyq6GUs3YQlA2cFipbDaF41dzXhxZVq40lzFZd3DyMZCv1a7x0hZZnBUah85MkWOcFQ9hELxZw01dkyAqyCIxKORk7vLL1C_A_zbiTANsXSjOV1Gr0W-hRhL6gbq7pZPpPADhnDiLE1jBaCgYKAcASARMSFQHGX2MikC5FoOFEJUQdN6Ayq8jmIw0171'
 
\
--data '{
    "operations": [
        {
            "create": {
                "name": "A video campaign",
                "status": "PAUSED",
                "campaignBudget": 
"customers/4926841893/campaignBudgets/13757766883",
                "advertisingChannelType": "VIDEO",
                "targetCpa": {
                    "targetCpaMicros": 5000000
                }
            }
        }
    ]
}
'

and the response
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": 
"type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "contextError": 
"OPERATION_NOT_PERMITTED_FOR_CONTEXT"
                        },
                        "message": "The operation is not allowed for the 
given context.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "target_cpa"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "mutateError": "MUTATE_NOT_ALLOWED"
                        },
                        "message": "Mutates are not allowed for the 
requested resource.",
                        "trigger": {
                            "stringValue": "VIDEO"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                }
                            ]
                        }
                    }
                ],
                "requestId": "QudlAS83vMKB-XjTYG7TUQ"
            }
        ]
    }
}

Thanks for your help

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/84a091bd-5c93-4d9f-add7-bcc5d970b114n%40googlegroups.com.

Reply via email to