Medipim BE - API V4

Developer documentation

POST /v4/updates/query

(Last updated: 10/10/2024)

Request

Method

POST

URL

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

Headers

Body

  • filter: one of the filters below; filters can be combined using and, or & not. (optional)
  • sorting: one of the sortings below. (optional; default is {"id": "ASC"})
  • page (optional; if none is provided all results are returned)
    • no: page number (zero-based)
    • size: one of 10, 50, 100 or 250 (defaults to 100)
Filter Description Parameters Examples
{"id": ...} Matches news items by Medipim ID. Integer {"id": 1}
{"organization": ...} Matches news items by organization Medipim ID. One or more IDs {"organization": 1} or {"organization": [1, 2]}
{"newsType": ...} Matches news items by type. One or more types;
Possible values: "product", "organization", "public_category", "brand".
{"newsType": "product"} or {"newsType": ["product", "organization"]}
{"createdAt": ...} Matches news items created since the given time. Unix timestamp. {"createdAt": 1471525605} or {"createdAt": {"from": 1471525605, "until": 1571525605}}
{"updatedSince": ...} Matches news items updated since the given time. Unix timestamp. {"updatedSince": 1471525605} or {"updatedSince": {"from": 1471525605, "until": 1571525605}}
{"locale": ...} Matches news items by locale. One or more locales {"locale": "nl"} or {"locale": ["nl", "fr"]}
{"product": ...} Matches news items by product. One or more Medipim product IDs {"product": "M848B34220"} or {"product": ["M848B34220", "M6B507174C"]}
{"publicCategory": ...} Matches news items by public category. One or more Medipim public category IDs {"publicCategory": "1"} or {"publicCategory": ["1", "2"]}
{"brand": ...} Matches news items by brand. One or more Medipim brand IDs {"brand": "1"} or {"brand": ["1", "2"]}
{"targetGroup": ...} Matches news items by target group. One or more target groups {"targetGroup": "public"} or {"targetGroup": ["public", "pharmacist"]}
{"and": [...]} Matches news items that match all of the given filters. A list of filters. {"and": [{"organization": 1}, {"newsType": "product"}]}
{"or": [...]} Matches news items that match any of the given filters. A list of filters. {"or": [{"organization": 1}, {"newsType": "product"}]}
{"not": ...} Matches news items that do not match the given filter. A filter. {"not": {"newsType": "product"}}
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"}
{"sortOrder": ...} Sort by Medipim sort order "ASC" or "DESC" {"sortOrder": "ASC"} or {"sortOrder": "DESC"}

Response

Body

  • meta
    • total: total number of news items (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[]
    • id: Medipim ID of the news item (integer, unique)
    • type: Type of the news item (string)
    • organization: Medipim ID of the organization that created the news item (integer)
    • title.{...}: Title of the news item (string, localized)
    • content[]:
      • shortDescription.{...}: Short description for the news item (string, localized)
      • description.{...}: Long description for the news item (string, localized)
      • media[]: List of media files associated with the news item
        • url: Url for the media file (string)
        • type: Type for the media file (string)
    • locales[]: Languages for which the news item is suitable. (string[])
    • meta:
      • createdAt: When the news item was created on Medipim (unix timestamp)
      • updatedAt: when the news item information was last updated (unix timestamp)

Depending on the type the following values are also present in the body

Notice

The meta page section will only be returned if you added a page in the request body.