Media assets

The SupplierXM product API gives you access to three different types of media assets:

  • Images
  • Documents
  • Recipes

Images

SupplierXM handles four different image formats: JPEG, PNG, GIF, and TIFF formats.

Images sent by manufacturers are downloaded and stored on our side. We also ensure that an image is not present more than once by checking the image itself thanks to a cyclical redundancy check. If the image is new, it is simply added to the image list.

For every product image added, we generate different exportable image formats with different resolutions so you can use the resolution that works best for you. We generate the following resolutions:

  • 1024x1024
  • 512x512
  • 256x256
  • 128x128
  • 64x64
    To limit image size, all exportable images are converted to JPG format.

Image attributes

The following attributes are used to describe a product image:

  • angleHorizontal : Horizontal angle at which the image was taken when compared to the front face of the product.
  • angleVertical : Vertical angle at which the image was taken when compared to the front face of the product.
  • contentType : indicates how the product was prepared for the image (In package, Out of package, in use, etc.)
  • createdAt : Date upon which the image was imported into SupplierXM.
  • exportables : List of the generated exportable formats. Every exportable format resolution can be retrieved in attributes height and width.
  • fileEffectiveEndDateTime: Date when the image ceases to be effective for use.
  • fileEffectiveStartDateTime : Date when the image begins to be effective for use.
  • fileType : Different standard and high resolution images.
  • format : Name of the file format. Could be JPG or PNG.
  • isPackshot : Flag to identify the main image of a product. Please note that this tag has been implemented to improve the user experience in-platform and should not be interpreted. Indeed, as a recipient, you can have different interpretations of the expected packshots than other recipients connected on SupplierXM.
  • productFace : Value to denote which way the product is facing in the image.
  • ratio : Description of the aspect ratio used to determine how a digital asset fits on a page
  • resolution : Resolution of the file. Knowing the resolution will allow you to be able to determine the best system with which to use the image
  • sequenceNumber : Unique image reference when different images of the same product share the same characteristics (angle, face, effective dates, contentType).
  • tag : List of tags (free text) used to qualify the image.
  • uniformResourceIdentifier : URL to access the image hosted by SupplierXM in the different formats listed above.
  • uniformResourceIdentifierOrigin : URL (not hosted by SupplierXM) used to import the image on SupplierXM. Only present for images not manually imported on SupplierXM. Contains the initial file name of the image.
  • updatedAt : Date when the image was last updated.
  • url : URL to access the image hosted by SupplierXM.

❗️

If you push data to SupplierXM, you should at least provide the URL of the image to download in the field url. See the Upload assets section for more information.

"pictures": [
    {
      "contentType": null, 
      "definition": " example", 
      "typeOfInformation": null, 
      "fileEffectiveEndDateTime": "2017-03-19T07:02:52.074139", 
      "ratio": 89, 
      "sequenceNumber": 42, 
      "angleHorizontal": null, 
      "format": " example", 
      "url": "https://smedia.alkemics.com/product/XXX/picture-url.png", 
      "productFace": null, 
      "fileType": null, 
      "exportables": [
        {
          "uniformResourceIdentifier": "https://smedia.alkemics.com/XXX/1024x1024.jpg", 
          "height": 1024, 
          "width": 1024, 
          "fileSize": 9, 
          "updatedAt": "2017-04-09T07:02:52.074447", 
          "createdAt": "2017-01-30T07:02:52.074387"
        },
        {
          "uniformResourceIdentifier": "https://smedia.alkemics.com/XXX/512x512.jpg", 
          "height": 512, 
          "width": 512, 
          "fileSize": 9, 
          "updatedAt": "2017-04-09T07:02:52.074447", 
          "createdAt": "2017-01-30T07:02:52.074387"
        },
        {
          "uniformResourceIdentifier": "https://smedia.alkemics.com/XXX/256x256.jpg", 
          "height": 256, 
          "width": 256,
          "updatedAt": "2017-04-09T07:02:52.074447", 
          "createdAt": "2017-01-30T07:02:52.074387"
        },
        {
          "uniformResourceIdentifier": "https://smedia.alkemics.com/XXX/128x128.jpg", 
          "height": 128, 
          "width": 128,
          "updatedAt": "2017-04-09T07:02:52.074447", 
          "createdAt": "2017-01-30T07:02:52.074387"
        },
        {
          "uniformResourceIdentifier": "https://smedia.alkemics.com/XXX/64x64.jpg", 
          "height": 64, 
          "width": 64,
          "updatedAt": "2017-04-09T07:02:52.074447", 
          "createdAt": "2017-01-30T07:02:52.074387"
        }
      ], 
      "tag": [
        {
          "tag": " example"
        }
      ], 
      "uniformResourceIdentifierOrigin": "example", --> original url (not hosted by SupplierXM)
      "updatedAt": "2017-01-09T07:02:52.073914", 
      "isPackshot": true, 
      "fileEffectiveStartDateTime": "2017-02-12T07:02:52.074081", 
      "angleVertical": null, 
      "createdAt": "2017-01-14T07:02:52.073835", 
      "angleOther": null,
      "contentDescriptionText": [
        {
          "expressedIn": {
            "code": "fra-FR",
            "description": "French",
            "label": "French",
            "normalizedCode": "fr"
          },
          "data": "picture fr"
        }
      ]
    }
  ],

Mapping between SupplierXM and GS1 image attributes

As an official GDSN data pool, SupplierXM retrieves product images sent via GDSN.
You will find below all information regarding the ways SupplierXM integrates GS1 attributes.

GDSN attributes

Currently, the only types of referenced files sent through GDSN that are integrated in SupplierXM are the product images (referencedFileTypeCode == PRODUCT_IMAGE, MOBILE_DEVICE_IMAGE, OUT_OF_PACKAGE_IMAGE).
For every product image sent through GDSN, SupplierXM integrates the following fields:

GDSN attributes

SupplierXM attributes

fileEffectiveEndDateTime

fileEffectiveEndDateTime

fileEffectiveStartDateTime

fileEffectiveEndDateTime

uniformResourceIdentifier

uniformResourceIdentifierOrigin

canFilesBeEdited

canFilesBeEdited

isFileBackgroundTransparent

isFileBackgroundTransparent

verticalCameraAngleCode

angleVertical

isPrimaryFile

isPackshot

GS1 image file name

If compliant with GS1 standard, SupplierXM automatically retrieves attributes from the image file name (when exchanged through GDSN)

For example, the following attributes will be deduced from an image file imported on SupplierXM from GDSN and whose image file name is '03046920000048_D1L1_001.png

digit position

example

SupplierXM attribute

Mapping between SupplierXM & GS1 value

16th

D

fileType

0 -> A
1 -> C
2 -> Z
3 -> B
4 -> D
5 -> E
6 -> F
7 -> M
8 -> H
9 -> L

17th

1

productFace

0 -> 6
1 -> 0
2 -> 1
3 -> 2
7 -> 3
8 -> 4
9 -> 5

18th

L

angleHorizontal

C -> 1
L -> 0
R -> 2
N -> 3

19th

1

contentType

1 -> 1
0 -> 0
D -> 2
K -> 3
A -> 6
B -> 7
C -> 8
E -> 9
F -> 10
G -> 11
H -> 12
J -> 13
L -> 14
M -> 15

20st-22rd

001

sequenceNumber

Documents

Another media asset type you can access through our API is documents.

Accepted mime types

We currently only accept a restricted type (based on MIME) of documents :

  • application/pdf
  • application/zip
  • application/vnd.ms-excel
  • application/vnd.ms-office
  • application/vnd.ms-word
  • application/vnd.ms-powerpoint
  • application/msword
  • application/msexcel
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.openxmlformats-officedocument.presentationml.presentation

Document attributes

Here are only described the main attributes you will find on your documents. More fields can be set here depending on your organization's configuration.

"documents": [
    {
"tags": ["my_tag"],
"fileType": "application/pdf",
"uniformResourceIdentifier": "https://smedia.alkemics.com/product/document/hash.pdf",
"fileName": "GTIN_L1_s01.pdf",
"documentLanguageList": [
  {
    "documentLanguageCode": {
      "code": "fra",
      "description": "French",
      "label": "French"
    }
  }
],
"contentDescriptionText": [
  {
    "expressedIn": {
      "code": "fra-FR",
      "description": "French",
      "label": "French",
      "normalizedCode": "fr"
    },
    "data": "document fr"
  }
],    
"fileSize": 271169,
"documentTypeCode": {
  "code": "CERTIFICATION",
  "description": "Document which contains a special certification by a third party (e.g. International Food Standard [IFS], QS-Approval Mark for meat product, sausage, fruit, vegetables and potatoes or bio audits).",
  "label": "Certification (assets)"
},
"documentTitleText": [
  {
    "expressedIn": {
      "code": "fra-FR",
      "description": "French",
      "label": "French",
      "normalizedCode": "fr"
    },
    "data": "document"
  }
],
"scope": "public",
"createdAt": "2020-04-09T11:53:33",
"updatedAt": "2020-04-09T11:53:33"
}
]

Recipes

The last type of media asset you can access through our API are recipes.

"enriched_contents": [
    {
      "content": " example", 
      "updatedAt": "2017-02-20T15:30:56.772634", 
      "type": null, 
      "createdAt": "2017-02-17T15:30:56.772487", 
      "title": " example"
    }
  ],

A recipe is an enriched content asset whose type is 'Recipe' (code = 1).

Recipe attributes

  • content : Recipe content stored as a formatted text in the attribute content. Format is done via HTML tags.
  • title : Recipe title. No formatting possible.
  • createdAt : Recipe creation date.
  • updatedAt : The last date the Recipe was modified.
  • type : Identified the enriched content type. Currently only used for recipes (code = 1).

Note on recipes. The title, though mandatory, is not used. Manufacturers are asked to put it into the content field surrounded by an h1 tag for example.


What’s Next