It is not possible to set requestPlatformTargeting for proposal line items

79 views
Skip to first unread message

Gonzalo Oyarce

unread,
Jun 17, 2022, 10:46:02 AM6/17/22
to Google Ad Manager API Forum
Hi!
When submitting a proposal via API the submit request fails regardless the requestPlatformTargeting setting used for the item.

Please check on the the 4 cases exposed below.

Is this the expected behaviour? Please your help to understand what are we doing wrong?

*** CASE 1 ***

In request: Setting just 1 of the any of the available requestedPlatforms
<requestPlatformTargeting>
    <targetedRequestPlatforms>VIDEO_PLAYER</targetedRequestPlatforms>
</requestPlatformTargeting>


In response: ServerError
<soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>[ServerError.SERVER_ERROR @ ]</faultstring>
    <detail>
        <ApiExceptionFault xmlns="https://www.google.com/apis/ads/publisher/v202202">
            <message>[ServerError.SERVER_ERROR @ ]</message>
            <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ServerError">
                <fieldPath/>
                <trigger/>
                <errorString>ServerError.SERVER_ERROR</errorString>
                <reason>SERVER_ERROR</reason>
            </errors>
        </ApiExceptionFault>
    </detail>
</soap:Fault>


*** CASE 2 ***

In request: Setting 2 or more requestedPlatforms
<requestPlatformTargeting>
    <targetedRequestPlatforms>BROWSER</targetedRequestPlatforms>
    <targetedRequestPlatforms>VIDEO_PLAYER</targetedRequestPlatforms>
</requestPlatformTargeting>


In response: TOO_LARGE error
<soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>[RequiredCollectionError.TOO_LARGE @ [0].targeting.requestPlatformTargeting]</faultstring>
    <detail>
        <ApiExceptionFault xmlns="https://www.google.com/apis/ads/publisher/v202205">
            <message>[RequiredCollectionError.TOO_LARGE @ [0].targeting.requestPlatformTargeting]</message>
            <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredCollectionError">
                <fieldPath>[0].targeting.requestPlatformTargeting</fieldPath>
                <fieldPathElements>
                    <index>0</index>
                </fieldPathElements>
                <fieldPathElements>
                    <field>targeting</field>
                </fieldPathElements>
                <fieldPathElements>
                    <field>requestPlatformTargeting</field>
                </fieldPathElements>
                <trigger/>
                <errorString>RequiredCollectionError.TOO_LARGE</errorString>
                <reason>TOO_LARGE</reason>
            </errors>
        </ApiExceptionFault>
    </detail>
</soap:Fault>


*** CASE 3 ***
In request: Setting an empty array
<requestPlatformTargeting/>

In response: TOO_SMALL error
<soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>[RequiredCollectionError.TOO_SMALL @ [0].targeting.requestPlatformTargeting]</faultstring>
    <detail>
        <ApiExceptionFault xmlns="https://www.google.com/apis/ads/publisher/v202205">
            <message>[RequiredCollectionError.TOO_SMALL @ [0].targeting.requestPlatformTargeting]</message>
            <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredCollectionError">
                <fieldPath>[0].targeting.requestPlatformTargeting</fieldPath>
                <fieldPathElements>
                    <index>0</index>
                </fieldPathElements>
                <fieldPathElements>
                    <field>targeting</field>
                </fieldPathElements>
                <fieldPathElements>
                    <field>requestPlatformTargeting</field>
                </fieldPathElements>
                <trigger/>
                <errorString>RequiredCollectionError.TOO_SMALL</errorString>
                <reason>TOO_SMALL</reason>
            </errors>
        </ApiExceptionFault>
    </detail>
</soap:Fault>


*** CASE 4 ***
In request: Not setting requestPlatformTargeting at all
In response: NotNullError error
<soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>[NotNullError.NULL @ [0].targeting.requestPlatformTargeting]</faultstring>
    <detail>
        <ApiExceptionFault xmlns="https://www.google.com/apis/ads/publisher/v202205">
            <message>[NotNullError.NULL @ [0].targeting.requestPlatformTargeting]</message>
            <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="NotNullError">
                <fieldPath>[0].targeting.requestPlatformTargeting</ fieldPath>
                <fieldPathElements>
                    <index>0</index>
                </fieldPathElements>
                <fieldPathElements>
                    <field>targeting</field>
                </fieldPathElements>
                <fieldPathElements>
                    <field>requestPlatformTargeting</field>
                </fieldPathElements>
                <trigger/>
                <errorString>NotNullError.NULL</errorString>
                <reason>NULL</reason>
            </errors>
        </ApiExceptionFault>
    </detail>
</soap:Fault>

Ad Manager API Forum Advisor

unread,
Jun 17, 2022, 1:37:24 PM6/17/22
to google-doubleclick...@googlegroups.com

Hi Gonzalo,

Thank you for reaching out to the Ad Manager API support team, this is Madhushree.

I have checked the description and the cases you have provided,  I would recommend you to include the Environment type in your API request for proposal lineitems when you are using requestPlatformTargeting to target platform. The environment that the proposal lineitem is targeting. The default value is EnvironmentType.BROWSER.

  • Case 1 : If you intend to target VIDEO_PLAYER platform, then the Environment type has to be set to EnvironmentType.VIDEO_PLAYER and then the proposal lineitem can only target ad units that have sizes whose AdUnitSize.environmentType is also EnvironmentType.VIDEO_PLAYER.
  • Case 2 : I would recommend you  to target only one platform at a time either BROWSER or VIDEO_PLAYER, I see the request for two platforms and possible reason for TOO LARGE error which means collection size is too large.
  • Case 3 : In this particular case, I can see an empty array, whereas it is mandatory to select/target at least one of the available platforms, so why you might got this TOO SMALL error.
  • Case 4 : For this case NotNullError.NULL error, possible reason for this error is there's no target selected, caused by supplying a null value for an attribute that cannot be null.

Kindly refer to this documentation for rules that apply for RequestPlatformTargeting for further clarifications. Let us know if you have any further queries or concerns.

Regards,

Google Logo
Madhushree
Ad Manager API Team
 


ref:_00D1U1174p._5004Q2bxRQ8:ref
Reply all
Reply to author
Forward
0 new messages