无法创建Radius CampaignCriterion - 使用PHP无法使用广告系列标准类型 [英] Cannot create Radius CampaignCriterion - campaign criterion type is not valid using PHP

查看:35
本文介绍了无法创建Radius CampaignCriterion - 使用PHP无法使用广告系列标准类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在PHP中使用V11 API版本来创建Radius广告系列标准,但是我收到广告系列标准类型无效的错误。

I'm attempting to use the V11 API version in PHP to create a Radius Campaign Criterion, but I'm getting an error that the campaign criterion type is not valid.

以下是SOAP请求的正文:

Here is the body of the SOAP request:

 < SOAP-ENV:正文>

  &NBSP; &NBSP; &NBSP; < ns1:AddCampaignCriterionsRequest>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:CampaignCriterions>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:CampaignCriterion xsi:type =" ns1:BiddableCampaignCriterion">

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:CampaignId>< REMOVED>< / ns1:CampaignId>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:Criterion xsi:type =" ns1:RadiusCriterion">

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:输入xsi:nil =" true" />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:LatitudeDegrees> 33.7944< / ns1:LatitudeDegrees>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:LongitudeDegrees> -87.2443< / ns1:LongitudeDegrees>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:名称xsi:nil =" true" />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:Radius> 45< / ns1:Radius>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:RadiusUnit> Miles< / ns1:RadiusUnit>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < / ns1:标准>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:ForwardCompatibilityMap xsi:nil =" true" />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:Id xsi:nil =" true" />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:状态xsi:nil =" true" />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:输入xsi:nil =" true" />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:CriterionBid xsi:nil =" true" />< / ns1:CampaignCriterion>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < / ns1:CampaignCriterions>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ns1:CriterionType> Radius< / ns1:CriterionType>

  &NBSP; &NBSP; &NBSP; < / ns1:AddCampaignCriterionsRequest>

  &NBSP; < / SOAP-ENV:正文>

 <SOAP-ENV:Body>
        <ns1:AddCampaignCriterionsRequest>
            <ns1:CampaignCriterions>
                <ns1:CampaignCriterion xsi:type="ns1:BiddableCampaignCriterion">
                    <ns1:CampaignId><REMOVED></ns1:CampaignId>
                    <ns1:Criterion xsi:type="ns1:RadiusCriterion">
                        <ns1:Type xsi:nil="true" />
                        <ns1:LatitudeDegrees>33.7944</ns1:LatitudeDegrees>
                        <ns1:LongitudeDegrees>-87.2443</ns1:LongitudeDegrees>
                        <ns1:Name xsi:nil="true" />
                        <ns1:Radius>45</ns1:Radius>
                        <ns1:RadiusUnit>Miles</ns1:RadiusUnit>
                    </ns1:Criterion>
                    <ns1:ForwardCompatibilityMap xsi:nil="true" />
                    <ns1:Id xsi:nil="true" />
                    <ns1:Status xsi:nil="true" />
                    <ns1:Type xsi:nil="true" />
                    <ns1:CriterionBid xsi:nil="true" /></ns1:CampaignCriterion>
            </ns1:CampaignCriterions>
            <ns1:CriterionType>Radius</ns1:CriterionType>
        </ns1:AddCampaignCriterionsRequest>
    </SOAP-ENV:Body>

回应:

< s:正文>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < s:故障>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < faultcode> s:服务器< / faultcode>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < faultstring xml:lang =" en-US">无效的客户数据。有关详细信息,请查看SOAP故障详细信息< / faultstring>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < detail>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ApiFaultDetail xmlns =" https://guideads.microsoft.com/CampaignManagement/v11" xmlns:i =" http://www.w3.org/2001/XMLSchema-instance">

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < TrackingId xmlns =" https://adapi.microsoft.com"> 6e2a42f8-0e4c-4d77-8414-22cf2d68cc60< / TrackingId>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < BatchErrors />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < OperationErrors>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < OperationError>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; <代码> 4503< /代码>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < Details i:nil =" true" />

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < ErrorCode> CampaignCriterionTypeInvalid< / ErrorCode>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; <消息>广告系列标准的类型无效。< /消息>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < / OperationError>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < / OperationErrors>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < / ApiFaultDetail>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < / detail>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < / s:错误>

  &NBSP; &NBSP; &NBSP; < / s:Body>

<s:Body>
            <s:Fault>
                <faultcode>s:Server</faultcode>
                <faultstring xml:lang="en-US">Invalid client data. Check the SOAP fault details for more information</faultstring>
                <detail>
                    <ApiFaultDetail xmlns="https://bingads.microsoft.com/CampaignManagement/v11" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                        <TrackingId xmlns="https://adapi.microsoft.com">6e2a42f8-0e4c-4d77-8414-22cf2d68cc60</TrackingId>
                        <BatchErrors/>
                        <OperationErrors>
                            <OperationError>
                                <Code>4503</Code>
                                <Details i:nil="true" />
                                <ErrorCode>CampaignCriterionTypeInvalid</ErrorCode>
                                <Message>The campaign criterion's type is not valid.</Message>
                            </OperationError>
                        </OperationErrors>
                    </ApiFaultDetail>
                </detail>
            </s:Fault>
        </s:Body>

我正在尝试转向V11 API版本,但我们需要半径定位。  我发现使用CampaignCriterion的唯一示例是ShoppingCampaigns.php,但这是使用V11中已存在的产品范围标准。  它没有设置
除了AddCampaignCriterionsRequest的CriterionType以外的任何Type属性。

I'm trying to move to the V11 API version, but we require radius targeting.  The only example I found using CampaignCriterion was for the ShoppingCampaigns.php, but that's using product scope criteria which already exists in V11.  It doesn't set any Type attributes other than the CriterionType of the AddCampaignCriterionsRequest.

V11 API中是否提供此功能?

Is this functionality available yet in the V11 API?

推荐答案

目标标准是一个特例。来自"CriterionType"的
AddCampaignCriterions
文档:

要添加,删除或更新目标标准,即年龄,日期和时间,设备,性别,位置,位置意图和半径标准,
您必须指定 
目标   value。
通过 
GetCampaignCriterionsByIds  你
必须要求特定类型,即 
年龄 < span style ="color:#2a2a2a; font-family:'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif; font-size:13px">,  DayTime ,  设备 ,  性别 ,  位置 ,  LocationIntent
和 
Radius

To add, delete, or update target criterions i.e., age, day and time, device, gender, location, location intent, and radius criterions, you must specify the Targets value. To retrieve these target criterions via GetCampaignCriterionsByIds you must request the specific type i.e., AgeDayTimeDeviceGenderLocationLocationIntent, and Radius.

我希望这有帮助!


这篇关于无法创建Radius CampaignCriterion - 使用PHP无法使用广告系列标准类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆