Skip to main content

Method signature

client.mediaContent.getMediaDateModified(params)
Retrieves the last modified timestamp for media content. This is useful for determining when to update cached media or for incremental synchronization.

Parameters

cultureName
string
Optional culture/language code for localized media (e.g., en-US, fr-CA).
changeTimeStamp
string
Optional timestamp in ISO 8601 format. Returns only media modified after this timestamp. Useful for incremental updates.

Return value

MediaDateModifiedArray
object[]
Array of media date modified 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 dateModifiedData = await supplier.mediaContent.getMediaDateModified({
  cultureName: 'en-US',
});

console.log(dateModifiedData);
Use changeTimeStamp to implement efficient incremental synchronization. Store the timestamp of your last successful sync and use it in subsequent calls to retrieve only updated media.
This method is particularly useful for maintaining a local cache of product media without having to re-download all media files on every sync.

Build docs developers (and LLMs) love