Create Campaign Soap Order

25 views
Skip to first unread message

RAN HU

unread,
Nov 12, 2018, 1:22:38 PM11/12/18
to AdWords API and Google Ads API Forum
Hi Google,

Following is working one soap request 

<?xml version="1.0" encoding="utf-8"?>
<soap:Header>
<ns1:developerToken></ns1:developerToken>
<ns1:userAgent></ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:clientCustomerId></ns1:clientCustomerId>
</ns1:RequestHeader>
</soap:Header>
<soap:Body>
<operations><operator>ADD</operator>
<operand>
<name>test_1542045705861</name>
<status>ENABLED</status>
<budget>
<budgetId>1678284892</budgetId>
</budget>
<advertisingChannelType>DISPLAY</advertisingChannelType>
<biddingStrategyConfiguration><biddingStrategyType>MANUAL_CPC</biddingStrategyType></biddingStrategyConfiguration>
</operand>
</operations>
</mutate>
</soap:Body>
</soap:Envelope>

Following is NOT WORKING one soap request 

<?xml version="1.0" encoding="utf-8"?>
<soap:Header>
<ns1:developerToken></ns1:developerToken>
<ns1:userAgent></ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:clientCustomerId></ns1:clientCustomerId>
</ns1:RequestHeader>
</soap:Header>
<soap:Body>
<operator>ADD</operator>
<operand>
<name>test_1542045755578</name>
<status>ENABLED</status>
<budget>
<budgetId>1678284949</budgetId>
</budget>
<biddingStrategyConfiguration><biddingStrategyType>MANUAL_CPC</biddingStrategyType></biddingStrategyConfiguration>
<advertisingChannelType>DISPLAY</advertisingChannelType>
</operand>
</operations>
</mutate>
</soap:Body>
</soap:Envelope>

ONLY thing i changed between those 2 requets is order of biddingStrategyConfiguration and advertisingChannelType.
Second soup request resopnse 

Uncaught Error: soap:Client: Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"https://adwords.google.com/api/adwords/cm/v201809":advertisingChannelType}'. One of '{"https://adwords.google.com/api/adwords/cm/v201809":campaignTrialType, "https://adwords.google.com/api/adwords/cm/v201809":baseCampaignId, "https://adwords.google.com/api/adwords/cm/v201809":forwardCompatibilityMap, "https://adwords.google.com/api/adwords/cm/v201809":trackingUrlTemplate, "https://adwords.google.com/api/adwords/cm/v201809":finalUrlSuffix, "https://adwords.google.com/api/adwords/cm/v201809":urlCustomParameters, "https://adwords.google.com/api/adwords/cm/v201809":vanityPharma, "https://adwords.google.com/api/adwords/cm/v201809":universalAppCampaignInfo, "https://adwords.google.com/api/adwords/cm/v201809":selectiveOptimization}' is expected.


the order matters a lot?

Thanks,
Ran

Dannison Yao (AdWords API Team)

unread,
Nov 12, 2018, 3:05:17 PM11/12/18
to AdWords API and Google Ads API Forum
Hi Ran,

Could you provide the complete SOAP request and response logs generated when the error was encountered via Reply privately to author so I could investigate this further? 

The ordering of the settings should vary on the situation. However, it is advised to follow the order (as shown here) of the fields when configuring it.

Regards,
Dannison
AdWords API Team
Reply all
Reply to author
Forward
0 new messages