Skip to main content

Method signature

client.mediaContent.getMediaContent(params)
Retrieves media content for a specific product based on media type and optional filtering criteria.

Parameters

mediaType
string
required
Type of media to retrieve. Common values include:
  • Image - Product images
  • Video - Product videos
  • Document - Product documents
productId
string
required
Unique identifier for the product.
partId
string
Optional part identifier to filter media for a specific product variant.
classType
number
Optional classification type for the media. Example: 1006 for high-resolution images.
cultureName
string
Optional culture/language code for localized media (e.g., en-US, fr-CA).

Return value

MediaContentArray
object[]
Array of media content objects.

Example

import { PromoStandards } from 'promostandards-sdk-js';

const supplier = new PromoStandards.Client({
  id: 'account_id',
  password: 'password',
  endpoints: [
    {
      type: 'MediaContent',
      version: '1.1.0',
      url: 'https://supplier.com/productMedia',
    },
  ],
});

const mediaContentData = await supplier.mediaContent.getMediaContent({
  mediaType: 'Image',
  productId: 'item_id',
  classType: 1006,
});

console.log(mediaContentData);
The classType parameter typically uses numeric codes defined by the PromoStandards specification. Common values include:
  • 1006 - High-resolution product images
  • 1005 - Thumbnail images
  • 1007 - Lifestyle images
Use the partId parameter when you need media specific to a product variant (e.g., different colors or sizes).

Build docs developers (and LLMs) love