/v4/media/query
(Last updated: 03/10/2023)
Request
Method
POST
URL
https://api.medipim.fr/v4/media/query
Headers
Body
filter
: one of the filters below; filters can be combined usingand
,or
¬
. (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" or "link" . |
{"type": "photo"} |
{"photoType": ...} |
Matches media by photo type. | Photo type Possible values: "packshot" , "productshot" , "pillshot" or "lifestyle_image" . |
{"photoType": "packshot"} |
{"linkType": ...} |
Matches media by link type. | Link type Possible values: "app" ,"brochure" ,"video" or "website" . |
{"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": "fr"} or {"locale": ["fr", "en"]} |
{"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 mediamediaItem
:id
: Medipim ID (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
: Media item metadatacreatedAt
: When the media item was added to Medipim. (unix timestamp)updatedAt
: The last time the media item was modified. (unix timestamp)
For photos
photoType
: Type of photo ("packshot"
,"productshot"
,"pillshot"
or"lifestyle_image"
)formats[]
: List of available image formatshuge
: Media url for the huge image format of the photo (string)large
: Media url for the large image format of the photo (string)medium
: Media url for the medium image format of the photo (string)- ...
visibleSides
: Visible sides of the subject. ("front"
,"left"
,"right"
,"back"
,"top"
,"bottom"
)
For frontals
formats[]
: List of available image formats
For links
linkType
: Link type. ("app"
,"brochure"
,"video"
or"website"
)url
: Url for the link (string)name.{fr|en|...}
: Name of the link (string, localized)description.{fr|en|...}
: 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)