Medipim BE - API V4

Developer documentation

POST /v4/media/query

(Last updated: 04/11/2024)

Request

Method

POST

URL

https://api.medipim.be/v4/media/query

Headers

Body

  • filter: one of the filters below; filters can be combined using and, or & not. (required)
  • sorting: one of the sortings below. (required)
  • page (required)
    • no: page number (zero-based)
    • size: one of 10, 50, 100 or 250 (defaults to 100)
Filter Description Parameters Examples
{"published": ...} Matches media by published state. Boolean {"published": true}
{"organization": ...} Matches media by organization. Medipim organization ID {"organization": "1"}
{"targetGroup": ...} Matches media by target group(s). One or more target groups {"targetGroup": "doctor"} or {"targetGroup": ["pharmacist", "doctor"]}
{"type": ...} Matches media by type. Media type
Possible values: "photo", "frontal", "link".
{"type": "photo"}
{"photoType": ...} Matches media by photo type. Photo type. {"photoType": "packshot"}
{"linkType": ...} Matches media by link type. Link type. {"linkType": "brochure"}
{"createdAt": ...} Matches media created since the given time. Unix timestamp. {"createdAt": 1471525605} or {"createdAt": {"from": 1471525605, "until": 1571525605}}
{"updatedSince": ...} Matches media updated since the given time. Unix timestamp. {"updatedSince": 1471525605} or {"updatedSince": {"from": 1471525605, "until": 1571525605}}
{"product": ...} Matches media by product. Medipim product ID. {"product": "M5489B0D8B"}
{"available": ...} Matches media by availability. Boolean {"available": true}
{"locale": ...} Matches media by locale. One or more locales {"locale": "en"} or {"locale": ["en", "fr"]}
{"and": [...]} Matches media that match all of the given filters. A list of filters. {"and": [{"published": true}, {"type": "photo"}]}
{"or": [...]} Matches media that match any of the given filters. A list of filters. {"or": [{"type": "photo"}, {"type": "frontal"}]}
{"not": ...} Matches media that do not match the given filter. A filter. {"not": {"type": "photo"}}
Sorting Description Parameters Examples
{"id": ...} Sort by Medipim ID "ASC" or "DESC" {"id": "ASC"} or {"id": "DESC"}
{"createdAt": ...} Sort by created time "ASC" or "DESC" {"createdAt": "ASC"} or {"createdAt": "DESC"}
{"touchedAt": ...} Sort by last updated time "ASC" or "DESC" {"touchedAt": "ASC"} or {"touchedAt": "DESC"}

Response

Body

  • meta:
    • total: total results across all pages. (The maximum number is limited to 10000; use the stream endpoint to get all results) (integer)
    • page:
      • no: page number (zero-based) (integer)
      • offset: offset of the first item in the entire resultset (integer)
      • size: size of the page (integer)
  • results[]: a list of all media
    • mediaItem
      • id: Medipim ID of the media item (integer, unique)
      • type: Type of media ("photo" or "link")
      • locales[]: List of languages for which this media is suited. (string[])
      • targetGroups[]: List of target groups for which this media is suited. (string[])
      • meta:
        • createdAt: When the brand was created on Medipim (unix timestamp)
        • updatedAt: when the brand information was last updated (unix timestamp)

      For photos

      • photoType: Type of the photo (string)
      • formats[]: List of available image formats
        • huge: Media url for the huge image format of the photo. 1500x1500 pixels. (string)
        • large: Media url for the large image format of the photo. 900x900 pixels. (string)
        • medium: Media url for the medium image format of the photo. 450x450 pixels. (string)
        • ...
      • visibleSides: Visible sides of the subject (string)

      For frontals

      • formats[]: List of available image formats
        • ...

      For links

      • linkType: Link type (string)
      • url: Url for the link (string)
      • name.{...}: Name of the link (string, localized)
      • description.{...}: Description of the link (string, localized)
      • available:
        • from: When the media is available. (unix timestamp)
        • until: The last time the media is available. (unix timestamp)

Examples