การดําเนินการบริการ AddAssetGroups - การจัดการแคมเปญ
เพิ่มอาร์เรย์ของกลุ่มสินทรัพย์ให้กับแคมเปญที่ระบุ
ร้องขอองค์ประกอบ
วัตถุ AddAssetGroupsRequest จะกําหนดองค์ประกอบ เนื้อความ และ ส่วนหัว ของคําขอการดําเนินการบริการ องค์ประกอบต้องอยู่ในลําดับเดียวกับที่แสดงใน Request SOAP
หมายเหตุ
เว้นแต่ระบุไว้เป็นอย่างอื่นด้านล่าง จําเป็นต้องระบุองค์ประกอบคําขอทั้งหมด
ร้องขอองค์ประกอบเนื้อความ
องค์ ประกอบ | คำอธิบาย | ชนิดข้อมูล |
---|---|---|
AssetGroups | อาร์เรย์ของกลุ่มสินทรัพย์ที่จะเพิ่มลงในการส่งเสริมการขายที่ระบุ สามารถระบุกลุ่มสินทรัพย์ได้สูงสุด 100 กลุ่มในการเรียกใช้ครั้งเดียว | อาร์เรย์ AssetGroup |
รหัสการส่งเสริมการขาย | ID ของแคมเปญ Performace Max | ยาว |
องค์ประกอบส่วนหัวของคําขอ
องค์ ประกอบ | คำอธิบาย | ชนิดข้อมูล |
---|---|---|
AuthenticationToken | โทเค็นการเข้าถึง OAuth ที่แสดงข้อมูลประจําตัวของผู้ใช้ที่มีสิทธิ์เข้าถึงบัญชี Microsoft Advertising สําหรับข้อมูลเพิ่มเติม ดูการรับรองความถูกต้องด้วย OAuth |
สาย อักขระ |
CustomerAccountId | ตัวระบุบัญชีโฆษณาที่เป็นเจ้าของหรือเชื่อมโยงกับเอนทิตีในคําขอ องค์ประกอบส่วนหัวนี้ต้องมีค่าเดียวกันกับองค์ประกอบเนื้อความ AccountId เมื่อต้องการทั้งสองอย่าง องค์ประกอบนี้จําเป็นสําหรับการดําเนินการบริการส่วนใหญ่ และเป็นแนวทางปฏิบัติที่ดีที่สุดที่คุณควรตั้งค่าไว้เสมอ สําหรับข้อมูลเพิ่มเติม ดูรับบัญชีและรหัสลูกค้าของคุณ |
สาย อักขระ |
CustomerId | ตัวระบุบัญชีผู้จัดการ (ลูกค้า) ที่ผู้ใช้กําลังเข้าถึงหรือดําเนินการ ผู้ใช้สามารถเข้าถึงบัญชีผู้จัดการได้หลายบัญชี องค์ประกอบนี้จําเป็นสําหรับการดําเนินการบริการส่วนใหญ่ และเป็นแนวทางปฏิบัติที่ดีที่สุดที่คุณควรตั้งค่าไว้เสมอ สําหรับข้อมูลเพิ่มเติม ดูรับบัญชีและรหัสลูกค้าของคุณ |
สาย อักขระ |
DeveloperToken | โทเค็นนักพัฒนาที่ใช้เพื่อเข้าถึง Bing Ads API สําหรับข้อมูลเพิ่มเติม ดูรับโทเค็นนักพัฒนา |
สาย อักขระ |
รหัส ผ่าน | องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ | สาย อักขระ |
ชื่อ | องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ | สาย อักขระ |
องค์ประกอบการตอบสนอง
วัตถุ AddAssetGroupsResponse จะกําหนดองค์ประกอบ เนื้อความ และ ส่วนหัว ของการตอบสนองการดําเนินการบริการ องค์ประกอบจะถูกส่งกลับตามลําดับเดียวกับที่แสดงใน Response SOAP
องค์ประกอบเนื้อความการตอบสนอง
องค์ ประกอบ | คำอธิบาย | ชนิดข้อมูล |
---|---|---|
AssetGroupIds | อาร์เรย์ของรหัสกลุ่มสินทรัพย์ที่จะอัพเดตสําหรับการส่งเสริมการขายที่ระบุ สามารถระบุกลุ่มสินทรัพย์ได้สูงสุด 100 กลุ่มในการเรียกใช้ครั้งเดียว | อาร์เรย์ยาว |
ตัวแก้ไขบางส่วน | อาร์เรย์ของออบเจ็กต์ BatchError ที่มีรายละเอียดสําหรับรายการคําขอใดๆ ที่ไม่ประสบความสําเร็จ | อาร์เรย์ BatchError |
องค์ประกอบส่วนหัวการตอบสนอง
องค์ ประกอบ | คำอธิบาย | ชนิดข้อมูล |
---|---|---|
TrackingId | ตัวระบุของรายการบันทึกที่ประกอบด้วยรายละเอียดของการเรียกใช้ API | สาย อักขระ |
ร้องขอ SOAP
เทมเพลตนี้ถูกสร้างขึ้นโดยเครื่องมือเพื่อแสดง ลําดับ ขององค์ประกอบ เนื้อความ และ ส่วนหัว สําหรับคําขอ SOAP สําหรับชนิดที่สนับสนุนที่คุณสามารถใช้กับการดําเนินการบริการนี้ โปรดดูการอ้างอิง องค์ประกอบเนื้อความคําขอ ด้านบน
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<Action mustUnderstand="1">AddAssetGroups</Action>
<AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
<CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
<CustomerId i:nil="false">ValueHere</CustomerId>
<DeveloperToken i:nil="false">ValueHere</DeveloperToken>
</s:Header>
<s:Body>
<AddAssetGroupsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<AssetGroups i:nil="false">
<AssetGroup>
<AssetGroupSearchThemes i:nil="false">
<AssetGroupSearchTheme>
<Id i:nil="false">ValueHere</Id>
<SearchTheme i:nil="false">ValueHere</SearchTheme>
</AssetGroupSearchTheme>
</AssetGroupSearchThemes>
<BusinessName i:nil="false">ValueHere</BusinessName>
<CallToAction i:nil="false">ValueHere</CallToAction>
<Descriptions i:nil="false">
<AssetLink>
<Asset i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<Id i:nil="false">ValueHere</Id>
<Name i:nil="false">ValueHere</Name>
<Type i:nil="false">ValueHere</Type>
<!--This field is applicable if the derived type attribute is set to TextAsset-->
<Text i:nil="false">ValueHere</Text>
<!--These fields are applicable if the derived type attribute is set to ImageAsset-->
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
<!--These fields are applicable if the derived type attribute is set to VideoAsset-->
<SubType i:nil="false">ValueHere</SubType>
<ThumbnailImage i:nil="false">
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
</ThumbnailImage>
</Asset>
<AssetPerformanceLabel i:nil="false">ValueHere</AssetPerformanceLabel>
<EditorialStatus i:nil="false">ValueHere</EditorialStatus>
<PinnedField i:nil="false">ValueHere</PinnedField>
</AssetLink>
</Descriptions>
<EditorialStatus i:nil="false">ValueHere</EditorialStatus>
<EndDate i:nil="false">
<Day>ValueHere</Day>
<Month>ValueHere</Month>
<Year>ValueHere</Year>
</EndDate>
<FinalMobileUrls i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:string>ValueHere</a1:string>
</FinalMobileUrls>
<FinalUrls i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:string>ValueHere</a1:string>
</FinalUrls>
<ForwardCompatibilityMap xmlns:e30="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
<e30:KeyValuePairOfstringstring>
<e30:key i:nil="false">ValueHere</e30:key>
<e30:value i:nil="false">ValueHere</e30:value>
</e30:KeyValuePairOfstringstring>
</ForwardCompatibilityMap>
<Headlines i:nil="false">
<AssetLink>
<Asset i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<Id i:nil="false">ValueHere</Id>
<Name i:nil="false">ValueHere</Name>
<Type i:nil="false">ValueHere</Type>
<!--This field is applicable if the derived type attribute is set to TextAsset-->
<Text i:nil="false">ValueHere</Text>
<!--These fields are applicable if the derived type attribute is set to ImageAsset-->
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
<!--These fields are applicable if the derived type attribute is set to VideoAsset-->
<SubType i:nil="false">ValueHere</SubType>
<ThumbnailImage i:nil="false">
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
</ThumbnailImage>
</Asset>
<AssetPerformanceLabel i:nil="false">ValueHere</AssetPerformanceLabel>
<EditorialStatus i:nil="false">ValueHere</EditorialStatus>
<PinnedField i:nil="false">ValueHere</PinnedField>
</AssetLink>
</Headlines>
<Id i:nil="false">ValueHere</Id>
<Images i:nil="false">
<AssetLink>
<Asset i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<Id i:nil="false">ValueHere</Id>
<Name i:nil="false">ValueHere</Name>
<Type i:nil="false">ValueHere</Type>
<!--This field is applicable if the derived type attribute is set to TextAsset-->
<Text i:nil="false">ValueHere</Text>
<!--These fields are applicable if the derived type attribute is set to ImageAsset-->
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
<!--These fields are applicable if the derived type attribute is set to VideoAsset-->
<SubType i:nil="false">ValueHere</SubType>
<ThumbnailImage i:nil="false">
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
</ThumbnailImage>
</Asset>
<AssetPerformanceLabel i:nil="false">ValueHere</AssetPerformanceLabel>
<EditorialStatus i:nil="false">ValueHere</EditorialStatus>
<PinnedField i:nil="false">ValueHere</PinnedField>
</AssetLink>
</Images>
<LongHeadlines i:nil="false">
<AssetLink>
<Asset i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<Id i:nil="false">ValueHere</Id>
<Name i:nil="false">ValueHere</Name>
<Type i:nil="false">ValueHere</Type>
<!--This field is applicable if the derived type attribute is set to TextAsset-->
<Text i:nil="false">ValueHere</Text>
<!--These fields are applicable if the derived type attribute is set to ImageAsset-->
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
<!--These fields are applicable if the derived type attribute is set to VideoAsset-->
<SubType i:nil="false">ValueHere</SubType>
<ThumbnailImage i:nil="false">
<CropHeight i:nil="false">ValueHere</CropHeight>
<CropWidth i:nil="false">ValueHere</CropWidth>
<CropX i:nil="false">ValueHere</CropX>
<CropY i:nil="false">ValueHere</CropY>
<SubType i:nil="false">ValueHere</SubType>
<TargetHeight i:nil="false">ValueHere</TargetHeight>
<TargetWidth i:nil="false">ValueHere</TargetWidth>
</ThumbnailImage>
</Asset>
<AssetPerformanceLabel i:nil="false">ValueHere</AssetPerformanceLabel>
<EditorialStatus i:nil="false">ValueHere</EditorialStatus>
<PinnedField i:nil="false">ValueHere</PinnedField>
</AssetLink>
</LongHeadlines>
<Name i:nil="false">ValueHere</Name>
<Path1 i:nil="false">ValueHere</Path1>
<Path2 i:nil="false">ValueHere</Path2>
<StartDate i:nil="false">
<Day>ValueHere</Day>
<Month>ValueHere</Month>
<Year>ValueHere</Year>
</StartDate>
<Status i:nil="false">ValueHere</Status>
</AssetGroup>
</AssetGroups>
<CampaignId>ValueHere</CampaignId>
</AddAssetGroupsRequest>
</s:Body>
</s:Envelope>
Response SOAP
เทมเพลตนี้ถูกสร้างขึ้นโดยเครื่องมือเพื่อแสดงลําดับขององค์ประกอบ เนื้อ ความและ ส่วนหัว สําหรับการตอบสนอง SOAP
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
</s:Header>
<s:Body>
<AddAssetGroupsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<AssetGroupIds d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<a1:long>ValueHere</a1:long>
</AssetGroupIds>
<PartialErrors d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<BatchError d4p1:type="-- derived type specified here with the appropriate prefix --">
<Code>ValueHere</Code>
<Details d4p1:nil="false">ValueHere</Details>
<ErrorCode d4p1:nil="false">ValueHere</ErrorCode>
<FieldPath d4p1:nil="false">ValueHere</FieldPath>
<ForwardCompatibilityMap xmlns:e31="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
<e31:KeyValuePairOfstringstring>
<e31:key d4p1:nil="false">ValueHere</e31:key>
<e31:value d4p1:nil="false">ValueHere</e31:value>
</e31:KeyValuePairOfstringstring>
</ForwardCompatibilityMap>
<Index>ValueHere</Index>
<Message d4p1:nil="false">ValueHere</Message>
<Type d4p1:nil="false">ValueHere</Type>
<!--These fields are applicable if the derived type attribute is set to EditorialError-->
<Appealable d4p1:nil="false">ValueHere</Appealable>
<DisapprovedText d4p1:nil="false">ValueHere</DisapprovedText>
<Location d4p1:nil="false">ValueHere</Location>
<PublisherCountry d4p1:nil="false">ValueHere</PublisherCountry>
<ReasonCode>ValueHere</ReasonCode>
</BatchError>
</PartialErrors>
</AddAssetGroupsResponse>
</s:Body>
</s:Envelope>
ไวยากรณ์โค้ด
ไวยากรณ์ตัวอย่างสามารถใช้กับ Bing Ads SDKs ได้ ดู ตัวอย่างโค้ด API ของโฆษณา Bing สําหรับตัวอย่างเพิ่มเติม
public async Task<AddAssetGroupsResponse> AddAssetGroupsAsync(
IList<AssetGroup> assetGroups,
long campaignId)
{
var request = new AddAssetGroupsRequest
{
AssetGroups = assetGroups,
CampaignId = campaignId
};
return (await CampaignManagementService.CallAsync((s, r) => s.AddAssetGroupsAsync(r), request));
}
static AddAssetGroupsResponse addAssetGroups(
ArrayOfAssetGroup assetGroups,
java.lang.Long campaignId) throws RemoteException, Exception
{
AddAssetGroupsRequest request = new AddAssetGroupsRequest();
request.setAssetGroups(assetGroups);
request.setCampaignId(campaignId);
return CampaignManagementService.getService().addAssetGroups(request);
}
static function AddAssetGroups(
$assetGroups,
$campaignId)
{
$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];
$request = new AddAssetGroupsRequest();
$request->AssetGroups = $assetGroups;
$request->CampaignId = $campaignId;
return $GLOBALS['CampaignManagementProxy']->GetService()->AddAssetGroups($request);
}
response=campaignmanagement_service.AddAssetGroups(
AssetGroups=AssetGroups,
CampaignId=CampaignId)
ข้อกําหนด
บริการ: การส่งเสริมการขายการจัดการบริการ.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13