How to get media files
  • 29 Jun 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

How to get media files

  • Dark
    Light

Article summary

Media like images, videos, documents are organized in the media property of products.

This article describes how you can request them.

You start with a query like this:

query q1 {
  productsearch {
    content {
      id
      media {
        url
        mimeType
        purpose
	descriptions
        sortingOrder
      }
    }
  }
}
  • url and
  • mimeType should be self explaining,
  • descriptions is an array, containing string values that describe the image, usually, it only contains one description.
  • sortingOrder can be used to display the documents in the intended order in a frontend.
  • The purpose is a code, that describes what kind of media file it is. This is the full list:
Purpose CodePurpose
picProduct pictures
ipiimage picture (Milieubild)
ppipackaged product image
sdssafety datasheet
brcprospect
envenvironmental declaration
ldrline drawing
dopdeclaration of performance
iniinstallation instruction
pdsproduct datasheet
cemCE mark
papproduct approval
manmanual
carcare instruction (Pflegeanleitung)
elaenergy label (Energieklasse)
prvpromotional video
invinstallation video
3do3D object
2do2D object

Was this article helpful?