Export (0) Print
Expand All

SearchInsertionOrders Service Operation

Searches for insertion orders that match a specified criteria.

Request | Response

Error Codes

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

SearchInsertionOrdersRequest Message

The SearchInsertionOrdersRequest object defines the elements of the request’s body. The elements must be in the same order as shown in the SOAP example.

Request Body

Element

Description

Data Type

Required

Ordering

Determines the order of results by the specified property of an account.

System_CLiX_note Note

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.

Field

Description

Id

The order is determined by the InsertionOrderId element of the returned InsertionOrder.

Name

The order is determined by the Name element of the returned InsertionOrder.

OrderBy array

No

PageInfo

Determines the index and size of results per page.

Paging

Yes

Predicates

Determines the request conditions. This operation's response will include accounts that match all of the specified predicates.

System_CLiX_note Note

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 this service operation, the following are supported Field element and Operator elements of a Predicate object.

Field

Operator

Description

AccountId

Equals

Use this field to search the Id element of the Account object.

System_CLiX_note Note

This predicate field is required.

EndDate

GreaterThanEquals

LessThanEquals

Use this field to search by insertion order end date.

System_CLiX_note Note

The date is stored in Coordinated Universal Time (UTC). Only the month, day, and year of the specified string are used for search. If you specify the hour, minutes, and seconds of a date they will be ignored.

For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types.

InsertionOrderIds

Equals

In

Use this field to search the InsertionOrderId element of the InsertionOrder object.

StartDate

GreaterThanEquals

LessThanEquals

Use this field to search by insertion order start date.

System_CLiX_note Note

The date is stored in Coordinated Universal Time (UTC). Only the month, day, and year of the specified string are used for search. If you specify the hour, minutes, and seconds of a date they will be ignored.

For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types.

Predicate array

Yes

Request Header

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 OAuth access token used to manage Bing Ads accounts linked to a Microsoft Account. For more information, see Managing User Authentication with OAuth.

string

DeveloperToken

The client application's developer access token.

string

Password

The Bing Ads user's sign-in password.

string

UserName

The Bing Ads user's sign-in user name. You may not set this element to a Microsoft account.

string

Request SOAP

The following example shows the complete request envelope.

<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/v9">
    <Action mustUnderstand="1">SearchInsertionOrders</Action>
    <ApplicationToken i:nil="false"></ApplicationToken>
    <AuthenticationToken i:nil="false"></AuthenticationToken>
    <DeveloperToken i:nil="false"></DeveloperToken>
    <Password i:nil="false"></Password>
    <UserName i:nil="false"></UserName>
  </s:Header>
  <s:Body>
    <SearchInsertionOrdersRequest xmlns="https://bingads.microsoft.com/Billing/v9">
      <Predicates xmlns:e7="https://bingads.microsoft.com/Customer/v9/Entities" i:nil="false">
        <e7:Predicate>
          <e7:Field i:nil="false"></e7:Field>
          <e7:Operator></e7:Operator>
          <e7:Value i:nil="false"></e7:Value>
        </e7:Predicate>
      </Predicates>
      <Ordering xmlns:e8="https://bingads.microsoft.com/Customer/v9/Entities" i:nil="false">
        <e8:OrderBy>
          <e8:Field></e8:Field>
          <e8:Order></e8:Order>
        </e8:OrderBy>
      </Ordering>
      <PageInfo xmlns:e9="https://bingads.microsoft.com/Customer/v9/Entities" i:nil="false">
        <e9:Index></e9:Index>
        <e9:Size></e9:Size>
      </PageInfo>
    </SearchInsertionOrdersRequest>
  </s:Body>
</s:Envelope>

SearchInsertionOrdersResponse Message

Response Body

Element

Description

Data Type

InsertionOrders

A list of insertion orders that meet the specified criteria.

InsertionOrder array

Response Header

Element

Description

Data Type

TrackingId

The identifier of the log entry that contains the details of the API call.

string

Response SOAP

The following example shows the complete response envelope.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Billing/v9">
    <TrackingId p4:nil="false" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance"></TrackingId>
  </s:Header>
  <s:Body>
    <SearchInsertionOrdersResponse xmlns="https://bingads.microsoft.com/Billing/v9">
      <InsertionOrders xmlns:e10="https://bingads.microsoft.com/Customer/v9/Entities" p5:nil="false" xmlns:p5="http://www.w3.org/2001/XMLSchema-instance">
        <e10:InsertionOrder>
          <e10:AccountId></e10:AccountId>
          <e10:BalanceAmount p5:nil="false"></e10:BalanceAmount>
          <e10:BookingCountryCode p5:nil="false"></e10:BookingCountryCode>
          <e10:Comment p5:nil="false"></e10:Comment>
          <e10:EndDate></e10:EndDate>
          <e10:Id p5:nil="false"></e10:Id>
          <e10:LastModifiedByUserId p5:nil="false"></e10:LastModifiedByUserId>
          <e10:LastModifiedTime p5:nil="false"></e10:LastModifiedTime>
          <e10:NotificationThreshold p5:nil="false"></e10:NotificationThreshold>
          <e10:ReferenceId p5:nil="false"></e10:ReferenceId>
          <e10:SpendCapAmount></e10:SpendCapAmount>
          <e10:StartDate></e10:StartDate>
          <e10:Name p5:nil="false"></e10:Name>
          <e10:PurchaseOrder p5:nil="false"></e10:PurchaseOrder>
          <e10:Status p5:nil="false"></e10:Status>
        </e10:InsertionOrder>
      </InsertionOrders>
    </SearchInsertionOrdersResponse>
  </s:Body>
</s:Envelope>

Error Codes

If the service operation fails, it throws a FaultException exception, which contains one or more of the Bing Ads API error data objects. For information about the fault detail objects, see Customer Billing Error Data Objects and Handling Service Errors and Exceptions.

The following are example error codes that the error objects can include when using this service operation. For all documented error codes, please see Bing Ads Operation Error Codes.

Error Code

InvalidCredentials

Community Additions

ADD
Show:
© 2014 Microsoft