AddGoalsRequest Message
Defines the request message that the client passes to the AddGoals operation.
<wsdl:message name="AddGoalsRequest"> <wsdl:part name="parameters" element="tns:AddGoalsRequest" /> </wsdl:message>
Body Elements
Element | Description | Data Type |
|---|---|---|
AccountId | The identifier of the account to which you want to add the analytics goals. | long |
Goals | The goals to add to the account. You can add a maximum of six unique goals to an account. |
Header Elements
For information about the values you set the DeveloperToken, Password, and UserName elements to, see Getting Started With the Bing Ads API.
Element | Description | Data Type |
|---|---|---|
ApplicationToken | The application-access token. This header element is not used and should be null. | string |
AuthenticationToken | The authentication token. This header element is not used and should be null. | string |
CustomerAccountId | The identifier of the account that owns the entities in the request. | string |
CustomerId | The identifier of the customer that owns the account. | string |
DeveloperToken | The caller's developer-access token. | string |
Password | The user's sign-in password. | string |
UserName | The user's sign-in user name. You cannot set this element to a Microsoft account (formerly known as Windows Live ID). | string |
If your request contains multiple goals and one of the goals fails, none of the goals are added.
SOAP
The following example shows the complete SOAP envelope for an AddGoalsRequest request.
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header xmlns="https://adcenter.microsoft.com/v8"> <Action mustUnderstand="1">AddGoals</Action> <ApplicationToken i:nil="false"></ApplicationToken> <AuthenticationToken i:nil="false"></AuthenticationToken> <CustomerAccountId i:nil="false"></CustomerAccountId> <CustomerId i:nil="false"></CustomerId> <DeveloperToken i:nil="false"></DeveloperToken> <Password i:nil="false"></Password> <UserName i:nil="false"></UserName> </s:Header> <s:Body> <AddGoalsRequest xmlns="https://adcenter.microsoft.com/v8"> <AccountId></AccountId> <Goals xmlns:e1="http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts" i:nil="false"> <e1:Goal> <e1:CostModel i:nil="false"></e1:CostModel> <e1:DaysApplicableForConversion i:nil="false"></e1:DaysApplicableForConversion> <e1:Id i:nil="false"></e1:Id> <e1:Name i:nil="false"></e1:Name> <e1:RevenueModel i:nil="false"> <e1:ConstantRevenueValue i:nil="false"></e1:ConstantRevenueValue> <e1:Type i:nil="false"></e1:Type> </e1:RevenueModel> <e1:Steps i:nil="false"> <e1:Step> <e1:Id i:nil="false"></e1:Id> <e1:Name i:nil="false"></e1:Name> <e1:PositionNumber i:nil="false"></e1:PositionNumber> <e1:Script i:nil="false"></e1:Script> <e1:Type i:nil="false"></e1:Type> </e1:Step> </e1:Steps> <e1:YEventId i:nil="false"></e1:YEventId> </e1:Goal> </Goals> </AddGoalsRequest> </s:Body> </s:Envelope>