Skip to main content

GET/classified_lead

This method retrieves leads for all of the seller's active classified ad listings. Optionally, just those matching specified filter criteria can be returned.

Note: This is a Limited Release(Limited Release) API available only to select developers approved by business units. For information on how to obtain access to this API in production, please contact eBay support.

Input

Resource URI

GET https://apiz.ebay.com/sell/leads/v1/classified_lead?

This method is supported in Sandbox environment. To access the endpoint, just replace the apiz.ebay.com root URI with apiz.sandbox.ebay.com

URI parameters

ParameterTypeDescription
startTimestringUse with endTime to limit the returned leads for the user. Only leads for active listings with a creation date greater than or equal to the specified date and time will be returned.

Note: The startTime and endTime fields can be used independently to filter results.

The time stamp must be formatted as an ISO 8601 string, which is based on the 24-hour Universal Coordinated Time (UTC) clock.

Format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[SS]Z
Example: 2025-01-10T15:54:00Z

Occurrence: Optional

endTimestringUse with startTime to limit the returned leads for the user. Only leads with a creation date less than or equal to the specified date and time will be returned.

Note: The startTime and endTime fields can be used independently to filter results.

The time stamp must be formatted as an ISO 8601 string, which is based on the 24-hour Universal Coordinated Time (UTC) clock.

Format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[SS]Z
Example: 2025-01-10T15:54:00Z

Occurrence: Optional

includeMessagesbooleanBoolean that indicates whether to return mail messages for this lead in a memberMessage container (true returns messages). If omitted, no messages for this lead will be returned (same as when set to false).

Default: false

Occurrence: Optional

statusstringThe enumeration value in this field will indicate whether or not a question has been answered. Valid values include:
  • Answered
  • Unanswered

Occurrence: Optional

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
Content-TypestringThis header indicates the format of the request body provided by the client. Its value should be set to application/json.

For more information, refer to HTTP request headers.

Occurrence: Required

Accept-EncodingstringThis header indicates the compression-encoding algorithms the client accepts for the response. This value should be set to gzip.

For more information, refer to HTTP request headers.

Occurrence: Strongly Recommended

OAuth scope

This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/sell.leads

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
classifiedLeadsarray of ClassifiedLead

An array of leads for the seller's active classified ad listings.

Occurrence: Conditional

classifiedLeads.itemIdstring

The unique identifier of the listing.

Occurrence: Always

classifiedLeads.itemTitlestring

The title of the listing.

Max length: 80.

Occurrence: Always

classifiedLeads.responsesarray of ClassifiedLeadResponses

An array of the classified lead responses.

Occurrence: Conditional

classifiedLeads.responses.additionalInformationstring

This field shows the first message that was sent from the prospective buyer to the seller. This will be the same content as in the memberMessageExchange.question.body field, if returned.

Note: Retrieve the memberMessageExchange container to retrieve the entire exchange between the seller and the prospective buyer (all messages).

Occurrence: Conditional

classifiedLeads.responses.contactInformationContactInformation

This container consists of contact information for the prospective buyer. Fields in this container are returned if provided. This container will not be returned if the buyer did not provide any contact information.

Occurrence: Conditional

classifiedLeads.responses.contactInformation.firstNamestring

The first name of the prospective buyer.

Occurrence: Conditional

classifiedLeads.responses.contactInformation.lastNamestring

The last name of the prospective buyer.

Occurrence: Conditional

classifiedLeads.responses.contactInformation.phonestring

The prospective buyer's primary phone number.

Occurrence: Conditional

classifiedLeads.responses.contactInformation.postalCodestring

The prospective buyer's postal code.

Occurrence: Conditional

classifiedLeads.responses.emailstring

Email address for the prospective buyer, if that buyer was logged in to eBay.

Occurrence: Conditional

classifiedLeads.responses.externalEmailstring

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.

Occurrence: Conditional

classifiedLeads.responses.financingAnswerboolean

Boolean that indicates if a prospective buyer answered whether or not they would like financing. Entered on the lead form on the View Item page. Applies to eBay Motors and Motors categories only.

Occurrence: Conditional

classifiedLeads.responses.leadFeeLeadFee

A container that returns the amount charged for this pay per lead contact, in the item's site local currency.

Occurrence: Always

classifiedLeads.responses.leadFee.amountAmount

A container that returns the amount charged for the lead service with currency information.

Occurrence: Conditional

classifiedLeads.responses.leadFee.amount.convertedFromCurrencystring

A three-letter ISO 4217 code that indicates the currency of the amount in the convertedFromValue field. This value is required or returned only if currency conversion/localization is required, and represents the pre-conversion currency.

Occurrence: Conditional

classifiedLeads.responses.leadFee.amount.convertedFromValuestring

The monetary amount before any conversion is performed, in the currency specified by the convertedFromCurrency field. This value is required or returned only if currency conversion/localization is required. The value field contains the converted amount of this value, in the currency specified by the currency field.

Occurrence: Conditional

classifiedLeads.responses.leadFee.amount.currencystring

A three-letter ISO 4217 code that indicates the currency of the amount in the value field. If currency conversion/localization is required, this is the post-conversion currency of the amount in the value field.

Occurrence: Always

classifiedLeads.responses.leadFee.amount.valuestring

The monetary amount, in the currency specified by the currency field. If currency conversion/localization is required, this value is the converted amount, and the convertedFromValue field contains the amount in the original currency.

Occurrence: Always

classifiedLeads.responses.leadFee.descriptionstring

An explanation of the special fee charged.

Occurrence: Always

classifiedLeads.responses.leadStatusLeadStatus

The enumeration value in this field indicates whether or not the seller has responded to the lead, or if this is new.

Occurrence: Conditional

classifiedLeads.responses.memberMessageMemberMessage

Contains any mail message content shared between the seller and prospective buyer.

Only returned if the includeMessages boolean is true.

Occurrence: Always

classifiedLeads.responses.memberMessage.memberMessageExchangearray of MemberMessageExchange

An array that provides detailed information about a member-to-member message.

Occurrence: Conditional

classifiedLeads.responses.memberMessage.memberMessageExchange.creationDatestring

Date the message was created. Returned if the parent container is returned.

Occurrence: Conditional

classifiedLeads.responses.memberMessage.memberMessageExchange.questionQuestion

Contains all the information about the question being asked. Returned if the parent container is returned.

Occurrence: Conditional

classifiedLeads.responses.memberMessage.memberMessageExchange.question.bodystring

Content of the message is input into this string field.

Occurrence: Conditional

classifiedLeads.responses.memberMessage.memberMessageExchange.question.messageIDinteger

The unique identifier of the message.

Occurrence: Conditional

classifiedLeads.responses.memberMessage.memberMessageExchange.responsestring

An answer to the question. Contains the body of the seller's response message, if sent.

Occurrence: Conditional

classifiedLeads.responses.submittedTimestring

Date and time (in GMT) that the lead was submitted.

Occurrence: Always

classifiedLeads.responses.tradeInMakestring

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.

Occurrence: Conditional

classifiedLeads.responses.tradeInModelstring

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.

Occurrence: Conditional

classifiedLeads.responses.tradeInYearstring

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.

Occurrence: Conditional

classifiedLeads.responses.userIdstring

The eBay user ID of the user who is interested in the seller's item.

Occurrence: Conditional

totalItemsinteger

The total number of listings returned.

Occurrence: Always

totalLeadsinteger

The total number of leads returned for all listings.

Occurrence: Always

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200OK
204No Content
401Unauthorized
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
350000API_LEADSAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
352003API_LEADSREQUESTInvalid UTC Time. Please provide a valid UTC time in the format YYYY-MM-DDTHH:MM:SSZ.
352004API_LEADSREQUESTInvalid Date. Date has to be in the past.
352005API_LEADSREQUESTInvalid Date Range. End time should be greater than start time.
352006API_LEADSREQUESTInvalid status. Please provide a valid status value (Answered/Unanswered).
352007API_LEADSREQUESTInvalid value for includeMessages. Please provide a valid boolean value (true/false).

Warnings

This call has no warnings.

Samples

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

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Returns all leads generated by all classified ads listings based on the criteria

This call retrieves an array of leads based on the criteria.

Input

This method does not use a request payload. This sample retrieves all leads for all classified ad listings between the start and end time, with all buyer details and includes the messages exchanged between seller and buyer. This sample returns the leads that the buyer has not answered.

GEThttps://apiz.ebay.com/sell/leads/v1/classified_lead?startTime=2024-07-13T15:54:00Z&endTime=2025-01-17T06:41:06Z&includeMessages=true

Output

If the call is successful, an array of leads is returned.