Hi Hugh, I've given a sample request xml for retrieving all the adgroups under a campaign. Hope it helps:
POST https://adwords.google.com/api/adwords/cm/v201109/AdGroupService HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.5448) VsDebuggerCausalityData: uIDPo7RV/UBdQ99Bghl6qna9Q1YAAAAAk0qp/AtLr0a+y6jYXcVZr65sYIwHQ6dBg1aoYYrxxmYACQAA Content-Type: text/xml; charset=utf-8 SOAPAction: "" Host: adwords.google.com Content-Length: 1378 Accept-Encoding: gzip <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201109"><authToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">****</authToken><developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">*****</developerToken><clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201109">*****</clientCustomerId><userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201109">AwApi-DotNet-1.0.0|INSERT_YOUR_COMPANY_OR_APPLICATION_NAME_HERE</userAgent></RequestHeader></soap:Header><soap:Body><get xmlns="https://adwords.google.com/api/adwords/cm/v201109"><serviceSelector><fields>Id</fields><fields>Name</fields><predicates><field>CampaignId</field><operator>EQUALS</operator><values>1234567890</values></predicates><paging><startIndex>0</startIndex><numberResults>500</numberResults></paging></serviceSelector></get></soap:Body></soap:Envelope> Also, is there a reason why you are not using a client library? http://code.google.com/apis/adwords/docs/clientlibraries.html Cheers, Anash P. Oommen, AdWords API Advisor. On Monday, 5 March 2012 16:46:20 UTC+5:30, HughAJWood wrote: > > I am having trouble in using the documentation of the adwords API due to > there being no XML examples, to go by and all the documentation only really > helps if you are using a prebuilt interface for a supported format in my > eyes and doesn't flow like any other API documentation I have ever used. > > My problem is when I try and use the selector I have built the soap > envelope as I would thought it would be built following the documentation > but it just throws it back with various enumeration errors, which I find > confusing. This is the 5th API I have used and the first I have come into > with such confusion as to how it is laid out. > > I have an example of a mutate request but I am lacking a selector, what I > simply want to do using v201109 is to select my ad campaigns, could > somebody see to supply an example XML envelope of the request to pull back > the *adgroups* and I am confident I will be able to work out the rest > from there as I basically just need to see where I am going wrong. > -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en
