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.

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 a Microsoft Account user who has permissions to Bing Ads accounts. string
DeveloperToken The developer token used to access the Bing Ads API. 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/v12">
    <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/v12">
      <InsertionOrder xmlns:e60="https://bingads.microsoft.com/Customer/v12/Entities" i:nil="false">
        <e60:AccountId>ValueHere</e60:AccountId>
        <e60:BalanceAmount i:nil="false">ValueHere</e60:BalanceAmount>
        <e60:BookingCountryCode i:nil="false">ValueHere</e60:BookingCountryCode>
        <e60:Comment i:nil="false">ValueHere</e60:Comment>
        <e60:EndDate i:nil="false">ValueHere</e60:EndDate>
        <e60:Id i:nil="false">ValueHere</e60:Id>
        <e60:LastModifiedByUserId i:nil="false">ValueHere</e60:LastModifiedByUserId>
        <e60:LastModifiedTime i:nil="false">ValueHere</e60:LastModifiedTime>
        <e60:NotificationThreshold i:nil="false">ValueHere</e60:NotificationThreshold>
        <e60:ReferenceId i:nil="false">ValueHere</e60:ReferenceId>
        <e60:SpendCapAmount i:nil="false">ValueHere</e60:SpendCapAmount>
        <e60:StartDate i:nil="false">ValueHere</e60:StartDate>
        <e60:Name i:nil="false">ValueHere</e60:Name>
        <e60:Status i:nil="false">ValueHere</e60:Status>
        <e60:PurchaseOrder i:nil="false">ValueHere</e60:PurchaseOrder>
        <e60:PendingChanges i:nil="false">
          <e60:Comment i:nil="false">ValueHere</e60:Comment>
          <e60:EndDate i:nil="false">ValueHere</e60:EndDate>
          <e60:RequestedByUserId i:nil="false">ValueHere</e60:RequestedByUserId>
          <e60:ModifiedDateTime i:nil="false">ValueHere</e60:ModifiedDateTime>
          <e60:NotificationThreshold i:nil="false">ValueHere</e60:NotificationThreshold>
          <e60:ReferenceId i:nil="false">ValueHere</e60:ReferenceId>
          <e60:SpendCapAmount i:nil="false">ValueHere</e60:SpendCapAmount>
          <e60:StartDate i:nil="false">ValueHere</e60:StartDate>
          <e60:Name i:nil="false">ValueHere</e60:Name>
          <e60:PurchaseOrder i:nil="false">ValueHere</e60:PurchaseOrder>
          <e60:ChangeStatus i:nil="false">ValueHere</e60:ChangeStatus>
        </e60:PendingChanges>
      </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/v12">
    <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/v12">
      <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 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 v12
Namespace: https://bingads.microsoft.com/Billing/v12