AddInsertionOrder Service Operation - Customer Billing

Adds an insertion order to the specified account.

Request Elements

The AddInsertionOrderRequest object defines the body and header elements of the service operation request. The elements must be in the same order as shown in the Request SOAP.

Note

Unless otherwise noted below, all request elements are required.

Request Body Elements

Element Description Data Type
InsertionOrder An insertion order to add to the account. InsertionOrder

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts.

For more information see Authentication with OAuth.
string
DeveloperToken The developer token used to access the Bing Ads API.

For more information see Get a Developer Token.
string
Password This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string
UserName This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string

Response Elements

The AddInsertionOrderResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response SOAP.

Response Body Elements

Element Description Data Type
CreateTime Identifies the server time in UTC when the insertion order was added. dateTime
InsertionOrderId A long value that represents the identifier for the insertion order that was added. long

Response Header Elements

Element Description Data Type
TrackingId The identifier of the log entry that contains the details of the API call. string

Request SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP request. For supported types that you can use with this service operation, see the Request Body Elements reference above.

<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/Billing/v13">
    <Action mustUnderstand="1">AddInsertionOrder</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <AddInsertionOrderRequest xmlns="https://bingads.microsoft.com/Billing/v13">
      <InsertionOrder xmlns:e1="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e1:AccountId>ValueHere</e1:AccountId>
        <e1:BookingCountryCode i:nil="false">ValueHere</e1:BookingCountryCode>
        <e1:Comment i:nil="false">ValueHere</e1:Comment>
        <e1:EndDate i:nil="false">ValueHere</e1:EndDate>
        <e1:Id i:nil="false">ValueHere</e1:Id>
        <e1:LastModifiedByUserId i:nil="false">ValueHere</e1:LastModifiedByUserId>
        <e1:LastModifiedTime i:nil="false">ValueHere</e1:LastModifiedTime>
        <e1:NotificationThreshold i:nil="false">ValueHere</e1:NotificationThreshold>
        <e1:ReferenceId i:nil="false">ValueHere</e1:ReferenceId>
        <e1:SpendCapAmount i:nil="false">ValueHere</e1:SpendCapAmount>
        <e1:StartDate i:nil="false">ValueHere</e1:StartDate>
        <e1:Name i:nil="false">ValueHere</e1:Name>
        <e1:Status i:nil="false">ValueHere</e1:Status>
        <e1:PurchaseOrder i:nil="false">ValueHere</e1:PurchaseOrder>
        <e1:PendingChanges i:nil="false">
          <e1:Comment i:nil="false">ValueHere</e1:Comment>
          <e1:EndDate i:nil="false">ValueHere</e1:EndDate>
          <e1:RequestedByUserId i:nil="false">ValueHere</e1:RequestedByUserId>
          <e1:ModifiedDateTime i:nil="false">ValueHere</e1:ModifiedDateTime>
          <e1:NotificationThreshold i:nil="false">ValueHere</e1:NotificationThreshold>
          <e1:ReferenceId i:nil="false">ValueHere</e1:ReferenceId>
          <e1:SpendCapAmount i:nil="false">ValueHere</e1:SpendCapAmount>
          <e1:StartDate i:nil="false">ValueHere</e1:StartDate>
          <e1:Name i:nil="false">ValueHere</e1:Name>
          <e1:PurchaseOrder i:nil="false">ValueHere</e1:PurchaseOrder>
          <e1:ChangeStatus i:nil="false">ValueHere</e1:ChangeStatus>
        </e1:PendingChanges>
        <e1:AccountNumber i:nil="false">ValueHere</e1:AccountNumber>
        <e1:BudgetRemaining i:nil="false">ValueHere</e1:BudgetRemaining>
        <e1:BudgetSpent i:nil="false">ValueHere</e1:BudgetSpent>
        <e1:BudgetRemainingPercent i:nil="false">ValueHere</e1:BudgetRemainingPercent>
        <e1:BudgetSpentPercent i:nil="false">ValueHere</e1:BudgetSpentPercent>
        <e1:SeriesName i:nil="false">ValueHere</e1:SeriesName>
        <e1:IsInSeries i:nil="false">ValueHere</e1:IsInSeries>
        <e1:SeriesFrequencyType i:nil="false">ValueHere</e1:SeriesFrequencyType>
        <e1:IsUnlimited i:nil="false">ValueHere</e1:IsUnlimited>
        <e1:IsEndless i:nil="false">ValueHere</e1:IsEndless>
      </InsertionOrder>
    </AddInsertionOrderRequest>
  </s:Body>
</s:Envelope>

Response SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP response.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Billing/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <AddInsertionOrderResponse xmlns="https://bingads.microsoft.com/Billing/v13">
      <InsertionOrderId>ValueHere</InsertionOrderId>
      <CreateTime>ValueHere</CreateTime>
    </AddInsertionOrderResponse>
  </s:Body>
</s:Envelope>

Code Syntax

The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.

public async Task<AddInsertionOrderResponse> AddInsertionOrderAsync(
	InsertionOrder insertionOrder)
{
	var request = new AddInsertionOrderRequest
	{
		InsertionOrder = insertionOrder
	};

	return (await CustomerBillingService.CallAsync((s, r) => s.AddInsertionOrderAsync(r), request));
}
static AddInsertionOrderResponse addInsertionOrder(
	InsertionOrder insertionOrder) throws RemoteException, Exception
{
	AddInsertionOrderRequest request = new AddInsertionOrderRequest();

	request.setInsertionOrder(insertionOrder);

	return CustomerBillingService.getService().addInsertionOrder(request);
}
static function AddInsertionOrder(
	$insertionOrder)
{

	$GLOBALS['Proxy'] = $GLOBALS['CustomerBillingProxy'];

	$request = new AddInsertionOrderRequest();

	$request->InsertionOrder = $insertionOrder;

	return $GLOBALS['CustomerBillingProxy']->GetService()->AddInsertionOrder($request);
}
response=customerbilling_service.AddInsertionOrder(
	InsertionOrder=InsertionOrder)

Requirements

Service: CustomerBillingService.svc v13
Namespace: https://bingads.microsoft.com/Billing/v13