SearchInsertionOrders Service Operation - Customer Billing

Searches for insertion orders that match a specified criteria.

Request Elements

The SearchInsertionOrdersRequest 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
Ordering Determines the order of results by the specified property of an account.

You should only specify one OrderBy element in the array. Additional elements are not supported and will be ignored by the service.

For this service operation, the following values are supported in the Field element of a OrderBy object.

Id - The order is determined by the Id element of the returned InsertionOrder.

Name - The order is determined by the Name element of the returned InsertionOrder.
OrderBy array
PageInfo Determines the index and size of results per page. Paging
Predicates Determines the request conditions. This operation's response will include accounts that match all of the specified predicates.

You may specify up to 6 predicates, and one of the predicate fields must be AccountId. You may use the StartDate and EndDate predicate fields twice each to specify start and end date ranges, and otherwise may only use each predicate field once.

For a list of supported Field and Operator elements of a Predicate object for this service operation, see Predicate Remarks.
Predicate array
ReturnAdditionalFields The list of additional properties that you want included within each returned insertion order. The additional field values enable you to get the latest features using the current version of Customer Billing API. Note: Corresponding elements will be included by default in a future update.

This request element is optional.
InsertionOrderAdditionalField

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 SearchInsertionOrdersResponse 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
InsertionOrders A list of insertion orders that meet the specified criteria. InsertionOrder array

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">SearchInsertionOrders</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <SearchInsertionOrdersRequest xmlns="https://bingads.microsoft.com/Billing/v13">
      <Predicates xmlns:e14="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e14:Predicate>
          <e14:Field i:nil="false">ValueHere</e14:Field>
          <e14:Operator>ValueHere</e14:Operator>
          <e14:Value i:nil="false">ValueHere</e14:Value>
        </e14:Predicate>
      </Predicates>
      <Ordering xmlns:e15="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e15:OrderBy>
          <e15:Field>ValueHere</e15:Field>
          <e15:Order>ValueHere</e15:Order>
        </e15:OrderBy>
      </Ordering>
      <PageInfo xmlns:e16="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e16:Index>ValueHere</e16:Index>
        <e16:Size>ValueHere</e16:Size>
      </PageInfo>
      <ReturnAdditionalFields i:nil="false">ValueHere</ReturnAdditionalFields>
    </SearchInsertionOrdersRequest>
  </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>
    <SearchInsertionOrdersResponse xmlns="https://bingads.microsoft.com/Billing/v13">
      <InsertionOrders xmlns:e17="https://bingads.microsoft.com/Customer/v13/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e17:InsertionOrder>
          <e17:AccountId>ValueHere</e17:AccountId>
          <e17:BookingCountryCode d4p1:nil="false">ValueHere</e17:BookingCountryCode>
          <e17:Comment d4p1:nil="false">ValueHere</e17:Comment>
          <e17:EndDate d4p1:nil="false">ValueHere</e17:EndDate>
          <e17:Id d4p1:nil="false">ValueHere</e17:Id>
          <e17:LastModifiedByUserId d4p1:nil="false">ValueHere</e17:LastModifiedByUserId>
          <e17:LastModifiedTime d4p1:nil="false">ValueHere</e17:LastModifiedTime>
          <e17:NotificationThreshold d4p1:nil="false">ValueHere</e17:NotificationThreshold>
          <e17:ReferenceId d4p1:nil="false">ValueHere</e17:ReferenceId>
          <e17:SpendCapAmount d4p1:nil="false">ValueHere</e17:SpendCapAmount>
          <e17:StartDate d4p1:nil="false">ValueHere</e17:StartDate>
          <e17:Name d4p1:nil="false">ValueHere</e17:Name>
          <e17:Status d4p1:nil="false">ValueHere</e17:Status>
          <e17:PurchaseOrder d4p1:nil="false">ValueHere</e17:PurchaseOrder>
          <e17:PendingChanges d4p1:nil="false">
            <e17:Comment d4p1:nil="false">ValueHere</e17:Comment>
            <e17:EndDate d4p1:nil="false">ValueHere</e17:EndDate>
            <e17:RequestedByUserId d4p1:nil="false">ValueHere</e17:RequestedByUserId>
            <e17:ModifiedDateTime d4p1:nil="false">ValueHere</e17:ModifiedDateTime>
            <e17:NotificationThreshold d4p1:nil="false">ValueHere</e17:NotificationThreshold>
            <e17:ReferenceId d4p1:nil="false">ValueHere</e17:ReferenceId>
            <e17:SpendCapAmount d4p1:nil="false">ValueHere</e17:SpendCapAmount>
            <e17:StartDate d4p1:nil="false">ValueHere</e17:StartDate>
            <e17:Name d4p1:nil="false">ValueHere</e17:Name>
            <e17:PurchaseOrder d4p1:nil="false">ValueHere</e17:PurchaseOrder>
            <e17:ChangeStatus d4p1:nil="false">ValueHere</e17:ChangeStatus>
          </e17:PendingChanges>
          <e17:AccountNumber d4p1:nil="false">ValueHere</e17:AccountNumber>
          <e17:BudgetRemaining d4p1:nil="false">ValueHere</e17:BudgetRemaining>
          <e17:BudgetSpent d4p1:nil="false">ValueHere</e17:BudgetSpent>
          <e17:BudgetRemainingPercent d4p1:nil="false">ValueHere</e17:BudgetRemainingPercent>
          <e17:BudgetSpentPercent d4p1:nil="false">ValueHere</e17:BudgetSpentPercent>
          <e17:SeriesName d4p1:nil="false">ValueHere</e17:SeriesName>
          <e17:IsInSeries d4p1:nil="false">ValueHere</e17:IsInSeries>
          <e17:SeriesFrequencyType d4p1:nil="false">ValueHere</e17:SeriesFrequencyType>
          <e17:IsUnlimited d4p1:nil="false">ValueHere</e17:IsUnlimited>
          <e17:IsEndless d4p1:nil="false">ValueHere</e17:IsEndless>
        </e17:InsertionOrder>
      </InsertionOrders>
    </SearchInsertionOrdersResponse>
  </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<SearchInsertionOrdersResponse> SearchInsertionOrdersAsync(
	IList<Predicate> predicates,
	IList<OrderBy> ordering,
	Paging pageInfo,
	InsertionOrderAdditionalField? returnAdditionalFields)
{
	var request = new SearchInsertionOrdersRequest
	{
		Predicates = predicates,
		Ordering = ordering,
		PageInfo = pageInfo,
		ReturnAdditionalFields = returnAdditionalFields
	};

	return (await CustomerBillingService.CallAsync((s, r) => s.SearchInsertionOrdersAsync(r), request));
}
static SearchInsertionOrdersResponse searchInsertionOrders(
	ArrayOfPredicate predicates,
	ArrayOfOrderBy ordering,
	Paging pageInfo,
	ArrayList<InsertionOrderAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
	SearchInsertionOrdersRequest request = new SearchInsertionOrdersRequest();

	request.setPredicates(predicates);
	request.setOrdering(ordering);
	request.setPageInfo(pageInfo);
	request.setReturnAdditionalFields(returnAdditionalFields);

	return CustomerBillingService.getService().searchInsertionOrders(request);
}
static function SearchInsertionOrders(
	$predicates,
	$ordering,
	$pageInfo,
	$returnAdditionalFields)
{

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

	$request = new SearchInsertionOrdersRequest();

	$request->Predicates = $predicates;
	$request->Ordering = $ordering;
	$request->PageInfo = $pageInfo;
	$request->ReturnAdditionalFields = $returnAdditionalFields;

	return $GLOBALS['CustomerBillingProxy']->GetService()->SearchInsertionOrders($request);
}
response=customerbilling_service.SearchInsertionOrders(
	Predicates=Predicates,
	Ordering=Ordering,
	PageInfo=PageInfo,
	ReturnAdditionalFields=ReturnAdditionalFields)

Requirements

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