eBay Trading APIVersion 1379
 

GetAdFormatLeads

Use this call to retrieve sales-lead information for a lead-generation listing (such as a Classified Ad).

GetAdFormatLeadsRequest returns the number of leads generated by a Classified Ad and any contact information that prospective buyers have submitted.

The Classified Ad listing format was created for people who want to get in contact with as many interested buyers as possible. You can use Classified Ads to list items such as Real Estate property or an automobile. When you list an item using the Classified Ad format, there is no bidding on the item. Instead, buyers can express interest in the item and supply contact information. When a buyer submits an expression of interest, the buyer information is saved as a lead in the system. Use this call to retrieve the leads associated with your Classified Ad items.

Only the seller who listed the item can request Classified Ad leads associated with that item. Thus, in a call to GetAdFormatLeadsRequest, the value passed in the RequestToken argument identifies the owner of the Classified Ad listing. The item specified the request's ItemID field must be a Classified Ad, listed in a category that supports this item type.



Input

See also Samples.

The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are (or soon will be) non-operational.

The XML prototype does not include requester credentials. This is a documentation limitation only (see Standard Requester Credentials for Making Calls).

<?xml version="1.0" encoding="utf-8"?>
<GetAdFormatLeadsRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Input Fields -->
  <EndCreationTime> dateTime </EndCreationTime>
  <IncludeMemberMessages> boolean </IncludeMemberMessages>
  <ItemID> ItemIDType (string) </ItemID>
  <StartCreationTime> dateTime </StartCreationTime>
  <Status> MessageStatusTypeCodeType </Status>
  <!-- Standard Input Fields -->
  <DetailLevel> DetailLevelCodeType </DetailLevel>
  <!-- ... more DetailLevel values allowed here ... -->
  <ErrorLanguage> string </ErrorLanguage>
  <MessageID> string </MessageID>
  <OutputSelector> string </OutputSelector>
  <!-- ... more OutputSelector values allowed here ... -->
  <Version> string </Version>
  <WarningLevel> WarningLevelCodeType </WarningLevel>
</GetAdFormatLeadsRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
EndCreationTime dateTime Conditional Used with StartCreationTime to limit the returned leads for a user to only those with a creation date less than or equal to the specified date and time.
IncludeMemberMessages boolean Optional Boolean which indicates whether to return mail messages for this lead in a MemberMessage node.
ItemID ItemIDType (string) Optional The unique identifier of an item listed on the eBay site. Returned by eBay when the item is created. This ID must correspond to an ad format item.
StartCreationTime dateTime Conditional Used with EndCreationTime to limit the returned leads for a user to only those with a creation date greater than or equal to the specified date and time.
Status MessageStatusTypeCodeType Optional Filters the leads based on their status.

Applicable values:

Answered
(in/out) The question has been answered at least once.
CustomCode
(in/out) Reserved for future or internal use.
Unanswered
(in/out) The question has not yet been answered.
Standard Input Fields  
DetailLevel DetailLevelCodeType Optional,
repeatable: [0..*]
Detail levels are instructions that define standard subsets of data to return for particular data components (e.g., each Item, Transaction, or User) within the response payload. For example, a particular detail level might cause the response to include buyer-related data in every result (e.g., for every Item), but no seller-related data.

Specifying a detail level is like using a predefined attribute list in the SELECT clause of an SQL query. Use the DetailLevel element to specify the required detail level that the client application needs pertaining to the data components that are applicable to the request.

The DetailLevelCodeType defines the global list of available detail levels for all request types. Most request types support certain detail levels or none at all. If you pass a detail level that exists in the schema but that isn't valid for a particular request, eBay ignores it and processes the request without it.

For each request type, see the detail level tables in the Input/Output Reference to determine which detail levels are applicable and which elements are returned for each applicable detail level.

Note that DetailLevel is required input for GetMyMessages.

With GetSellerList and other calls that retrieve large data sets, please avoid using ReturnAll when possible. For example, if you use GetSellerList, use GranularityLevel instead, or use GetSellerEvents. If you do use 'ReturnAll' with GetSellerList, use a small Pagination.EntriesPerPage value and a narrow EndTimeFrom/EndTimeTo date range for better performance.

Applicable values:

ReturnAll
(in) Returns all available data. With GetSellerList and other calls that retrieve large data sets, please avoid using ReturnAll when possible. For example, if you use GetSellerList, use a GranularityLevel or use the GetSellerEvents call instead. If you use ReturnAll with GetSellerList, use a small EntriesPerPage value and a short EndTimeFrom/EndTimeTo range for better performance.

(Not all values in DetailLevelCodeType apply to this field.)
ErrorLanguage string Optional Use ErrorLanguage to return error strings for the call in a different language from the language commonly associated with the site that the requesting user is registered with. Below are some examples from different countries.

ID Country
en_AU Australia
de_AT Austria
nl_BE Belgium (Dutch)
fr_BE Belgium (French)
en_CA Canada
fr_CA Canada (French)
zh_CN China
fr_FR France
de_DE Germany
zh_HK Hong Kong
en_IN India
en_IE Ireland
it_IT Italy
nl_NL Netherlands
en_SG Singapore
es_ES Spain
de_CH Switzerland
en_GB United Kingdom
en_US United States
MessageID string Optional Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
OutputSelector string Optional,
repeatable: [0..*]
You can use the OutputSelector field to restrict the data returned by a call. This field can make the call response easier to manage, especially when a large payload is returned. If you use the OutputSelector field, the output data will only include the field(s) you specified in the request, as well as all of its child fields (if a field is a container) and its parent fields (if any). Note that it is possible that a field included through an OutputSelector field may still not be returned if it is not applicable, or if it is not found based on other criteria set up in the request payload.

For example, if you are using GetItem and you only want to retrieve the URL of the View Item page (emitted in ViewItemURL field) and the item's Buy It Now price (emitted in BuyItNowPrice field), you would include two separate OutputSelector fields and set the value for each one as ViewItemURL and BuyItNowPrice as in the following example:

 If the following output selectors are used: 

...
<OutputSelector>ViewItemURL</OutputSelector>
<OutputSelector>BuyItNowPrice</OutputSelector>

...

...the response might look like the following

<Item>
<BuyItNowPrice currencyID="USD">0.0</BuyItNowPrice>
<ListingDetails>
<ViewItemURL>http://www.ebay.com/itm/Tag-Heuer-Mens-Watch/182879833261</ViewItemURL>
</ListingDetails>
</Item>

See OutputSelector.

Version string Conditional The version number of the API code that you are programming against (e.g., 1149). The version you specify for a call has these basic effects:
  • It indicates the version of the code lists and other data that eBay should use to process your request.
  • It indicates the schema version you are using.
You need to use a version that is greater than or equal to the lowest supported version.
For the SOAP API: If you are using the SOAP API, this field is required. Specify the version of the WSDL your application is using.

For the XML API: If you are using the XML API, this field has no effect. Instead, specify the version in the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header. (If you specify Version in the body of an XML API request and it is different from the value in the HTTP header, eBay returns an informational warning that the value in the HTTP header was used instead.)

See:
    HTTP headers
    eBay Schema Versioning Strategy
    Lowest Supported Version

WarningLevel WarningLevelCodeType Optional Controls whether or not to return warnings when the application passes unrecognized or deprecated elements in a request.

An unrecognized element is one that is not defined in any supported version of the schema. Schema element names are case-sensitive, so using WarningLevel can also help you remove any potential hidden bugs within your application due to incorrect case or spelling in field names before you put your application into the Production environment.

WarningLevel only validates elements; it doesn't validate XML attributes. It also doesn't control warnings related to user-entered strings or numbers, or warnings for logical errors.

We recommend that you only use this during development and debugging. Do not use this in requests performed in the Production environment.

Applicable values:

High
(in) The WarningLevel value is set to High if the user wishes to receive warnings when the application passes unrecognized or deprecated elements in an API call request. Setting the WarningLevel value to High is not recommended in a production environment. Instead, it should only be used during the development/debugging stage.
Low
(in) The WarningLevel value is set to Low if the user does not wish to receive warnings when the application passes unrecognized or deprecated elements in an API call request. This is the default value if WarningLevel is not specified in the call request.

See Warning Level.



Output

See also Samples.

The box below lists all fields that might be returned in the response. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are not returned (or soon will not be returned) or are not operational (or soon will be non-operational).

<?xml version="1.0" encoding="utf-8"?>
<GetAdFormatLeadsResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Output Fields -->
  <AdFormatLead> AdFormatLeadType
    <AdditionalInformation> string </AdditionalInformation>
    <Address> AddressType
      <CityName> string </CityName>
      <FirstName> string </FirstName>
      <LastName> string </LastName>
      <Phone> string </Phone>
      <Phone2> string </Phone2>
      <PostalCode> string </PostalCode>
      <StateOrProvince> string </StateOrProvince>
      <Street1> string </Street1>
    </Address>
    <Answer1> boolean </Answer1>
    <Answer2> boolean </Answer2>
    <BestTimeToCall> string </BestTimeToCall>
    <Email> string </Email>
    <ExternalEmail> string </ExternalEmail>
    <FinancingAnswer> boolean </FinancingAnswer>
    <ItemID> ItemIDType (string) </ItemID>
    <ItemTitle> string </ItemTitle>
    <MemberMessage> MemberMessageExchangeArrayType
      <MemberMessageExchange> MemberMessageExchangeType
        <CreationDate> dateTime </CreationDate>
        <Question> MemberMessageType
          <Body> string </Body>
        </Question>
        <Response> string </Response>
        <!-- ... more Response values allowed here ... -->
      </MemberMessageExchange>
      <!-- ... more MemberMessageExchange nodes allowed here ... -->
    </MemberMessage>
    <PurchaseTimeFrame> string </PurchaseTimeFrame>
    <Status> AdFormatLeadStatusCodeType </Status>
    <SubmittedTime> dateTime </SubmittedTime>
    <TradeInMake> string </TradeInMake>
    <TradeInModel> string </TradeInModel>
    <TradeInYear> string </TradeInYear>
    <UserID> UserIDType (string) </UserID>
  </AdFormatLead>
  <!-- ... more AdFormatLead nodes allowed here ... -->
  <AdFormatLeadCount> int </AdFormatLeadCount>
  <!-- Standard Output Fields -->
  <Ack> AckCodeType </Ack>
  <Build> string </Build>
  <CorrelationID> string </CorrelationID>
  <Errors> ErrorType
    <ErrorClassification> ErrorClassificationCodeType </ErrorClassification>
    <ErrorCode> token </ErrorCode>
    <ErrorParameters ParamID="string"> ErrorParameterType
      <Value> string </Value>
    </ErrorParameters>
    <!-- ... more ErrorParameters nodes allowed here ... -->
    <LongMessage> string </LongMessage>
    <SeverityCode> SeverityCodeType </SeverityCode>
    <ShortMessage> string </ShortMessage>
  </Errors>
  <!-- ... more Errors nodes allowed here ... -->
  <HardExpirationWarning> string </HardExpirationWarning>
  <Timestamp> dateTime </Timestamp>
  <Version> string </Version>
</GetAdFormatLeadsResponse>
Return Value Type Occurrence Meaning
Call-specific Output Fields [Jump to standard fields]
AdFormatLead AdFormatLeadType Conditionally,
repeatable: [0..*]
Contains contact and other information for one lead. One node is returned for each lead. Only returned at a detail level of ReturnAll. At least one lead must be available for the specified item to return AdFormatLead.

DetailLevel: ReturnAll.
AdFormatLead
  .AdditionalInformation
string Conditionally This field shows the message that was sent from the prospective buyer to the seller. This will be the same content that is returned in the AdFormatLead.MemberMessage.MemberMessageExchange.Question.Body field (that is only displayed if the IncludeMemberMessages boolean field is included in the request and set to true). The advantage of retrieving the MemberMessageExchange node, however, is that you retrieve the entire exchange between the seller and the prospective buyer.

DetailLevel: ReturnAll.
AdFormatLead.Address AddressType Conditionally This container consists of contact information for the prospective buyer. This container will not be returned if the buyer did not provide any contact information.

DetailLevel: ReturnAll.
AdFormatLead.Address.CityName string Conditionally The city associated with an address on file with eBay. Most addresses include a city name, but not all. For example, Singapore is an island city-state, so SG would appear in the Country field, and 'Singapore' or 'Republic of Singapore' would appear in the CountryName field, but the CityName field is not applicable.

Max length: GB, DE - 35; US, CA - 40; AU - 80; Other countries - 50.

DetailLevel: ReturnAll.
AdFormatLead.Address.FirstName string Conditionally Displays the first name of the seller (in a business card format) if the seller's SellerBusinessCodeType value is Commercial.

DetailLevel: ReturnAll.
AdFormatLead.Address.LastName string Conditionally Displays the last name of the seller (in a business card format) if the seller's SellerBusinessCodeType is set to Commercial.

DetailLevel: ReturnAll.
AdFormatLead.Address.Phone string Conditionally User's primary phone number. This may return a value of Invalid Request if:
  • the seller has not enabled the preference for the RequiredShipPhoneNumberPreference field
  • the buyer did not provide a phone number in the shipping address during the checkout process
In the US, the area code (3 digits), the prefix (3 digits), the line number (4 digits), and phone extension (if specified by the user) are returned in this field. The extension can be one or more digits. Non-breaking spaces are used as delimiters between these phone number components.

Max length: eBay validates the content (should only be integer values and delimiters), but not the length for this field. Note: The eBay database allocates up to 128 characters for this field. .

DetailLevel: ReturnAll.
AdFormatLead.Address.Phone2 string Conditionally Secondary Phone number of the lead. Not returned if information is unavailable.

DetailLevel: ReturnAll.
AdFormatLead.Address
  .PostalCode
string Conditionally User's postal code.

Max length: GB, DE - 35; US, CA - 40; AU - 80; Other countries - 50.

DetailLevel: ReturnAll.
AdFormatLead.Address
  .StateOrProvince
string Conditionally The state or province associated with an address on file with eBay. Whether it's a state or a province will depend on the region and/or country. This field should only be passed in or returned if applicable/defined.

Max length: GB, DE - 35; US, CA - 40; AU - 80; Other countries - 50.

DetailLevel: ReturnAll.
AdFormatLead.Address.Street1 string Conditionally The first line of the user's street address.

Note: Note the different maximum lengths noted below for different countries. If a street name exceeds the maximum length for the applicable country, the full street name may be expressed through both the Street1 and Street2 fields.
Max length: GB, DE - 35; US, CA - 40; AU - 80; Other countries - 50.

DetailLevel: ReturnAll.
AdFormatLead.Answer1 boolean Conditionally This field corresponds to a configurable question on the lead form in the View Item web page. The corresponding question is site-specific. To determine the question for a specific site, you must view the form in the web flow for the given site. This field applies to Classified Ad format listings in Motors categories only.

DetailLevel: ReturnAll.
AdFormatLead.Answer2 boolean Conditionally This field corresponds to a configurable question on the lead form in the View Item web page. The corresponding question is site-specific. To determine the question for a specific site, you must view the form in the web flow for the given site. This field applies to Classified Ad format listings in Motors categories only.

DetailLevel: ReturnAll.
AdFormatLead.BestTimeToCall string Conditionally The time of day when the prospective buyer prefers to be contacted by the seller. This field is not returned if this information is unavailable.

DetailLevel: ReturnAll.
AdFormatLead.Email string Conditionally Email address for the prospective buyer. If the prospective buyer chooses to hide his email address when contacting the seller, this element contains two dashes (--) instead of an email address.

DetailLevel: ReturnAll.
AdFormatLead.ExternalEmail string Conditionally Email address for the prospective buyer as entered in the lead form on the View Item page. Provides a way for sellers to contact prospective buyers who choose not to log in to eBay. This applies to only eBay Motors and eBay Motors categories.
Max length: 128.

DetailLevel: ReturnAll.
AdFormatLead.FinancingAnswer boolean Conditionally Prospective buyer answer whether or not the prospective buyer would like financing. Entered on the lead form on the View Item page. Applies to eBay Motors and Motors categories only. Financing response meanings: 0= no response,1= yes, 2= no.

DetailLevel: ReturnAll.
AdFormatLead.ItemID ItemIDType (string) Conditionally The unique identifier of the listing.

DetailLevel: ReturnAll.
AdFormatLead.ItemTitle string Conditionally The title of the listing.
Max length: 80.

DetailLevel: ReturnAll.
AdFormatLead.MemberMessage MemberMessageExchangeArrayType Conditionally Contains any mail message content shared between the seller and prospective buyer.

DetailLevel: ReturnAll.
AdFormatLead.MemberMessage
  .MemberMessageExchange
MemberMessageExchangeType Conditionally,
repeatable: [0..*]
Each MemberMessageExchange container consists of detailed information about a member-to-member message.

DetailLevel: ReturnAll.
AdFormatLead.MemberMessage
  .MemberMessageExchange
  .CreationDate
dateTime Conditionally Date the message was created. Returned if the parent container is returned.

DetailLevel: ReturnAll.
AdFormatLead.MemberMessage
  .MemberMessageExchange
  .Question
MemberMessageType Conditionally Contains all the information about the question being asked. Returned if the parent container is returned.

DetailLevel: ReturnAll.
AdFormatLead.MemberMessage
  .MemberMessageExchange
  .Question.Body
string Conditionally Content of the message is input into this string field. HTML formatting is not allowed in the body of the message. If plain HTML is used, an error occurs and the message will not go through. If encoded HTML is used, the message may go through but the formatting will not be successful, and the recipient of the message will just see the HTML formatting tags.

DetailLevel: ReturnAll.
AdFormatLead.MemberMessage
  .MemberMessageExchange
  .Response
string Conditionally,
repeatable: [0..*]
An answer to the question. Returned if the parent container is returned.

For GetAdFormatLeads, returned if the seller responded to the lead's question. Contains the body of the seller's response message.

DetailLevel: ReturnAll.
AdFormatLead.PurchaseTimeFrame string Conditionally Prospective buyer's time frame for purchasing a vehicle as entered in the Lead form on View Item page for eBay Motors and eBay Motors categories. Purchasing Time Frames include:
  • within next 3 days
  • within a week
  • within a month
  • within three months
  • in more than three months
  • within an undecided time frame

Max length: 255.

DetailLevel: ReturnAll.
AdFormatLead.Status AdFormatLeadStatusCodeType Conditionally The enumeration value in this field will indicate whether or not the seller has responded to the lead.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
New
(out) This value will appear in the response if there is a new message from a prospective buyer that the seller has not yet responded to.
Responded
(out) This value will appear in the response if the seller has already responded to the prospective buyer's message.

Code so that your app gracefully handles any future changes to this list.

DetailLevel: ReturnAll.
AdFormatLead.SubmittedTime dateTime Conditionally Date and time (in GMT) that the lead was submitted.

DetailLevel: ReturnAll.
AdFormatLead.TradeInMake string Conditionally The make of the vehicle the prospective buyer would like to trade in. Entered on the lead form on the View Item page. Applies to eBay Motors and Motors categories only.
Max length: 128.

DetailLevel: ReturnAll.
AdFormatLead.TradeInModel string Conditionally The model of the vehicle the prospective buyer would like to trade in. Entered on the lead form on the View Item page. Applies to eBay Motors and Motors categories only.
Max length: 128.

DetailLevel: ReturnAll.
AdFormatLead.TradeInYear string Conditionally The year of the vehicle the prospective buyer would like to trade in. Entered on the lead form on the View Item page. Applies to eBay Motors and Motors categories only.
Max length: 32.

DetailLevel: ReturnAll.
AdFormatLead.UserID UserIDType (string) Conditionally The eBay user ID of the user who is interested in the seller's item.

DetailLevel: ReturnAll.
AdFormatLeadCount int Always The total number of leads returned. Only returned if you do not specify a detail level.
Standard Output Fields  
Ack AckCodeType Always A token representing the application-level acknowledgement code that indicates the response status (e.g., success). The AckCodeType list specifies the possible values for the Ack field.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Failure
(out) This value indicates that the call request processing failed.
Success
(out) This value indicates that the call request was processed successfully without any issues.
Warning
(out) This value indicates that the call request was successful, but processing was not without any issues. These issues can be checked in the Errors container, that will also be returned when one or more known issues occur with the call request.

(Not all values in AckCodeType apply to this field.)

Code so that your app gracefully handles any future changes to this list.
Build string Always This refers to the specific software build that eBay used when processing the request and generating the response. This includes the version number plus additional information. eBay Developer Support may request the build information when helping you resolve technical issues.
CorrelationID string Conditionally Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
Errors ErrorType Conditionally,
repeatable: [0..*]
A list of application-level errors (if any) that occurred when eBay processed the request.
Errors.ErrorClassification ErrorClassificationCodeType Conditionally API errors are divided between two classes: system errors and request errors.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
RequestError
(out) An error has occurred either as a result of a problem in the sending application or because the application's end-user has attempted to submit invalid data (or missing data). In these cases, do not retry the request. The problem must be corrected before the request can be made again. If the problem is due to something in the application (such as a missing required field), the application must be changed. If the problem is a result of end-user data, the application must alert the end-user to the problem and provide the means for the end-user to correct the data. Once the problem in the application or data is resolved, resend the request to eBay with the corrected data.
SystemError
(out) Indicates that an error has occurred on the eBay system side, such as a database or server down. An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.

Code so that your app gracefully handles any future changes to this list.
Errors.ErrorCode token Conditionally A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.

See Errors By Number.

Errors.ErrorParameters ErrorParameterType Conditionally,
repeatable: [0..*]
This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters
  [ attribute ParamID ]
string Conditionally This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters.Value string Conditionally This is the value of the request parameter noted in the ParamID attribute. So, if the ParamID value was ItemID, the value in this field would be the actual value of that ItemID.
Errors.LongMessage string Conditionally A more detailed description of the condition that raised the error.
Errors.SeverityCode SeverityCodeType Conditionally Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Error
(out) The request that triggered the error was not processed successfully. When a serious application-level error occurs, the error is returned instead of the business data.

If the source of the problem is within the application (such as a missing required element), change the application before you retry the request.
  • If the problem is due to end-user input data, please alert the end-user to the problem and provide the means for them to correct the data. Once the problem in the application or data is resolved, you can attempt to re-send the request to eBay.
  • If the source of the problem is on eBay's side, An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.


See the Error handling section of the Making a Trading API call guide for more information.
Warning
(out) The request was processed successfully, but something occurred that may affect your application or the user. For example, eBay may have changed a value the user sent in. In this case, eBay returns a normal, successful response and also returns the warning.

When a warning occurs, the error is returned in addition to the business data. In this case, you do not need to retry the request (as the original request was successful). However, depending on the cause or nature of the warning, you might need to contact either the end user or eBay to effect a long term solution to the problem to prevent it from reoccurring in the future.

Code so that your app gracefully handles any future changes to this list.
Errors.ShortMessage string Conditionally A brief description of the condition that raised the error.
HardExpirationWarning string Conditionally Expiration date of the user's authentication token. Only returned within the 7-day period prior to a token's expiration. To ensure that user authentication tokens are secure and to help avoid a user's token being compromised, tokens have a limited life span. A token is only valid for a period of time (set by eBay). After this amount of time has passed, the token expires and must be replaced with a new token.
Timestamp dateTime Always This value represents the date and time when eBay processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See the Time Values section in the eBay Features Guide for information about this time format and converting to and from the GMT time zone.

Note: GetCategories and other Trading API calls are designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, this time value reflects the time the cached response was created. Thus, this value is not necessarily when the request was processed. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, this time value does reflect when the request was processed.
Version string Always The version of the response payload schema. Indicates the version of the schema that eBay used to process the request. See the Standard Data for All Calls section in the eBay Features Guide for information on using the response version when troubleshooting CustomCode values that appear in the response.



Detail Controls


DetailLevel

The DetailLevel input field influences which call-specific fields may be returned. (All standard output fields are returned regardless of DetailLevel.)

The none column indicates the fields that are returned when you do not specify a DetailLevel.

YThe field is always returned.
(Y)The field is conditionally returned. See the field documentation for clarification of conditions.
-The field is not returned.

Output Field none ReturnAll
AdFormatLead-(Y)
AdFormatLead.AdditionalInformation-(Y)
AdFormatLead.Address-(Y)
AdFormatLead.Address.CityName-(Y)
AdFormatLead.Address.FirstName-(Y)
AdFormatLead.Address.LastName-(Y)
AdFormatLead.Address.Phone-(Y)
AdFormatLead.Address.Phone2-(Y)
AdFormatLead.Address.PostalCode-(Y)
AdFormatLead.Address.StateOrProvince-(Y)
AdFormatLead.Address.Street1-(Y)
AdFormatLead.Answer1-(Y)
AdFormatLead.Answer2-(Y)
AdFormatLead.BestTimeToCall-(Y)
AdFormatLead.Email-(Y)
AdFormatLead.ExternalEmail-(Y)
AdFormatLead.FinancingAnswer-(Y)
AdFormatLead.ItemID-(Y)
AdFormatLead.ItemTitle-(Y)
AdFormatLead.MemberMessage-(Y)
AdFormatLead.MemberMessage.MemberMessageExchange-(Y)
AdFormatLead.MemberMessage.MemberMessageExchange.CreationDate-(Y)
AdFormatLead.MemberMessage.MemberMessageExchange.Question-(Y)
AdFormatLead.MemberMessage.MemberMessageExchange.Question.Body-(Y)
AdFormatLead.MemberMessage.MemberMessageExchange.Response-(Y)
AdFormatLead.PurchaseTimeFrame-(Y)
AdFormatLead.Status-(Y)
AdFormatLead.SubmittedTime-(Y)
AdFormatLead.TradeInMake-(Y)
AdFormatLead.TradeInModel-(Y)
AdFormatLead.TradeInYear-(Y)
AdFormatLead.UserID-(Y)
AdFormatLeadCountY-



Samples

New to making API calls? Please see Making a Call.

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.

Sample: Basic Call

Retrieves Classified Ad leads.

Description

The ItemID specified in the query represents an item that was listed as a Classified Ad. By setting DetailLevel to ReturnAll, the call retrieves the current set of leads, if any are available. Without a DetailLevel, the call returns the count of available leads.

Input

XML format.

<?xml version="1.0" encoding="utf-8"?> 
<GetAdFormatLeadsRequest xmlns="urn:ebay:apis:eBLBaseComponents"> 
  <RequesterCredentials> 
     <eBayAuthToken>A*******3</eBayAuthToken> 
  </RequesterCredentials> 
  <ItemID>4*********1</ItemID> 
  <DetailLevel>ReturnAll</DetailLevel> 
</GetAdFormatLeadsRequest> 

Output

XML format.
<?xml version="1.0" encoding="utf-8"?> 
<GetAdFormatLeadsResponse xmlns="urn:ebay:apis:eBLBaseComponents"> 
  <Timestamp>2019-11-04T17:52:10.895Z</Timestamp> 
  <Ack>Success</Ack> 
  <Version>1131</Version> 
  <Build>E1131_CORE_API6_19105226_R1</Build> 
  <AdFormatLead> 
    <AdditionalInformation>Are the neighbors noisy?</AdditionalInformation> 
    <Address> 
      <Street1>1*********t</Street1> 
      <CityName>San Jose</CityName> 
      <StateOrProvince>CA</StateOrProvince> 
      <PostalCode>95125</PostalCode> 
    </Address> 
    <BestTimeToCall>8:00 p.m.</BestTimeToCall> 
    <Email>a********@*****.com</Email> 
    <FirstName>****y</FirstName> 
    <LastName>B****t</LastName> 
    <Phone>1-***-***-***2</Phone> 
    <SubmittedTime>2019-09-02T02:55:43.000Z</SubmittedTime> 
  </AdFormatLead> 
  <AdFormatLead> 
    <AdditionalInformation>What kind of view does the place have?</AdditionalInformation> 
    <Address> 
      <StateOrProvince>CA</StateOrProvince> 
    </Address> 
    <Email>a********@*****.com</Email> 
    <FirstName>***b</FirstName> 
    <LastName>B****t</LastName> 
    <SubmittedTime>2019-09-02T01:50:47.000Z</SubmittedTime> 
  </AdFormatLead> 
</GetAdFormatLeadsResponse> 



Change History

Change Date Description
563
2008-04-30
  • StartCreationTime, EndCreationTime (added): You can use these fields to retrieve only those leads for a user that fall within a specified time window.
561
2008-04-16
  • ExternalEmail, PurchaseTimeFrame, TradeInYear, TradeInMake, TradeInModel, FinancingAnswer, Answer1 and Answer2 in AdFormatLeadType (added): New fields associated with GetAdFormatLeads added to retrieve lead information submitted via form on the View Item page.
507
2007-04-04
  • LeadFee (added): Added for the pay-per-lead feature, applicable in upcoming months on the US site.
499
2007-02-07
  • AdFormatLead (modified): Two new elements in the request, Status and IncludeMemberMessages. Several new elements returned including ItemID, ItemTitle, Phone2, Status, UserID, and the MemberMessage container.
489
2006-11-29
  • AdFormatLead.Email (doc change): Updated the Email annotation to remove text that indicated a transactional relationship was needed to retrieve an email address. This restriction does not apply to email addresses retrieved from prospective buyers for ad format listings via GetAdFormatLeads.