GuidesMedia ContentGet Product Media Content

How to get product media content

Educational video from PromoStandards


Function getMediaContent

In order to get all media content (images, videos, documents) for a given product we need to use Media Content Service (MED). Our API allows easy access by a GET request to our medias endpoint.

HTTP VERB: GET

URL: https://api.psrestful.com/v1.1.0/suppliers/{SUPPLIER_CODE}/medias/{PRODUCT_ID}/

Query Parameters

ParameterTypeRequiredDescription
media_typestringNoFilter by media type: Image, Video, Audio, Document
part_idstringNoFilter media for a specific part/variant
class_typeintegerNoFilter by class type ID (can be comma-separated for multiple)
culture_namestringNoLanguage culture name (e.g., en-US, fr-FR). Default: en-US
environmentstringNoEnvironment: PROD or STAGING (default: PROD)

Common Class Types

IDNameDescription
1001BlankUndecorated product image
1002DecoratedProduct with decoration/imprint
1006PrimaryMain product image

Example Request

curl -X GET "https://api.psrestful.com/v1.1.0/suppliers/HIT/medias/5989/" \
  -H "X-API-Key: your-api-key"

Example with Filters

Get only blank images for a specific part:

curl -X GET "https://api.psrestful.com/v1.1.0/suppliers/HIT/medias/5989/?media_type=Image&class_type=1001&part_id=5989BLK" \
  -H "X-API-Key: your-api-key"

Example Response

This is the response from calling with: SUPPLIER_CODE = HIT PRODUCT_ID = 5989

The response has been truncated to show 3 representative media items (Primary, Decorated, and Blank class types):

{
    "MediaContentArray": {
        "MediaContent": [
            {
                "productId": "5989",
                "partId": "5989",
                "url": "https://www.hitpromo.net/imageManager/show/5989_group.jpg",
                "mediaType": "Image",
                "fileSize": null,
                "width": null,
                "height": null,
                "dpi": null,
                "color": null,
                "description": null,
                "singlePart": false,
                "changeTimeStamp": null,
                "ClassTypeArray": {
                    "ClassType": [
                        {
                            "classTypeId": 1006,
                            "classTypeName": "Primary"
                        }
                    ]
                },
                "DecorationArray": null,
                "LocationArray": null
            },
            {
                "productId": "5989",
                "partId": "5989BLK",
                "url": "https://www.hitpromo.net/imageManager/show/5989_BLK_Horizontal_Silkscreen.jpg",
                "mediaType": "Image",
                "fileSize": null,
                "width": null,
                "height": null,
                "dpi": null,
                "color": null,
                "description": "Horizontal Silkscreen Imprint",
                "singlePart": false,
                "changeTimeStamp": null,
                "ClassTypeArray": {
                    "ClassType": [
                        {
                            "classTypeId": 1002,
                            "classTypeName": "Decorated"
                        }
                    ]
                },
                "DecorationArray": {
                    "Decoration": [
                        {
                            "decorationId": 54,
                            "decorationName": "Silk-Screen"
                        }
                    ]
                },
                "LocationArray": null
            },
            {
                "productId": "5989",
                "partId": "5989BLK",
                "url": "https://www.hitpromo.net/imageManager/show/5989_BLK_Blank.jpg",
                "mediaType": "Image",
                "fileSize": null,
                "width": null,
                "height": null,
                "dpi": null,
                "color": null,
                "description": null,
                "singlePart": false,
                "changeTimeStamp": null,
                "ClassTypeArray": {
                    "ClassType": [
                        {
                            "classTypeId": 1001,
                            "classTypeName": "Blank"
                        }
                    ]
                },
                "DecorationArray": {
                    "Decoration": [
                        {
                            "decorationId": 51,
                            "decorationName": "Blank"
                        }
                    ]
                },
                "LocationArray": null
            }
        ]
    },
    "ErrorMessage": null
}

Response Structure

Each MediaContent item contains:

FieldDescription
productIdThe product identifier
partIdThe specific part/variant identifier
urlDirect URL to the media file
mediaTypeType of media: Image, Video, Audio, Document
ClassTypeArrayClassification of the media (Blank, Decorated, Primary, etc.)
DecorationArrayDecoration methods shown in the media
descriptionOptional description of the media

API Versions

Both v1.0.0 and v1.1.0 are supported:

https://api.psrestful.com/v1.0.0/suppliers/{SUPPLIER_CODE}/medias/{PRODUCT_ID}/
https://api.psrestful.com/v1.1.0/suppliers/{SUPPLIER_CODE}/medias/{PRODUCT_ID}/