How to add a new Ad ?

39 views
Skip to first unread message

jona...@garagecoders.net

unread,
Dec 15, 2015, 12:34:40 PM12/15/15
to AdWords API Forum
Hi I'm trying to add a new Ad to my adgroup but i got this error 

<soap:Body>
    <soap:Fault>
        <faultcode>soap:Server</faultcode>
        <faultstring>[AdError.EMPTY_FIELD @ operations[0].operand.ad.finalUrls; trigger:'breaks Default rule. url setting constraint.']</faultstring>
        <detail>
            <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201506">
                <message>[AdError.EMPTY_FIELD @ operations[0].operand.ad.finalUrls; trigger:'breaks Default rule. url setting constraint.']</message>
                <ApplicationException.Type>ApiException</ApplicationException.Type>
                <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AdError">
                    <fieldPath>operations[0].operand.ad.finalUrls</fieldPath>
                    <trigger>breaks Default rule. url setting constraint.</trigger>
                    <errorString>AdError.EMPTY_FIELD</errorString>
                    <ApiError.Type>AdError</ApiError.Type>
                    <reason>EMPTY_FIELD</reason>
                </errors>
            </ApiExceptionFault>
        </detail>
    </soap:Fault>
</soap:Body>


This is my request just for testing
<soap:Body>
    <n1:mutate>
        <n1:operations>
            <n1:operator>ADD</n1:operator>
            <n1:operand>
                <n1:adGroupId>?????????</n1:adGroupId>
                <n1:ad n2:type="n1:TextAd">
                    <n1:displayUrl>someURL</n1:displayUrl>
                    <n1:headline>someHEDLINE</n1:headline>
                    <n1:description1>someDESCRIPTION</n1:description1>
                    <n1:description2> someDESCRIPTION </n1:description2>
                </n1:ad>
            </n1:operand>
        </n1:operations>
    </n1:mutate>
</soap:Body>


I understand that i need to add the field finals url but this is an array and I'm not sure what data i have to add to this array.

Thanks

Yin Niu

unread,
Dec 15, 2015, 1:51:52 PM12/15/15
to AdWords API Forum
Hi Jonathan, 

As you can tell from the error message in the SOAP response "AdError.EMPTY_FIELD @ operations[0].operand.ad.finalUrls;", you must set finalUrls also. 

Thanks,
Yin, AdWords API Team. 
Reply all
Reply to author
Forward
0 new messages