Muokkaa

Jaa


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:e27="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e27:Predicate>
          <e27:Field i:nil="false">ValueHere</e27:Field>
          <e27:Operator>ValueHere</e27:Operator>
          <e27:Value i:nil="false">ValueHere</e27:Value>
        </e27:Predicate>
      </Predicates>
      <Ordering xmlns:e28="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e28:OrderBy>
          <e28:Field>ValueHere</e28:Field>
          <e28:Order>ValueHere</e28:Order>
        </e28:OrderBy>
      </Ordering>
      <PageInfo xmlns:e29="https://bingads.microsoft.com/Customer/v13/Entities" i:nil="false">
        <e29:Index>ValueHere</e29:Index>
        <e29:Size>ValueHere</e29: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:e30="https://bingads.microsoft.com/Customer/v13/Entities" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e30:InsertionOrder>
          <e30:AccountId>ValueHere</e30:AccountId>
          <e30:BookingCountryCode d4p1:nil="false">ValueHere</e30:BookingCountryCode>
          <e30:Comment d4p1:nil="false">ValueHere</e30:Comment>
          <e30:EndDate d4p1:nil="false">ValueHere</e30:EndDate>
          <e30:Id d4p1:nil="false">ValueHere</e30:Id>
          <e30:LastModifiedByUserId d4p1:nil="false">ValueHere</e30:LastModifiedByUserId>
          <e30:LastModifiedTime d4p1:nil="false">ValueHere</e30:LastModifiedTime>
          <e30:NotificationThreshold d4p1:nil="false">ValueHere</e30:NotificationThreshold>
          <e30:ReferenceId d4p1:nil="false">ValueHere</e30:ReferenceId>
          <e30:SpendCapAmount d4p1:nil="false">ValueHere</e30:SpendCapAmount>
          <e30:StartDate d4p1:nil="false">ValueHere</e30:StartDate>
          <e30:Name d4p1:nil="false">ValueHere</e30:Name>
          <e30:Status d4p1:nil="false">ValueHere</e30:Status>
          <e30:PurchaseOrder d4p1:nil="false">ValueHere</e30:PurchaseOrder>
          <e30:PendingChanges d4p1:nil="false">
            <e30:Comment d4p1:nil="false">ValueHere</e30:Comment>
            <e30:EndDate d4p1:nil="false">ValueHere</e30:EndDate>
            <e30:RequestedByUserId d4p1:nil="false">ValueHere</e30:RequestedByUserId>
            <e30:ModifiedDateTime d4p1:nil="false">ValueHere</e30:ModifiedDateTime>
            <e30:NotificationThreshold d4p1:nil="false">ValueHere</e30:NotificationThreshold>
            <e30:ReferenceId d4p1:nil="false">ValueHere</e30:ReferenceId>
            <e30:SpendCapAmount d4p1:nil="false">ValueHere</e30:SpendCapAmount>
            <e30:StartDate d4p1:nil="false">ValueHere</e30:StartDate>
            <e30:Name d4p1:nil="false">ValueHere</e30:Name>
            <e30:PurchaseOrder d4p1:nil="false">ValueHere</e30:PurchaseOrder>
            <e30:ChangeStatus d4p1:nil="false">ValueHere</e30:ChangeStatus>
          </e30:PendingChanges>
          <e30:AccountNumber d4p1:nil="false">ValueHere</e30:AccountNumber>
          <e30:BudgetRemaining d4p1:nil="false">ValueHere</e30:BudgetRemaining>
          <e30:BudgetSpent d4p1:nil="false">ValueHere</e30:BudgetSpent>
          <e30:BudgetRemainingPercent d4p1:nil="false">ValueHere</e30:BudgetRemainingPercent>
          <e30:BudgetSpentPercent d4p1:nil="false">ValueHere</e30:BudgetSpentPercent>
          <e30:SeriesName d4p1:nil="false">ValueHere</e30:SeriesName>
          <e30:IsInSeries d4p1:nil="false">ValueHere</e30:IsInSeries>
          <e30:SeriesFrequencyType d4p1:nil="false">ValueHere</e30:SeriesFrequencyType>
          <e30:IsUnlimited d4p1:nil="false">ValueHere</e30:IsUnlimited>
          <e30:IsEndless d4p1:nil="false">ValueHere</e30:IsEndless>
        </e30: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

Request Url

https://clientcenter.api.bingads.microsoft.com/CustomerBilling/v13/InsertionOrders/Search

Request Elements

The SearchInsertionOrdersRequest object defines the body and header elements of the service operation request.

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
Authorization The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts. Please ensure that the token is prefixed with "Bearer ", this is necessary for proper authentication.

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 JSON.

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 JSON

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

{
  "Predicates": [
    {
      "Field": "ValueHere",
      "Operator": "ValueHere",
      "Value": "ValueHere"
    }
  ],
  "Ordering": [
    {
      "Field": "ValueHere",
      "Order": "ValueHere"
    }
  ],
  "PageInfo": {
    "Index": IntValueHere,
    "Size": IntValueHere
  },
  "ReturnAdditionalFields": "ValueHere"
}

Response JSON

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

{
  "InsertionOrders": [
    {
      "AccountId": "LongValueHere",
      "AccountNumber": "ValueHere",
      "BookingCountryCode": "ValueHere",
      "BudgetRemaining": DoubleValueHere,
      "BudgetRemainingPercent": DoubleValueHere,
      "BudgetSpent": DoubleValueHere,
      "BudgetSpentPercent": DoubleValueHere,
      "Comment": "ValueHere",
      "EndDate": "ValueHere",
      "Id": "LongValueHere",
      "IsEndless": "ValueHere",
      "IsInSeries": "ValueHere",
      "IsUnlimited": "ValueHere",
      "LastModifiedByUserId": "LongValueHere",
      "LastModifiedTime": "ValueHere",
      "Name": "ValueHere",
      "NotificationThreshold": DoubleValueHere,
      "PendingChanges": {
        "ChangeStatus": "ValueHere",
        "Comment": "ValueHere",
        "EndDate": "ValueHere",
        "ModifiedDateTime": "ValueHere",
        "Name": "ValueHere",
        "NotificationThreshold": DoubleValueHere,
        "PurchaseOrder": "ValueHere",
        "ReferenceId": "LongValueHere",
        "RequestedByUserId": IntValueHere,
        "SpendCapAmount": DoubleValueHere,
        "StartDate": "ValueHere"
      },
      "PurchaseOrder": "ValueHere",
      "ReferenceId": "LongValueHere",
      "SeriesFrequencyType": "ValueHere",
      "SeriesName": "ValueHere",
      "SpendCapAmount": DoubleValueHere,
      "StartDate": "ValueHere",
      "Status": "ValueHere"
    }
  ]
}

Code Syntax

To call REST API through SDKs, you need to upgrade SDK to a certain version and configure the system parameters.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)