Hi Dan,

I believe the problem is that your adservice_data object is not
structured correctly.  This object represents an AdGroupAd, which
doesn't have an "id" field ( see
http://code.google.com/apis/adwords/v2009/docs/reference/AdGroupAdService.AdGroupAd.html
).  Instead, there is an "ad" field holds an Ad, which in turn has the
"id" field.  Your object should probably look like:

adservice_data = {
        :ad => {
                :id => self.adwords_id
        }
        :adGroupId => self.adwords_adgroup_id,
        :status => "#{self.status.upcase}"
}

Best,
- Eric Koleda, AdWords API Team

On Nov 5, 11:37 am, Dan Hill <d...@serenestudios.co.uk> wrote:
> Hi all,
>
> I'm developing a tool using Ruby Rails and Adwords4r. All is going
> great, apart from I keep getting an
> InternalApiError.UNEXPECTED_INTERNAL_API_ERROR every time I try and
> SET mutate an AdGroupAd (a text ad). I can create the ad fine, but
> whenever I try and update its status it gives me this error. I know I
> can't change the ad itself, but I only want to pause/enable the add,
> not change anything else. The code I'm using is:
>
> load_credentials
>
> adservice_data = {
>         :id => self.adwords_id,
>         :adGroupId => self.adwords_adgroup_id,
>         :status => "#{self.status.upcase}"
>
> }
>
> operation = {
>         :operand => adservice_data,
>          :operator => 'SET'
>          }
> response = @adwords_adservice_srv.mutate([operation])
>
> Anyone have any tips?
>
> Many thanks,
>
> Dan

--

You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-...@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.


Reply via email to