marketing APIv1_beta.1.0

getAlsoViewedByProduct

GET
/merchandised_product/get_also_viewed_products

This method returns products that were also viewed when shoppers viewed the product specified in the request. Showing 'also viewed' products encourages up-selling and cross-selling.

You specify the product by one of the following:

  • epid - eBay Product ID
  • gtin - Global Trade Item Number (UPC, ISBN, EAN)
  • brand (brand name, such as Nike) plus mpn (Manufacturer's Part Number)

Restrictions

For a list of supported sites and other restrictions, see API Restrictions.

Note: A maximum of 12 products are returned. The method will return up to 12 products, but it can be less than 12. If the number of products found is less than 12, the method will return all of the products matching the criteria.

Input

Resource URI (production)

GET https://api.ebay.com/buy/marketing/v1_beta/merchandised_product/get_also_viewed_products?

URI parameters

ParameterTypeDescription
epidstringThe eBay product identifier of a product.

Required: You must specify one epid, or one gtin, or one brand plus mpn pair.

Occurrence: Optional

gtinstringThe unique Global Trade Item Number of the item as defined by https://www.gtin.info. This can be a UPC (Universal Product Code), EAN (European Article Number), or an ISBN (International Standard Book Number value.

Required: You must specify one epid, or one gtin, or one brand plus mpn pair.

Occurrence: Optional

mpnstringThe manufacturer part number of the product.

Restriction: This must be used along with brand.

Occurrence: Optional

brandstringThe brand of the product.

Restriction: This must be used along with mpn.
Required: You must specify one epid, or one gtin, or one brand plus mpn pair.

Occurrence: Optional

HTTP request headers

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

OAuth scope

This request requires an access token created with the client credentials 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/buy.marketing

See OAuth access tokens for more information.

Output

HTTP response headers

Output container/fieldTypeDescription
merchandisedProductsarray of MerchandisedProductAn array of containers for the products.

Occurrence: Conditional

merchandisedProducts.averageRatingstringThe average rating for the product based on eBay user ratings.

Occurrence: Conditional

merchandisedProducts.epidstringThe eBay product identifier of a product from the eBay product catalog. You can use this value in the Browse API search method to retrieve items for this product.

Occurrence: Conditional

merchandisedProducts.imageImageThe container for the product image.

Occurrence: Conditional

merchandisedProducts.image.heightinteger Reserved for future use.

Occurrence: Conditional

merchandisedProducts.image.imageUrlstringThe URL of the image.

Occurrence: Conditional

merchandisedProducts.image.widthinteger Reserved for future use.

Occurrence: Conditional

merchandisedProducts.marketPriceDetailsarray of MarketPriceDetailAn array of containers for the product market price details, such as condition and market price.

Occurrence: Conditional

merchandisedProducts.marketPriceDetails.conditionGroupstringThe name for the condition of the product. For example: NEW

Note: As of September 1, 2021, condition ID 2500 ('Seller Refurbished') is no longer a valid item condition in the Cell Phones & Smartphones category (category ID 9355) for the following marketplaces: US, Canada, UK, Germany, and Australia. This refurbished item condition has been replaced by three new refurbished values, which include 'Excellent - Refurbished' (condition ID 2010), 'Very Good - Refurbished' (condition ID 2020), and 'Good - Refurbished' (condition ID 2030).

Occurrence: Conditional

merchandisedProducts.marketPriceDetails.conditionIdsarray of stringAn array of condition identifiers for the product.

Note: As of September 1, 2021, condition ID 2500 ('Seller Refurbished') is no longer a valid item condition in the Cell Phones & Smartphones category (category ID 9355) for the following marketplaces: US, Canada, UK, Germany, and Australia. This refurbished item condition has been replaced by three new refurbished values, which include 'Excellent - Refurbished' (condition ID 2010), 'Very Good - Refurbished' (condition ID 2020), and 'Good - Refurbished' (condition ID 2030).

Occurrence: Conditional

merchandisedProducts.marketPriceDetails.estimatedStartPriceAmountThe lowest priced active item for this product on eBay.

Occurrence: Conditional

merchandisedProducts.marketPriceDetails.estimatedStartPrice.currencyCurrencyCodeEnumThe three-letter ISO 4217 code representing the currency of the amount in the value field.

Occurrence: Conditional

merchandisedProducts.marketPriceDetails.estimatedStartPrice.valuestringThe monetary amount, in the currency specified by the currency field.

Occurrence: Conditional

merchandisedProducts.ratingAspectsarray of RatingAspectAn array of containers for ratings of the product aspects, such as "Is it a good value".

Occurrence: Conditional

merchandisedProducts.ratingAspects.countintegerThe number of eBay users that rated the product on this aspect.

Occurrence: Conditional

merchandisedProducts.ratingAspects.descriptionstringThe name of the rating aspect. Camping tent examples: Is it lightweight? or Is it easy to set up?

Occurrence: Conditional

merchandisedProducts.ratingAspects.namestringThe answer or value of the rating aspect. Camping tent examples: Lightweight or Easy to set up

Occurrence: Conditional

merchandisedProducts.ratingAspects.ratingAspectDistributionsarray of RatingAspectDistributionThe container for the details of the aspect rating. The details show the aspect rating value, usually TRUE or FALSE and the user count and percentage.

Occurrence: Conditional

merchandisedProducts.ratingAspects.ratingAspectDistributions.countintegerThe number of eBay users that choose this rating aspect value.

Occurrence: Conditional

merchandisedProducts.ratingAspects.ratingAspectDistributions.percentagestringThe percentage of the aspect rating value.

ratingAspectDistributions.percentage = ratingAspectDistributions.count / ratingAspects.count

Occurrence: Conditional

merchandisedProducts.ratingAspects.ratingAspectDistributions.valuestringThe rating aspect. For example: TRUE or FALSE

Occurrence: Conditional

merchandisedProducts.ratingCountintegerThe total number of eBay users that rated the product.

Occurrence: Conditional

merchandisedProducts.reviewCountintegerThe total number of eBay users that wrote a review for the product.

Occurrence: Conditional

merchandisedProducts.titlestringThe title of the product.

Occurrence: Conditional

warningsarray of ErrorDetailV3The container with all the warnings for the input request.

Occurrence: Conditional

warnings.categorystringThis string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors.

Occurrence: Always

warnings.domainstringThe name of the primary system where the error occurred. This is relevant for application errors.

Occurrence: Always

warnings.errorIdintegerA unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.

Occurrence: Always

warnings.inputRefIdsarray of stringAn array of reference IDs that identify the specific request elements most closely associated to the error or warning, if any.

Occurrence: Conditional

warnings.longMessagestringA detailed description of the condition that caused the error or warning, and information on what to do to correct the problem.

Occurrence: Conditional

warnings.messagestringA description of the condition that caused the error or warning.

Occurrence: Always

warnings.outputRefIdsarray of stringAn array of reference IDs that identify the specific response elements most closely associated to the error or warning, if any.

Occurrence: Conditional

warnings.parametersarray of ErrorParameterV3An array of warning and error messages that return one or more variables contextual information about the error or warning. This is often the field or value that triggered the error or warning.

Occurrence: Conditional

warnings.parameters.namestringThis is the name of input field that caused an issue with the call request.

Occurrence: Conditional

warnings.parameters.valuestringThis is the actual value that was passed in for the element specified in the name field.

Occurrence: Conditional

warnings.subdomainstringThe name of the subdomain in which the error or warning occurred.

Occurrence: NA

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
400Bad Request
409Conflict
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
70000API_MARKETINGAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
70007API_MARKETINGBUSINESSThe marketplace value {marketplace} is not supported. The supported values are: {marketplaces}.
70100API_MARKETINGREQUESTThe request must have only one valid 'epid', or one 'gtin', or one 'brand' PLUS 'mpn' pair.
70101API_MARKETINGREQUESTThe EPID value {epid} does not exist in the eBay product catalog.
70102API_MARKETINGREQUESTThe GTIN value {gtin} does not exist in the eBay product catalog.
70103API_MARKETINGREQUESTThe combination of MPN {mpn} and brand {brand} does not exist in the eBay product catalog.

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: Retrieve Also Viewed Products

The call retrieves the products that were also viewed by buyers who viewed the 'Canon EOS 5D Mark IV 30.4MP Digital SLR Camera' product. Wireless All-In-One(Print, Copy, Scan) Inkjet Printer' product.

Input

The input is the EPID (230154655) of the product.
GET
https://api.ebay.com/buy/marketing/v1_beta/merchandised_product/get_also_viewed_products?epid=230154655

Output

The output is an array of the products that were also viewed by buyers that viewed the Canon EOS 5D Mark IV 30.4MP Digital SLR Camera, such as the Nikon D D3300 24 2MP Digital SLR camera product.

For an example of 'also viewed' products, see Show 'also viewed' and 'also bought' products.