10. Dezember 2020

· Whitepaper

DeleteSection

Inhaltsverzeichnis

xx Kapitel

Löschen eines Abschnittes

RequestParameter: DeleteSectionRequest
ResponseParameter: DeleteSectionResponse

Mit Hilfe dieser Methode können Sie einen bestehenden Abschnitt einer Kampagne löschen.

Das Request-Objekt besitzt folgende Felder zur Steuerung der Abfrage:

Campaign Die Kampagne, welche den zu löschenden Abschnitt enthält
Section Der zu löschende Abschnitt

Das Response-Objekt enthält keine Information.

DeleteSection

Beispiel Request „Abschnitt löschen“

C#

//Create an instance of the service agent 
ServiceAgent agent = new ServiceAgent(); 

//get the campaigns in work 
CampaignsRequest campaignRequest = new CampaignsRequest(); 
campaignRequest.SecurityContext = GetSecurityContext(); 
campaignRequest.Language = "DE"; 
campaignRequest.Type = CampaignType.InWork; 
campaignRequest.ResponseDetail = 
    CampaignResponseDetailInfo.BasicInformation | 
    CampaignResponseDetailInfo.Sections; 
CampaignsResponse campaignResponse =  
    agent.GetCampaigns(campaignRequest); 

//select central section for update 
Section sectionToDelete = campaignResponse.Campaigns[0].Sections[0]; 
 
//create request 
DeleteSectionRequest deleteRequest =  
    new DeleteSectionRequest(); 
deleteRequest.SecurityContext = GetSecurityContext(); 
deleteRequest.Section = sectionToDelete;

//Delete the section
DeleteSectionResponse deleteResponse =  
    agent.DeleteSection(deleteRequest);

Need Support?

Can't find the answer you're looking for?
Contact Support