openapi: 3.1.0
info:
  title: Medipim Web API - OpenAPI 3.1
  description: |-
    Here, you will find all the necessary information to interact with our
    platform programmatically using the web API. Our API allows developers to access and manipulate various resources on our internal network, such as products, media and leaflets.
  version: 1.0.0
  license:
    name: Commercial
    url: https://www.medipim.com/world/sales-conditions
servers:
  - url: https://api.au.medipim.com/v4
    description: Production server
  - url: https://api.sandbox.au.medipim.com/v4
    description: Sandbox server
security:
  - basicAuth: []
tags:
  - name: Products
    description: Products describe the specific goods you offer to your customers.
  - name: Media Items
    description: Media items are images or documents that are associated with a product.
  - name: Leaflets
    description: Leaflets are texts that provide legal information about a drug and its use.
  - name: Public Categories
    description: Public categories are classifications that help organize products for easier navigation and discovery by end-users. They are hierarchical and can have parent-child relationships.
  - name: Medipim Categories
    description: Medipim categories are Medipim-managed classifications used to organize products. They are hierarchical and can have parent-child relationships.
  - name: Updates
    description: Updates (also known as news items) are informational items published by organizations. They can be automatic (generated by the platform) or manual (created by organization managers).
  - name: Organizations
    description: Organizations represent customers, suppliers, or other entities in the platform. Use these endpoints to query, find, create organizations and check their subscription status.
  - name: Dietary Restrictions
    description: Dietary restrictions indicate whether a product is suitable for certain diets or contains specific allergens.
  - name: Users
    description: Users represent individual accounts on the Medipim platform that belong to an organization.
  - name: Corrections
    description: Corrections are feedback requests on product data, such as missing photos, wrong descriptions, or other data issues.
  - name: Brands
    description: Brands represent the manufacturers or labels associated with products in the Medipim platform.
  - name: Colors
    description: Colors that can be associated with products.
externalDocs:
  description: Find out more about Medipim
  url: https://www.medipim.com/
paths:
  /products/query:
    post:
      tags:
        - Products
      summary: Query products with filters and pagination
      description: |-
        Query products using filters, sorting, and pagination. This endpoint supports a maximum of 10,000 results.

        **Filter**: The `filter` object must have exactly one key. It can be a **property filter** (e.g. `id`, `search`, `brand`, `publicCategories`, `medipimCategories`, `organization`, `deleted`, `status`, `productFamilies`, `media`, `attributes`, `dietaryRestrictions`, `colors`, `createdAt`, `touchedAt` / `updatedSince`, `hasContent`, `hasCorrections`, `publicPrice`, `gtin`, `ean`, `activeIngredient`, `atc`) or a **compound filter** (`and`, `or`, `not`). See the `ProductFilter` schema for details. Additional region-specific filters may also be available.

        **Pagination Limit**: This endpoint can only return up to 10,000 products. If your query matches more than 10,000 products:
        - The `total` field in the response will be capped at 10,000
        - The `totalExceedsLimit` field will be set to `true`
        - Use the `/products/stream` endpoint to retrieve all matching products
      operationId: queryProducts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/ProductFilter'
                  description: Filter criteria. Exactly one key. Must be either a single ProductPropertyFilter or a FilterOperator (and, or, not).
                sorting:
                  oneOf:
                    - title: Single sort object
                      $ref: '#/components/schemas/ProductSortOption'
                    - title: Multiple sort objects
                      type: array
                      items:
                        $ref: '#/components/schemas/ProductSortOption'
                      minItems: 1
                  description: Sort order. Either a single sort object or an array of sort objects.
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page. One of 10, 50, 100 or 250 (defaults to 100).
                          examples:
                            - 10
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page. One of 10, 50, 100 or 250 (defaults to 100).
                          examples:
                            - 10
              required:
                - filter
                - sorting
            examples:
              searchQuery:
                summary: Query by search term
                value:
                  filter:
                    search:
                      query: aspirin
                      locale: en
                  sorting:
                    - publicPrice: DESC
                    - name:
                        direction: ASC
                        locale: en
                  page:
                    'no': 0
                    size: 100
              minimumContent:
                summary: Products with image, description and public category
                value:
                  filter:
                    minimumContent: true
                  sorting:
                    - id: ASC
                  page:
                    'no': 0
                    size: 100
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedProductResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '422':
          description: Validation error (e.g., pagination limit exceeded)
  /products/stream:
    post:
      tags:
        - Products
      summary: Stream all products matching a filter
      description: |-
        Stream products using filters and sorting. Unlike `/products/query`, this endpoint has no result limit and returns all matching products.

        **When to use**: Use this endpoint when:
        - Your query matches more than 10,000 products
        - The `/products/query` endpoint returns `totalExceedsLimit: true`
        - You need to retrieve all matching products regardless of count

        The response is streamed as newline-delimited JSON (NDJSON).
      operationId: streamProducts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/ProductFilter'
                  description: Filter criteria. Same structure as `/products/query`.
                sorting:
                  oneOf:
                    - $ref: '#/components/schemas/ProductSortOption'
                    - type: array
                      items:
                        $ref: '#/components/schemas/ProductSortOption'
                      minItems: 1
                  description: Sort order. Same structure as `/products/query` (single sort object or array of sort objects).
                  examples:
                    - id: ASC
      responses:
        '200':
          description: 'Successful operation. The response body is streamed as newline-delimited JSON: one JSON object per line, each containing a `meta` envelope and the full `result` product object.'
          content:
            application/x-json-stream:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of matching products.
                      index:
                        type: integer
                        description: Zero-based index of this result in the stream.
                  result:
                    $ref: '#/components/schemas/Product'
              example:
                meta:
                  total: 2
                  index: 0
                result:
                  id: MB08BC0E93
                  status: active
                  name:
                    nl: Aspirine 100mg Comp 30
                    fr: Aspirine 100mg Comp 30
        '204':
          description: No products match the given filter.
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
  /products/find:
    get:
      tags:
        - Products
      summary: Get a product by ID or unique identifier
      description: |-
        Returns a single product. Pass **exactly one** query parameter to identify the product: either `id` (Medipim product ID) or one of the unique identifier fields listed below. The available identifier fields depend on your region.

        > **At least one parameter is required.** If no parameter is provided, the API responds with `422 Unprocessable Entity`. Providing more than one parameter is also invalid.
      operationId: findProduct
      parameters:
        - $ref: '#/components/parameters/ProductFindById'
        - $ref: '#/components/parameters/ProductFindByEanGtin8'
        - $ref: '#/components/parameters/ProductFindByEanGtin12'
        - $ref: '#/components/parameters/ProductFindByEanGtin13'
        - $ref: '#/components/parameters/ProductFindByEanGtin14'
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          description: Validation error (e.g. missing identifier).
  /products/embed:
    get:
      tags:
        - Products
      summary: Embed a product page
      description: |-
        Returns an HTML page presenting product information, suitable for embedding in a webpage or app via an iframe.

        **Authentication**: This endpoint supports two authentication methods:
        1. **HTTP Basic auth** — pass the `Authorization` header as with other endpoints.
        2. **Signed URL (MAC)** — useful when embedding in a frontend where HTTP headers cannot be set. Pass `key`, `t`, and `mac` query parameters instead of the `Authorization` header.

        > **Tip**: The `/products/find` and `/products/query` responses include a pre-signed embed URL in `meta.embedUrl`. This is the easiest way to get a working embed URL.

        **Generating a signed URL manually**:
        ```
        $message = "embed:" . $productId . ":" . $unixTimestamp;
        $mac = hash_hmac("sha256", $message, $apiSecretKey);
        ```
        Then append `?id={productId}&t={timestamp}&key={apiKeyId}&mac={mac}` to the endpoint URL.
      operationId: embedProduct
      parameters:
        - $ref: '#/components/parameters/ProductFindById'
        - $ref: '#/components/parameters/ProductFindByEanGtin8'
        - $ref: '#/components/parameters/ProductFindByEanGtin12'
        - $ref: '#/components/parameters/ProductFindByEanGtin13'
        - $ref: '#/components/parameters/ProductFindByEanGtin14'
        - name: locale
          in: query
          schema:
            $ref: '#/components/schemas/ContentLocale'
          description: Language in which the product page should be displayed. Defaults to the primary language of the platform.
        - name: key
          in: query
          schema:
            type: string
          description: API key ID (required for signed URL authentication, omit when using HTTP Basic auth).
        - name: t
          in: query
          schema:
            type: integer
            format: unix-time
          description: Unix timestamp used when generating the MAC (required for signed URL authentication).
        - name: mac
          in: query
          schema:
            type: string
          description: HMAC-SHA256 message authentication code (required for signed URL authentication).
        - name: print
          in: query
          schema:
            type: string
          description: When present (any value), renders the page in print-friendly layout.
      responses:
        '200':
          description: An HTML page presenting the product information.
          content:
            text/html:
              schema:
                type: string
        '400':
          description: No product identifier provided.
        '401':
          description: Authentication failed (invalid credentials or MAC).
        '404':
          description: Product not found.
  /products/create:
    post:
      tags:
        - Products
      summary: Create a product
      description: |-
        Create a new product. The request body must include a `product` object with field values.
        Optionally include `organizations` (array of organization IDs) to assign the product to organizations.
      operationId: createProduct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product
              properties:
                product:
                  type: object
                  description: |-
                    Product field values. The available fields depend on your platform's product fields
                    configuration. Common fields include `name` (localized string), `cnk`, and `ean`.
                organizations:
                  type: array
                  items:
                    type: string
                    examples:
                      - - 1
                  description: Organization IDs to assign the product to.
            example:
              product:
                name:
                  nl: Paracetamol 500mg
                  fr: Paracétamol 500mg
      responses:
        '200':
          description: Successful operation. Returns the created product.
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /products/update:
    post:
      tags:
        - Products
      summary: Update a product
      description: |-
        Update an existing product. Identify the product by `id` (Medipim product ID) or `product` (unique identifier).
        The `data` object contains the field values to update.
        Optionally include `organizations` to update organization assignments.
      operationId: updateProduct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                id:
                  type: string
                  pattern: ^M[0-9A-Z]{9}$
                  description: Product ID in Medipim format (M + 9 alphanumeric characters). Use this or `product` to identify the product.
                product:
                  type: object
                  description: Unique identifier key-value to find the product (e.g. ean, productCode). Use this or `id`.
                data:
                  type: object
                  description: Product field values to update (structure depends on product fields configuration).
                organizations:
                  type: array
                  items:
                    type: string
                  description: Optional array of organization IDs.
      responses:
        '200':
          description: Successful operation. Returns the updated product.
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /products/get-fields:
    get:
      tags:
        - Products
      summary: Get product field definitions
      description: |-
        Returns the list of product data fields available for the authenticated user.
        Use this to discover which fields can be used in product create/update requests and what types they expect.
      operationId: getProductFields
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  fields:
                    type: array
                    description: List of product field definitions.
                    items:
                      type: object
                      required:
                        - code
                        - type
                        - isMulti
                        - isLocalized
                        - allowedToUpdate
                      properties:
                        code:
                          type: string
                          description: Field code used in product create/update payloads.
                        type:
                          type: string
                          enum:
                            - string
                            - boolean
                            - integer
                            - float
                            - array
                          description: Data type of the field value.
                        attributeGroup:
                          type:
                            - string
                            - 'null'
                          description: Attribute group this field belongs to, if any.
                        isMulti:
                          type: boolean
                          description: Whether the field accepts multiple values.
                        isLocalized:
                          type: boolean
                          description: Whether the field value is localized (keyed by locale).
                        allowedToUpdate:
                          type: boolean
                          description: Whether the authenticated user is allowed to update this field.
              example:
                fields:
                  - code: name
                    type: string
                    attributeGroup: null
                    isMulti: false
                    isLocalized: true
                    allowedToUpdate: true
                  - code: cnk
                    type: string
                    attributeGroup: null
                    isMulti: false
                    isLocalized: false
                    allowedToUpdate: false
                  - code: ean
                    type: string
                    attributeGroup: null
                    isMulti: true
                    isLocalized: false
                    allowedToUpdate: true
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /products/add-media:
    post:
      tags:
        - Products
      summary: Add a media item to a product
      description: |-
        Link an existing media item to a product. The product can be identified in two ways:

        - **`id`** — the Medipim product ID (e.g. `"M123456789"`).
        - **`product`** — either a Medipim product ID string, or an object with a single unique identifier
          field as key (e.g. `{"cnk": "1234567"}`). See the
          [field glossary](https://platform.medipim.be/docs/api/v4/endpoints/products/field-glossary.html#product-identifiers)
          for available identifier fields.

        Exactly one of `id` or `product` must be provided.
      operationId: addProductMedia
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - media
              properties:
                product:
                  oneOf:
                    - type: string
                      description: Medipim product ID as a string.
                      examples:
                        - MB08BC0E93
                    - type: object
                      description: |-
                        Object with a single key-value pair where the key is a unique identifier field
                        name and the value is the identifier value.
                      additionalProperties:
                        type: string
                      maxProperties: 1
                      minProperties: 1
                  description: Product identifier. Use this or `id`.
                media:
                  type: integer
                  description: Media item ID to link to the product.
            examples:
              withMedipimId:
                summary: Identify product by Medipim ID
                value:
                  id: M123456789
                  media: 42
              withUniqueIdentifier:
                summary: Identify product by unique identifier field
                value:
                  product:
                    cnk: '1234567'
                  media: 42
      responses:
        '200':
          description: Successful operation. Returns the product with the media item linked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Product not found.
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /products/remove-media:
    post:
      tags:
        - Products
      summary: Remove a media item from a product
      description: Disassociate a media item from a product. Identify the product by `id` or `product` (unique identifier).
      operationId: removeProductMedia
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - media
              properties:
                id:
                  type: string
                  pattern: ^M[0-9A-Z]{9}$
                  description: Product ID in Medipim format (M + 9 alphanumeric characters). Use this or `product` to identify the product.
                product:
                  type: object
                  description: Unique identifier key-value to find the product. Use this or `id`.
                media:
                  type: integer
                  description: Media item ID to remove from the product.
      responses:
        '200':
          description: Successful operation. Returns the product with updated media.
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /product/descriptions/create:
    post:
      tags:
        - Products
      summary: Create a product description
      description: |-
        Create a new description for a product. The product is identified by its Medipim product ID
        or a unique identifier field.
      operationId: createProductDescription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product
                - description
              properties:
                product:
                  oneOf:
                    - type: string
                      description: Medipim product ID.
                      examples:
                        - MB08BC0E93
                    - type: object
                      description: |-
                        Object with a single key-value pair where the key is a unique identifier field
                        name and the value is the identifier value.
                      additionalProperties:
                        type: string
                      maxProperties: 1
                      minProperties: 1
                  description: Product identifier (Medipim ID or unique identifier object).
                description:
                  type: object
                  required:
                    - targetGroups
                    - locales
                    - type
                    - content
                  properties:
                    targetGroups:
                      type: array
                      items:
                        type: string
                        enum:
                          - public
                          - pharmacist
                          - doctor
                          - homecare
                          - hospital
                          - nurse
                          - physiotherapist
                          - webshop
                      description: List of target groups this description is intended for.
                    locales:
                      type: array
                      items:
                        $ref: '#/components/schemas/ContentLocale'
                      description: List of locales the description applies to.
                    type:
                      type: string
                      enum:
                        - full_description
                        - faq
                        - measurements
                        - legal_text
                        - indication
                        - contra_indication
                        - usage
                        - usage_extended
                        - composition
                        - properties
                        - side_effects
                        - nutritional_value
                        - usage_type
                        - pregnancy_description
                        - pregnancy_description_extended
                        - breastfeeding_description
                        - breastfeeding_description_extended
                        - interactions
                        - warnings
                        - keywords
                      description: Description type.
                    content:
                      type: object
                      additionalProperties:
                        type: string
                      description: Localized content keyed by locale. HTML is allowed but restricted to a safe subset of tags.
                      examples:
                        - en: Product description
            example:
              product: MB08BC0E93
              description:
                targetGroups:
                  - public
                  - hospital
                locales:
                  - en
                type: full_description
                content:
                  en: Product description
      responses:
        '200':
          description: Successful operation. Returns the created description.
          content:
            application/json:
              schema:
                type: object
                properties:
                  description:
                    $ref: '#/components/schemas/ProductDescription'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /product/descriptions/update:
    post:
      tags:
        - Products
      summary: Update a product description
      description: |-
        Update an existing description of a product. The product is identified by its Medipim product ID
        or a unique identifier field. The description is identified by its Medipim description ID.
      operationId: updateProductDescription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product
                - id
                - description
              properties:
                product:
                  oneOf:
                    - type: string
                      description: Medipim product ID.
                      examples:
                        - MB08BC0E93
                    - type: object
                      description: |-
                        Object with a single key-value pair where the key is a unique identifier field
                        name and the value is the identifier value.
                      additionalProperties:
                        type: string
                      maxProperties: 1
                      minProperties: 1
                  description: Product identifier (Medipim ID or unique identifier object).
                id:
                  type: integer
                  description: Medipim description ID.
                description:
                  type: object
                  required:
                    - targetGroups
                    - locales
                    - type
                    - content
                  properties:
                    targetGroups:
                      type: array
                      items:
                        type: string
                        enum:
                          - public
                          - pharmacist
                          - doctor
                          - homecare
                          - hospital
                          - nurse
                          - physiotherapist
                          - webshop
                      description: List of target groups this description is intended for.
                    locales:
                      type: array
                      items:
                        $ref: '#/components/schemas/ContentLocale'
                      description: List of locales the description applies to.
                    type:
                      type: string
                      enum:
                        - full_description
                        - faq
                        - measurements
                        - legal_text
                        - indication
                        - contra_indication
                        - usage
                        - usage_extended
                        - composition
                        - properties
                        - side_effects
                        - nutritional_value
                        - usage_type
                        - pregnancy_description
                        - pregnancy_description_extended
                        - breastfeeding_description
                        - breastfeeding_description_extended
                        - interactions
                        - warnings
                        - keywords
                      description: Description type.
                    content:
                      type: object
                      additionalProperties:
                        type: string
                      description: Localized content keyed by locale. HTML is allowed but restricted to a safe subset of tags.
            example:
              product: MB08BC0E93
              id: 123
              description:
                targetGroups:
                  - public
                locales:
                  - en
                type: full_description
                content:
                  en: Updated description
      responses:
        '200':
          description: Successful operation. Returns the updated description.
          content:
            application/json:
              schema:
                type: object
                properties:
                  description:
                    $ref: '#/components/schemas/ProductDescription'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /product/descriptions/delete:
    post:
      tags:
        - Products
      summary: Delete a product description
      description: |-
        Remove an existing description from a product. The product is identified by its Medipim product ID
        or a unique identifier field. The description is identified by its Medipim description ID.
      operationId: deleteProductDescription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product
                - id
              properties:
                product:
                  oneOf:
                    - type: string
                      description: Medipim product ID.
                      examples:
                        - MB08BC0E93
                    - type: object
                      description: |-
                        Object with a single key-value pair where the key is a unique identifier field
                        name and the value is the identifier value.
                      additionalProperties:
                        type: string
                      maxProperties: 1
                      minProperties: 1
                  description: Product identifier (Medipim ID or unique identifier object).
                id:
                  type: integer
                  description: Medipim description ID.
            example:
              product: MB08BC0E93
              id: 123
      responses:
        '204':
          description: Description successfully deleted (no content).
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /product/attributes/query:
    post:
      tags:
        - Products
      summary: Query product attributes (deprecated)
      deprecated: true
      description: |-
        **Deprecated** — this endpoint always returns an empty result set.

        Product attributes have been removed and replaced with specific fields on the product:
        - `color` → `colors` field
        - `dietary_restrictions` → `dietaryRestrictions` field
        - `galenic_shape` → `galenicShapes` field

        Use `/products/query` with the appropriate field filters instead.
      operationId: queryProductAttributes
      responses:
        '200':
          description: Always returns an empty result set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 0
                  results:
                    type: array
                    items: {}
                    maxItems: 0
              example:
                meta:
                  total: 0
                results: []
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
  /product/attributes/find:
    get:
      tags:
        - Products
      summary: Find a product attribute (deprecated)
      deprecated: true
      description: |-
        **Deprecated** — this endpoint always returns `404 Not Found`.

        Product attributes have been removed and replaced with specific fields on the product:
        - `color` → `colors` field
        - `dietary_restrictions` → `dietaryRestrictions` field
        - `galenic_shape` → `galenicShapes` field
      operationId: findProductAttribute
      responses:
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          description: Always returns not found.
  /product/attribute/options/query:
    post:
      tags:
        - Products
      summary: Query product attribute options (deprecated)
      deprecated: true
      description: |-
        **Deprecated** — this endpoint always returns an empty result set.

        Product attributes have been removed and replaced with specific fields on the product:
        - `color` → `colors` field
        - `dietary_restrictions` → `dietaryRestrictions` field
        - `galenic_shape` → `galenicShapes` field

        Use `/products/query` with the appropriate field filters instead.
      operationId: queryProductAttributeOptions
      responses:
        '200':
          description: Always returns an empty result set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 0
                  results:
                    type: array
                    items: {}
                    maxItems: 0
              example:
                meta:
                  total: 0
                results: []
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
  /product/attribute/options/find:
    get:
      tags:
        - Products
      summary: Find a product attribute option (deprecated)
      deprecated: true
      description: |-
        **Deprecated** — this endpoint always returns `404 Not Found`.

        Product attributes have been removed and replaced with specific fields on the product:
        - `color` → `colors` field
        - `dietary_restrictions` → `dietaryRestrictions` field
        - `galenic_shape` → `galenicShapes` field
      operationId: findProductAttributeOption
      responses:
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          description: Always returns not found.
  /media/find:
    get:
      tags:
        - Media Items
      summary: Get a media item by ID
      operationId: findMediaItem
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
            format: uuid
          description: Media item ID (UUID).
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mediaItem:
                    $ref: '#/components/schemas/MediaItem'
        '400':
          description: Bad request (e.g. missing id).
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Media item not found
  /media/query:
    post:
      tags:
        - Media Items
      summary: Query media items with filters and pagination
      operationId: queryMediaItems
      parameters:
        - name: compact
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          description: If true, return compact media item representation.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - filter
              properties:
                filter:
                  $ref: '#/components/schemas/MediaFilter'
                sorting:
                  description: Sort order. Either a single sort object or an array of sort objects.
                  oneOf:
                    - title: Single sort object
                      $ref: '#/components/schemas/MediaSortOption'
                    - title: Multiple sort objects
                      type: array
                      items:
                        $ref: '#/components/schemas/MediaSortOption'
                      minItems: 1
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (0-based).
                        size:
                          type: integer
                          description: Page size.
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (0-based).
                        size:
                          type: integer
                          description: Page size.
            example:
              filter:
                and:
                  - product: MEE370408E
                  - photoType: packshot
                  - type: photo
              sorting:
                name:
                  direction: ASC
                  locale: en
              page:
                'no': 0
                size: 10
      responses:
        '200':
          description: Successful operation. Returns a paginated list of media items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                      totalExceedsLimit:
                        type: boolean
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/MediaItem'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /media/update:
    post:
      tags:
        - Media Items
      summary: Update a media item
      description: |-
        Update an existing media item. Identify by `id` or `mediaItem` (UUID).
        Optionally provide `products` (array of product IDs) to update product associations.
      operationId: updateMediaItem
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Media item ID. Use this or `mediaItem`.
                mediaItem:
                  type: string
                  format: uuid
                  description: Media item ID. Use this or `id`.
                products:
                  type: array
                  items:
                    type: string
                  description: Optional array of product IDs to associate.
      responses:
        '200':
          description: Successful operation. Returns the updated media item.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mediaItem:
                    $ref: '#/components/schemas/MediaItem'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /media/create-link:
    post:
      tags:
        - Media Items
      summary: Create a link media item
      description: |-
        Create a new link-type media item. Provide `data` with media field values.
        Optionally include `organizations` and `products` to assign.
      operationId: createLinkMediaItem
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  description: Media field values (structure depends on media fields configuration).
                organizations:
                  type: array
                  items:
                    type: string
                  description: Optional organization IDs.
                products:
                  type: array
                  items:
                    type: string
                  description: Optional product IDs to associate.
      responses:
        '200':
          description: Successful operation. Returns the created media item.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mediaItem:
                    $ref: '#/components/schemas/MediaItem'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /media/upload:
    post:
      tags:
        - Media Items
      summary: Upload a media file
      description: |-
        Upload a file to create a new media item. Send as multipart/form-data with `file`, or JSON with base64-encoded `file`.
        Optionally include `products` (array of product IDs) and `central` (boolean).

        **Accepted file types:**
        - **JPEG** (`.jpg`, `.jpeg`) — minimum 1500×1500 pixels, must be square.
        - **PNG** (`.png`) — opaque PNGs must be minimum 1500×1500 pixels and square. PNGs with transparency have no dimension restrictions.
        - **PDF** (`.pdf`) — uploaded as a link/brochure media item (no dimension restrictions).

        Other file types are rejected with a validation error.

        :::warning[Requires organization manager role]

        This endpoint requires the `media.create` permission, which is only available to users with the **organization manager** role or higher. Users with roles such as *software developer* or *medical professional* cannot upload media.

        :::
      operationId: uploadMediaItem
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: byte
                  description: Base64-encoded file content (alternative to multipart).
                products:
                  type: array
                  items:
                    type: string
                  description: Optional. A list of product IDs that the uploaded media item will be linked to. Each product in the list will have this media item added to its gallery.
                central:
                  type: boolean
                  description: Optional. When `true`, the image is stored in Medipim's central media library, allowing it to be shared and synchronized across multiple platform regions (e.g. Belgium, France, Germany). Defaults to `false`, which stores the image only in the current region. This feature may not be available for all accounts.
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  contentMediaType: image/jpeg, image/png, application/pdf
                  description: The file to upload. Accepted types are JPEG, PNG (images) and PDF (brochures).
                products:
                  type: array
                  items:
                    type: string
                  description: Optional. A list of product IDs that the uploaded media item will be linked to. Each product in the list will have this media item added to its gallery.
                central:
                  type: boolean
                  description: Optional. When `true`, the image is stored in Medipim's central media library, allowing it to be shared and synchronized across multiple platform regions (e.g. Belgium, France, Germany). Defaults to `false`, which stores the image only in the current region. This feature may not be available for all accounts.
      responses:
        '200':
          description: Successful operation. Returns the created media item.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mediaItem:
                    $ref: '#/components/schemas/MediaItem'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /media/get-fields:
    get:
      tags:
        - Media Items
      summary: Get media field definitions
      description: Returns the list of media data fields available for the authenticated user.
      operationId: getMediaFields
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  fields:
                    type: array
                    items:
                      type: object
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /media/stream:
    post:
      tags:
        - Media Items
      summary: Stream all media items matching a filter
      description: Returns all matching media items as newline-delimited JSON (NDJSON). No pagination limit.
      operationId: streamMediaItems
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/MediaFilter'
                sorting:
                  description: Sort order. Either a single sort object or an array of sort objects.
                  oneOf:
                    - title: Single sort object
                      $ref: '#/components/schemas/MediaSortOption'
                    - title: Multiple sort objects
                      type: array
                      items:
                        $ref: '#/components/schemas/MediaSortOption'
                      minItems: 1
      responses:
        '200':
          description: Successful operation. Stream of JSON objects (one per line).
          content:
            application/x-json-stream:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                      index:
                        type: integer
                  result:
                    $ref: '#/components/schemas/MediaItem'
        '204':
          description: No content (no matching media items).
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /media/publish:
    post:
      tags:
        - Media Items
      summary: Publish a media item
      description: |-
        Publishes a media item, making it visible to all users who have access to query media
        (including read-only roles such as software developers and medical professionals).
        Unpublished media items are only visible to users who can manage media.

        Newly uploaded media items are not published by default. Use this endpoint to make
        them available to a wider audience.

        :::warning[Requires organization manager role]

        Only users with the **organization manager** role or higher can publish media items.
        Organization managers can only publish media owned by their organization.

        :::
      operationId: publishMediaItem
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Media item ID. Use this or `mediaItem`.
                mediaItem:
                  type: string
                  format: uuid
                  description: Media item ID. Use this or `id`.
      responses:
        '200':
          description: Successful operation. Returns the published media item.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mediaItem:
                    $ref: '#/components/schemas/MediaItem'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /media/unpublish:
    post:
      tags:
        - Media Items
      summary: Unpublish a media item
      description: |-
        Marks a media item as manually unpublished. Unpublished media items are no longer visible
        to users with read-only roles (such as software developers and medical professionals).

        :::warning[Requires organization manager role]

        Only users with the **organization manager** role or higher can unpublish media items.
        Organization managers can only unpublish media owned by their organization, and cannot
        unpublish frontal images that are already published.

        :::
      operationId: unpublishMediaItem
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Media item ID. Use this or `mediaItem`.
                mediaItem:
                  type: string
                  format: uuid
                  description: Media item ID. Use this or `id`.
      responses:
        '200':
          description: Successful operation. Returns the unpublished media item.
          content:
            application/json:
              schema:
                type: object
                properties:
                  mediaItem:
                    $ref: '#/components/schemas/MediaItem'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /public-categories/query:
    post:
      tags:
        - Public Categories
      description: Query the public categories assigned to products.
      summary: Query Public Categories
      operationId: queryPublicCategories
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  type: object
              example:
                filter:
                  id: 1
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        examples:
                          - 100
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/PublicCategory'
                required:
                  - meta
                  - results
              example:
                meta:
                  total: 2
                results:
                  - id: 1
                    name:
                      nl: Geneesmiddelen
                      fr: Médicaments
                      en: Medicines
                      de: Arzneimittel
                    parent: null
                    order: 1
                    meta:
                      createdAt: 1625247600
                      updatedAt: 1625334000
                  - id: 2
                    name:
                      nl: Supplementen
                      fr: Suppléments
                      en: Supplements
                      de: Ergänzungen
                    parent: 1
                    order: 2
                    meta:
                      createdAt: 1625247600
                      updatedAt: 1625334000
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /public-categories/tree:
    get:
      tags:
        - Public Categories
      description: Get the hierarchical tree structure of public categories.
      summary: Get Public Categories Tree
      operationId: getPublicCategoriesTree
      parameters:
        - name: filter
          in: query
          description: 'Filter the results. This is a comma separated string of filters. Example: `root:1,depth:2`'
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PublicCategoryTreeCategory'
              examples:
                public-categories-tree:
                  summary: Example category tree
                  value:
                    - id: 1
                      name:
                        nl: Geneesmiddelen
                        fr: Médicaments
                        en: Medicines
                        de: Arzneimittel
                      parent: null
                      order: 1
                      meta:
                        createdAt: 1625247600
                        updatedAt: 1625334000
                      children:
                        - id: 2
                          name:
                            nl: Supplementen
                            fr: Suppléments
                            en: Supplements
                            de: Ergänzungen
                          parent: 1
                          order: 2
                          meta:
                            createdAt: 1625247600
                            updatedAt: 1625334000
                          children: []
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /medipim-categories/query:
    post:
      tags:
        - Medipim Categories
      description: Query the Medipim categories used to classify products.
      summary: Query Medipim categories
      operationId: queryMedipimCategories
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/MedipimCategoryFilter'
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (zero-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Page size. One of 10, 50, 100 or 250. Defaults to 100.
                          enum:
                            - 10
                            - 50
                            - 100
                            - 250
                          examples:
                            - 100
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (zero-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Page size. One of 10, 50, 100 or 250. Defaults to 100.
                          enum:
                            - 10
                            - 50
                            - 100
                            - 250
                          examples:
                            - 100
              example:
                filter:
                  deleted: false
                page:
                  'no': 0
                  size: 50
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        examples:
                          - 100
                      page:
                        type: object
                        description: Only returned when a page was provided in the request.
                        properties:
                          'no':
                            type: integer
                            description: Page number (zero-based).
                            examples:
                              - 0
                          offset:
                            type: integer
                            description: Offset of the first item in the entire result set.
                            examples:
                              - 0
                          size:
                            type: integer
                            description: Size of the page.
                            examples:
                              - 50
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/MedipimCategory'
                required:
                  - meta
                  - results
              example:
                meta:
                  total: 2
                  page:
                    'no': 0
                    offset: 0
                    size: 50
                results:
                  - id: medipimCategory-550e8400-e29b-41d4-a716-446655440000
                    name:
                      nl: Geneesmiddelen
                      fr: Médicaments
                      en: Medicines
                      de: Arzneimittel
                    description:
                      nl: Alle geneesmiddelen
                      fr: Tous les médicaments
                      en: All medicines
                      de: Alle Arzneimittel
                    parent: null
                    order: 1
                  - id: medipimCategory-6ba7b810-9dad-11d1-80b4-00c04fd430c8
                    name:
                      nl: Supplementen
                      fr: Suppléments
                      en: Supplements
                      de: Ergänzungen
                    description:
                      nl: Voedingssupplementen
                      fr: Compléments alimentaires
                      en: Dietary supplements
                      de: Nahrungsergänzungsmittel
                    parent: medipimCategory-550e8400-e29b-41d4-a716-446655440000
                    order: 2
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /medipim-categories/tree:
    get:
      tags:
        - Medipim Categories
      summary: Get Medipim category tree
      description: |-
        Returns all Medipim categories as a nested tree structure. Unlike
        [Query Medipim categories](/openapi/query-medipim-categories), which returns a flat,
        paginated list, this endpoint returns the full hierarchy in a single response with child
        categories nested inside their parents.

        This is useful when you need to render or process the complete category tree without
        having to reconstruct the hierarchy from flat results yourself.

        No filters or pagination are supported — the response always contains every category.
      operationId: getMedipimCategoriesTree
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                description: Top-level categories with their children nested recursively.
                items:
                  $ref: '#/components/schemas/MedipimCategoryTreeNode'
              example:
                - id: medipimCategory-550e8400-e29b-41d4-a716-446655440000
                  name:
                    nl: Geneesmiddelen
                    fr: Médicaments
                    en: Medicines
                    de: Arzneimittel
                  description:
                    nl: Alle geneesmiddelen
                    fr: Tous les médicaments
                    en: All medicines
                    de: Alle Arzneimittel
                  parent: null
                  order: 1
                  type: medicine
                  children:
                    - id: medipimCategory-6ba7b810-9dad-11d1-80b4-00c04fd430c8
                      name:
                        nl: Pijnstillers
                        fr: Analgésiques
                        en: Painkillers
                        de: Schmerzmittel
                      description:
                        nl: Pijnstillende middelen
                        fr: Médicaments analgésiques
                        en: Pain relief medicines
                        de: Schmerzlindernde Medikamente
                      parent: medipimCategory-550e8400-e29b-41d4-a716-446655440000
                      order: 1
                      type: medicine
                      children: []
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /updates/query:
    post:
      tags:
        - Updates
      summary: Query updates
      description: |-
        Search and filter updates (news items). Updates are informational items published by
        organizations — for example, product announcements, company news, or promotional content.

        There are two types of updates:
        - **automatic** — generated by the platform when certain events occur (e.g. a new product is created).
        - **manual** — created by organization managers through the platform UI.

        Manual updates may have associated entities (products, brands, or categories) depending on
        their sub-type.

        ## Filter

        The optional `filter` object supports the following filters:

        - `id` — match by update ID (string).
        - `organization` — match by organization ID (string or array of strings).
        - `type` — match by type: `automatic` or `manual` (string or array of strings).
        - `subType` — match by sub-type: `product`, `organization`, `public_category`, or `brand` (string or array of strings).
        - `locale` — match by locale (string or array of strings).
        - `product` — match by associated product ID (string or array of strings).
        - `publicCategory` — match by associated public category ID (string or array of strings).
        - `brand` — match by associated brand ID (string or array of strings).
        - `targetGroup` — match by target group (string or array of strings).
        - `createdAt` — filter by creation date range, with `from` and/or `until` (unix timestamps).
        - `touchedAt` — filter by last-modified date range, with `from` and/or `until` (unix timestamps).
        - `search` — full-text search with `query` (string) and `locale` (string).
        - `and` — match all of the given filters.
        - `or` — match any of the given filters.
        - `not` — negate a filter.

        ## Sorting

        The optional `sorting` object accepts a single sortable field:

        - `id` — sort by update ID.
        - `createdAt` — sort by creation date.
        - `sortOrder` — sort by the platform's default ordering.

        The value is the sort direction: `asc` or `desc`.

        ## Pagination

        Use the `page` object to paginate results. If omitted, all results are returned.
      operationId: queryUpdates
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  type: object
                  description: Optional filter object. Supports `id`, `organization`, `type`, `subType`, `locale`, `product`, `publicCategory`, `brand`, `targetGroup`, `createdAt`, `touchedAt`, `search`, `and`, `or`, `not`.
                sorting:
                  type: object
                  description: |-
                    Optional sorting object. Pass a single key-value pair where the key is the field
                    name and the value is the direction (`asc` or `desc`).
                  example:
                    createdAt: desc
                page:
                  type: object
                  description: Pagination options. If omitted, all results are returned.
                  properties:
                    'no':
                      type: integer
                      minimum: 0
                      description: Page number (zero-based).
                    size:
                      type: integer
                      enum:
                        - 10
                        - 50
                        - 100
                        - 250
                      description: Number of results per page. Defaults to 100.
            examples:
              allUpdates:
                summary: Fetch all updates
                value: {}
              filterByOrganization:
                summary: Filter by organization
                value:
                  filter:
                    organization: '123'
                  sorting:
                    createdAt: desc
                  page:
                    'no': 0
                    size: 50
              filterManualOnly:
                summary: Filter manual updates only
                value:
                  filter:
                    type: manual
              searchUpdates:
                summary: Full-text search
                value:
                  filter:
                    search:
                      query: new product
                      locale: en
              filterByDateRange:
                summary: Filter by creation date range
                value:
                  filter:
                    createdAt:
                      from: 1700000000
                      until: 1710000000
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      page:
                        type: object
                        properties:
                          'no':
                            type: integer
                            description: Page number (zero-based).
                          offset:
                            type: integer
                            description: Offset of the first item in the entire result set.
                          size:
                            type: integer
                            description: Number of results per page.
                      total:
                        type: integer
                        description: Total number of matching results.
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Update'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /updates/find:
    get:
      tags:
        - Updates
      summary: Find update
      deprecated: true
      description: |-
        Find a single update by ID.

        :::warning[Deprecated]

        This endpoint is deprecated. Use [Find manual update](/openapi/find-manual-update) or
        [Find automatic update](/openapi/find-automatic-update) instead.

        :::
      operationId: findUpdate
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
          description: The update ID.
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - automatic
              - manual
            default: automatic
          description: The type of update to look up. Defaults to `automatic` if not specified.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  newsItem:
                    $ref: '#/components/schemas/Update'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Update not found.
  /updates/manual/find:
    get:
      tags:
        - Updates
      summary: Find manual update
      description: |-
        Find a single manual update by ID. Manual updates are created by organization managers
        through the platform.
      operationId: findManualUpdate
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
          description: The update ID.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  newsItem:
                    $ref: '#/components/schemas/Update'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Update not found.
  /updates/automatic/find:
    get:
      tags:
        - Updates
      summary: Find automatic update
      description: |-
        Find a single automatic update by ID. Automatic updates are generated by the platform
        when certain events occur (e.g. a product is created or modified).
      operationId: findAutomaticUpdate
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
          description: The update ID.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  newsItem:
                    $ref: '#/components/schemas/Update'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Update not found.
  /organizations/query:
    post:
      tags:
        - Organizations
      summary: Query organizations
      description: |-
        Query organizations using filters, sorting, and pagination.

        ## Filter
        The `filter` object must have exactly one key. It can be:
        - A **property filter** (e.g. `id`, `type`, `name`, `search`, `searchName`, `specializations`, `public`, `sysId`, `externalId`, `createdBy`, `resellerId`) with an appropriate value.
        - A **compound filter** with key `and` (value: array of filter objects; all must match) or `or` (value: array of filter objects; at least one must match). Each element in an `and`/`or` array is again a filter object with the same structure.

        ## Sort
        Sort the results by one of the following fields: `id`, `name`, `city`.

        ## Page
        Size must be one of: 10, 50, 100, 250.
      operationId: queryOrganizations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/OrganizationFilter'
                sorting:
                  oneOf:
                    - $ref: '#/components/schemas/OrganizationSortOption'
                    - type: array
                      items:
                        $ref: '#/components/schemas/OrganizationSortOption'
                      minItems: 1
                  description: |-
                    Sort order. Either a single sort object or an array of sort objects.
                    Each object has exactly one key (`id`, `name`, or `city`) with value `ASC` or `DESC`.
                    Examples: `{"name": "ASC"}`, `[{"id": "ASC"}, {"name": "DESC"}]`.
                  examples:
                    - name: ASC
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
      responses:
        '200':
          description: |-
            Successful operation.

            Returns a paginated list of organizations, sorted by id in ascending order by default.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOrganizationResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /organizations/find:
    get:
      tags:
        - Organizations
      summary: Get an organization by ID
      operationId: findOrganization
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
          description: Organization ID.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization:
                    $ref: '#/components/schemas/Organization'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Organization not found
  /organizations/create:
    post:
      tags:
        - Organizations
      summary: Create an organization
      description: |-
        Create a new organization. Requires a `profile` object with at least the `name` key.
        Optional `resellerId` and `settings` (isPublic, displayLogoOnApi).
        Profile may include type, externalId, holdingName, address, zipCode, region, city, country, phone, url.
      operationId: createOrganization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - profile
              properties:
                resellerId:
                  type: string
                  description: Reseller organization ID.
                settings:
                  type: object
                  properties:
                    isPublic:
                      type: boolean
                      default: true
                    displayLogoOnApi:
                      type: boolean
                      default: false
                profile:
                  type: object
                  required:
                    - name
                  properties:
                    name:
                      type: string
                    type:
                      type: string
                    externalId:
                      type: string
                    holdingName:
                      type: string
                    address:
                      type: string
                    zipCode:
                      type: string
                    region:
                      type: string
                    city:
                      type: string
                    country:
                      type: string
                    phone:
                      type: string
                    url:
                      type: string
            example:
              profile:
                name: Example Organization
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization:
                    $ref: '#/components/schemas/Organization'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /organizations/check/subscription:
    post:
      tags:
        - Organizations
      summary: List active subscriptions for organizations
      description: |-
        Returns subscriptions and API keys for organizations matching the given filter.
        The `filter` object has the same structure as for `/organizations/query`: exactly one key, either a property filter (id, type, name, etc.) or a compound filter (`and` or `or` with an array of filter objects).
        Response includes organization id, name, active subscriptions, and API keys.
      operationId: checkOrganizationsSubscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - filter
              properties:
                filter:
                  $ref: '#/components/schemas/OrganizationFilter'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSubscriptionData'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /brands/query:
    post:
      tags:
        - Brands
      summary: Query brands
      description: |-
        Query brands using filters, sorting, and pagination. Brands represent manufacturers or labels associated with products.

        ## Filter
        The `filter` object must have exactly one key. It can be:
        - A **property filter**, such as `search` (a string, to search for in brand name), `id` or `in` (an integer or array of integers, that represent brand IDs), `assignable` (boolean, brands assignable to your organization), `deleted` (boolean, include/exclude soft-deleted brands).
        - A **compound filter** with key `and` (array of filter objects; all must match), `or` (array of filter objects; at least one must match), or `not` (single filter object to negate).

        ## Sort
        Sort by one of: `id`, `name`, `product_count`.

        ## Page
        Size must be one of: 10, 50, 100, 250.

        ## Query parameter
        Use `viewableOnly=true` to restrict results to brands the authenticated user is allowed to view (e.g. brands of their organization).
      operationId: queryBrands
      parameters:
        - name: viewableOnly
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          description: If `true`, only return brands the user is allowed to view.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/BrandFilter'
                sorting:
                  oneOf:
                    - $ref: '#/components/schemas/BrandSortOption'
                    - type: array
                      items:
                        $ref: '#/components/schemas/BrandSortOption'
                      minItems: 1
                  description: |-
                    Sort order. Either a single sort object or an array of sort objects.
                    Each object has exactly one key (`id`, `name`, or `product_count`) with value `ASC` or `DESC`.
                  examples:
                    - name: ASC
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
            example:
              filter:
                search: Pharma
              sorting:
                name: ASC
              page:
                'no': 0
                size: 100
      responses:
        '200':
          description: Successful operation. Returns a paginated list of brands.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBrandResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /brands/find:
    get:
      tags:
        - Brands
      summary: Get a brand by ID
      description: Returns a single brand by its ID.
      operationId: findBrand
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: integer
            description: Brand ID.
          description: Brand ID.
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  brand:
                    $ref: '#/components/schemas/Brand'
        '400':
          description: Bad request (e.g. missing id).
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Brand not found.
  /brands/create:
    post:
      tags:
        - Brands
      summary: Create a brand
      description: Create a new brand with the given name.
      operationId: createBrand
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: Brand name.
            example:
              name: Example Brand
      responses:
        '200':
          description: Successful operation. Returns the created brand.
          content:
            application/json:
              schema:
                type: object
                properties:
                  brand:
                    $ref: '#/components/schemas/Brand'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          description: Unprocessable entity (e.g. missing name property).
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - missing name property
  /brands/update:
    post:
      tags:
        - Brands
      summary: Update a brand
      description: Update an existing brand's name by ID.
      operationId: updateBrand
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
                - data
              properties:
                id:
                  type: integer
                  description: Brand ID to update.
                data:
                  type: object
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      description: New brand name.
            example:
              id: 123
              data:
                name: Updated Brand Name
      responses:
        '200':
          description: Successful operation. Returns the updated brand.
          content:
            application/json:
              schema:
                type: object
                properties:
                  brand:
                    $ref: '#/components/schemas/Brand'
        '400':
          description: Bad request (e.g. missing id).
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /dietary-restrictions/query:
    post:
      tags:
        - Dietary Restrictions
      summary: Query dietary restrictions
      description: |-
        Returns dietary restrictions, optionally filtered.
        Dietary restrictions indicate whether a product is suitable for certain diets or contains specific allergens.

        ## Filter
        The optional `filter` object must have exactly one key when present. It can be:
        - A **property filter** `id`: a single dietary restriction ID (string) or an array of IDs (match any). Allowed values are the restriction codes, e.g. `gluten_free`, `vegan`, `halal`, `dairy_free`, `sugar_free`, etc.
        - A **compound filter** with key `and` (array of filter objects; all must match), `or` (array of filter objects; at least one must match), or `not` (single filter object to negate).
      operationId: queryDietaryRestrictions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/DietaryRestrictionFilter'
                  description: Optional. Filter by dietary restriction ID(s) or combine with and/or/not.
            examples:
              singleId:
                summary: Single ID
                value:
                  filter:
                    id: vegan
              multipleIds:
                summary: Match any of several IDs
                value:
                  filter:
                    id:
                      - gluten_free
                      - dairy_free
                      - lactose_free
              compound:
                summary: Compound filter (or)
                value:
                  filter:
                    or:
                      - id: vegan
                      - id: vegetarian
      responses:
        '200':
          description: Successful operation. Returns a list of dietary restrictions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of dietary restrictions.
                      totalExceedsLimit:
                        type: boolean
                        description: True if the total exceeds the pagination limit (when applicable).
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/DietaryRestriction'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /users/query:
    post:
      tags:
        - Users
      summary: Query users
      description: |-
        Query users using filters, sorting, and pagination.

        ## Filter
        The `filter` object must have exactly one key. It can be:
        - A **property filter** (e.g. `id`, `organization`, `status`, `hasOrganization`, `hasApiKey`, `policy`, `role`, `targetGroup`, `hasSubscription`, `subscriptionType`, `subscriptionEnd`, `public`, `vatNr`, `createdBy`, `resellerId`, `hasPolicies`, `hasRole`, and region-specific filters like `apbNr`, `rizivNr` for BE or `finessNr`, `cipNr` for FR) with an appropriate value.
        - A **compound filter** with key `and` (value: array of filter objects; all must match), `or` (value: array of filter objects; at least one must match), or `not` (single filter object to negate).

        ## Sort
        Sort the results by one of the following fields: `id`, `name`, `email`, `status`, `organization`, `createdAt`.

        ## Page
        Size must be one of: 10, 50, 100, 250.

        ## Query parameter
        Use `viewableOnly=true` to restrict results to users the authenticated user is allowed to view (e.g. users of their organization).
      operationId: queryUsers
      parameters:
        - name: viewableOnly
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          description: When `true`, restricts results to users the authenticated user is allowed to view.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/UserFilter'
                sorting:
                  oneOf:
                    - $ref: '#/components/schemas/UserSortOption'
                    - type: array
                      items:
                        $ref: '#/components/schemas/UserSortOption'
                      minItems: 1
                  description: |-
                    Sort order. Either a single sort object or an array of sort objects.
                    Each object has exactly one key (`id`, `name`, `email`, `status`, `organization`, or `createdAt`) with value `ASC` or `DESC`.
                    Examples: `{"name": "ASC"}`, `[{"id": "ASC"}, {"name": "DESC"}]`.
                  examples:
                    - name: ASC
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
      responses:
        '200':
          description: |-
            Successful operation.

            Returns a paginated list of users, sorted by id in ascending order by default.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedUserResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /users/create:
    post:
      tags:
        - Users
      summary: Create a user
      description: |-
        Create a new user on the platform within a given organization.

        :::warning[Requires reseller role]

        This endpoint is only available to users with the **reseller** role.
        Resellers can only create users with the `medical_professional` role. Attempting to create
        a user with any other role will result in a validation error.

        :::

        A `subscription` object with at least a `type` is required. The subscription determines which
        features and data the user can access.
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - role
                - organization
                - profile
                - preferences
                - subscription
              properties:
                email:
                  type: string
                  format: email
                  description: Email address of the user.
                password:
                  type: string
                  description: Password for the user to log in on the Medipim platform. If omitted, the user will need to use the password reset flow.
                role:
                  type: string
                  enum:
                    - organization_manager
                    - organization_customer_service
                    - medical_professional
                    - software_developer
                  description: Role of the user in Medipim. Required, but resellers can only pass `medical_professional` — any other value will be rejected.
                targetGroups:
                  type: array
                  items:
                    type: string
                    enum:
                      - public
                      - pharmacist
                      - doctor
                      - homecare
                      - hospital
                      - nurse
                      - physiotherapist
                      - webshop
                  description: Target groups for which this user is suited.
                organization:
                  type: integer
                  description: Medipim ID of the organization to which the user belongs.
                isEnabled:
                  type: boolean
                  default: true
                  description: Whether the user should be enabled on Medipim.
                profile:
                  type: object
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      description: Full name of the user.
                preferences:
                  type: object
                  required:
                    - language
                  properties:
                    isPublic:
                      type: boolean
                      default: true
                      description: Whether the user should be publicly visible.
                    language:
                      type: string
                      description: Preferred language for the user (locale code, e.g. `nl`, `fr`, `en`).
                subscription:
                  type: object
                  required:
                    - type
                  properties:
                    type:
                      type: integer
                      description: Medipim ID of the subscription type.
                    start:
                      type: integer
                      format: unix-time
                      description: Date when the subscription should start (unix timestamp). Defaults to now if omitted.
                    end:
                      type: integer
                      format: unix-time
                      description: Date when the subscription should end (unix timestamp). Defaults to no end date if omitted.
            example:
              email: jane.doe@example.com
              role: medical_professional
              organization: 123
              profile:
                name: Jane Doe
              preferences:
                language: nl
                isPublic: true
              subscription:
                type: 1
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /api-keys/create:
    post:
      tags:
        - Users
      summary: Create an API key
      description: |-
        Create a new API key for a user.

        Access to this endpoint is restricted and depends on your subscription type.

        The returned `secret` is only visible in this response. Store it securely — it cannot be retrieved again.
      operationId: createApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - user
                - name
              properties:
                user:
                  type: integer
                  description: Medipim ID of the user to create the API key for.
                name:
                  type: string
                  description: A descriptive name for the API key.
            example:
              user: 42
              name: My integration key
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  apiKey:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: API key ID.
                      name:
                        type: string
                        description: Name of the API key.
                      secret:
                        type: string
                        description: The API key secret. Only returned once at creation time.
                      isEnabled:
                        type: boolean
                        description: Whether the API key is enabled.
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /api-keys/revoke:
    post:
      tags:
        - Users
      summary: Revoke an API key
      description: |-
        Revoke (disable) an existing API key. Once revoked, the API key can no longer be used for authentication.

        Access to this endpoint is restricted and depends on your subscription type.
      operationId: revokeApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                id:
                  type: integer
                  description: ID of the API key to revoke.
            example:
              id: 7
      responses:
        '204':
          description: API key revoked successfully. No content returned.
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
  /subscription-types/query:
    post:
      tags:
        - Users
      summary: Query subscription types
      description: |-
        Query available subscription types using filters, sorting, and pagination.

        Subscription types determine which features and data a user can access on the platform.

        ## Filter
        The `filter` object must have exactly one key. It can be:
        - A **property filter** (`id` or `code`) with an appropriate value.
        - A **compound filter** with key `and` (value: array of filter objects; all must match), `or` (value: array of filter objects; at least one must match), or `not` (single filter object to negate).

        ## Sort
        Sort the results by `id`.

        ## Page
        Size must be one of: 10, 50, 100, 250.
      operationId: querySubscriptionTypes
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/SubscriptionTypeFilter'
                sorting:
                  oneOf:
                    - $ref: '#/components/schemas/SubscriptionTypeSortOption'
                    - type: array
                      items:
                        $ref: '#/components/schemas/SubscriptionTypeSortOption'
                      minItems: 1
                  description: |-
                    Sort order. Either a single sort object or an array of sort objects.
                    Only `id` is supported, with value `ASC` or `DESC`.
                  examples:
                    - id: ASC
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
      responses:
        '200':
          description: |-
            Successful operation.

            Returns a paginated list of subscription types, sorted by id in ascending order by default.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSubscriptionTypeResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /colors/query:
    post:
      tags:
        - Colors
      summary: Query colors
      description: |-
        Query available colors using an optional filter.

        Returns all colors when no filter is provided. This endpoint does not support sorting or pagination — all matching results are returned at once.

        ## Filter
        The `filter` object must have exactly one key. It can be:
        - A **property filter** (`id`) with a single color ID or an array of color IDs.
        - A **compound filter** with key `and` (value: array of filter objects; all must match), `or` (value: array of filter objects; at least one must match), or `not` (single filter object to negate).
      operationId: queryColors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/ColorFilter'
      responses:
        '200':
          description: |-
            Successful operation.

            Returns all colors matching the filter, or all colors if no filter is provided.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of colors returned.
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Color'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /corrections/query:
    post:
      tags:
        - Corrections
      summary: Query corrections
      description: |-
        Query corrections using filters, sorting, and pagination.

        Corrections are feedback requests on product data, such as missing photos, wrong descriptions, or other data issues.

        ## Filter
        The `filter` object must have exactly one key. It can be:
        - A **property filter** (e.g. `product`, `status`, `organization`, `search`, `locale`, `type`, `createdBy`, `createdAt`) with an appropriate value.
        - A **compound filter** with key `and` (value: array of filter objects; all must match), `or` (value: array of filter objects; at least one must match), or `not` (single filter object to negate).

        ## Sort
        Sort the results by `touchedAt` or `createdAt`.

        ## Page
        Size must be one of: 10, 50, 100, 250.
      operationId: queryCorrections
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/CorrectionFilter'
                sorting:
                  oneOf:
                    - $ref: '#/components/schemas/CorrectionSortOption'
                    - type: array
                      items:
                        $ref: '#/components/schemas/CorrectionSortOption'
                      minItems: 1
                  description: |-
                    Sort order. Either a single sort object or an array of sort objects.
                    Supported fields: `touchedAt`, `createdAt`, each with value `ASC` or `DESC`.
                    Default: `{"touchedAt": "ASC"}`.
                  examples:
                    - touchedAt: ASC
                page:
                  description: Pagination settings. Use either page number or result offset.
                  oneOf:
                    - title: By page number
                      type: object
                      required:
                        - 'no'
                      properties:
                        'no':
                          type: integer
                          description: Page number (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
                    - title: By offset
                      type: object
                      required:
                        - offset
                      properties:
                        offset:
                          type: integer
                          description: Result offset (0-based).
                          examples:
                            - 0
                        size:
                          type: integer
                          description: Number of results per page (10, 50, 100, or 250).
                          examples:
                            - 100
      responses:
        '200':
          description: |-
            Successful operation.

            Returns a paginated list of corrections, sorted by touchedAt in ascending order by default.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCorrectionResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /corrections/find:
    get:
      tags:
        - Corrections
      summary: Get a correction by ID
      description: Returns a single correction by its Medipim ID.
      operationId: findCorrection
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: integer
          description: Medipim ID of the correction.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  correction:
                    $ref: '#/components/schemas/Correction'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Correction not found
  /corrections/create:
    post:
      tags:
        - Corrections
      summary: Create a correction
      description: |-
        Create a new correction (feedback request) on a product's data.

        The `product` field accepts either a Medipim product ID (string) or a key-value object containing a product identifier field and value (e.g. `{"cnk": "1234567"}`).

        The `product` field is optional when the type is `product_does_not_exist`, otherwise it is required.
      operationId: createCorrection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - locale
                - type
              properties:
                product:
                  description: |-
                    The product this correction relates to. Accepts a Medipim product ID or a product identifier object (e.g. `{"cnk": "1234567"}`).
                    Optional when type is `product_does_not_exist`, required otherwise.
                  oneOf:
                    - type: string
                      description: Medipim product ID.
                    - type: object
                      description: Key-value object with a product identifier field and value.
                      minProperties: 1
                      maxProperties: 1
                locale:
                  type: string
                  description: Language for which the correction should be created (locale code, e.g. `nl`, `fr`).
                type:
                  type: string
                  enum:
                    - missing_description
                    - missing_photo
                    - missing_weight_dimensions
                    - missing_brand_family
                    - missing_category
                    - wrong_description
                    - wrong_photo
                    - wrong_category
                    - other
                    - product_does_not_exist
                  description: Type of the correction.
                text:
                  type: string
                  description: Descriptive feedback text.
            examples:
              withProductId:
                summary: Create with product ID
                value:
                  product: MB08BC0E93
                  locale: nl
                  type: missing_photo
                  text: The front photo is missing
              withIdentifier:
                summary: Create with product identifier
                value:
                  product:
                    cnk: '1234567'
                  locale: nl
                  type: wrong_description
                  text: The usage description is incorrect
              missingProduct:
                summary: Product does not exist
                value:
                  locale: nl
                  type: product_does_not_exist
                  text: Missing product ABC123
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  correction:
                    $ref: '#/components/schemas/Correction'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
  /corrections/types:
    get:
      tags:
        - Corrections
      summary: List correction types
      description: |-
        Returns all supported correction types with their localized names.

        The legacy types `obsolete_description` and `obsolete_photo` have been replaced by `wrong_description` and `wrong_photo`. The old values are still accepted when creating corrections but are automatically converted.
      operationId: getCorrectionTypes
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of correction types.
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          enum:
                            - missing_description
                            - missing_photo
                            - missing_weight_dimensions
                            - missing_brand_family
                            - missing_category
                            - wrong_description
                            - wrong_photo
                            - wrong_category
                            - other
                            - product_does_not_exist
                          description: Correction type identifier.
                        name:
                          $ref: '#/components/schemas/LocalizedString'
                          description: Localized name of the correction type.
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: |-
        We only support the HTTP Basic Authentication scheme for our web API. This means it is not safe to use directly in browser-based applications, as browsers may expose your credentials. If you need to access the API from a browser, we recommend using a proxy server or backend service to handle authentication securely.
        You can find your API credentials in your account settings on the Medipim platform. Use your API key ID as the username and your API key secret as the password when using basic authentication.
  schemas:
    MedipimProductId:
      type: string
      pattern: ^M[0-9A-Z]{9}$
      description: Product ID in Medipim format (letter M followed by 9 alphanumeric characters).
      examples:
        - MB08BC0E93
        - M22CFEE020
    UnixTimestamp:
      type: integer
      format: unix-time
      description: Unix timestamp (seconds since epoch).
      examples:
        - 1776173296
    TimestampFilter:
      description: A single timestamp or a range with optional `from` and/or `until` boundaries.
      oneOf:
        - $ref: '#/components/schemas/UnixTimestamp'
          description: Unix timestamp — matches items since this time.
        - title: Unix timestamp range
          type: object
          description: Time range with optional `from` and/or `until` boundaries.
          properties:
            from:
              $ref: '#/components/schemas/UnixTimestamp'
            until:
              $ref: '#/components/schemas/UnixTimestamp'
          examples:
            - from: 1776117600
              until: 1776204000
    DietaryRestrictionId:
      type: string
      description: Identifier for a dietary restriction (e.g. allergen or diet suitability).
      enum:
        - alcohol_free
        - allergens_free
        - bio
        - dairy_free
        - fragrance_free
        - gluten_free
        - halal
        - kosher
        - lactose_free
        - latex_free
        - low_carbs
        - low_in_purine
        - no_nuts
        - protein_rich
        - salt_free_diet
        - soy_free
        - sugar_free
        - vegan
        - vegetarian
        - without_dyes
        - without_fructose
        - without_palm_oil
        - without_preservatives
        - yeast_free
    ColorId:
      type: string
      description: Identifier for a product color.
      enum:
        - beige
        - black
        - blue
        - bordeaux
        - brown
        - gold
        - gray
        - green
        - khaki
        - multicolor
        - ocher
        - orange
        - pink
        - purple
        - red
        - transparent
        - white
        - yellow
    ProductPropertyFilter:
      description: A single property filter for products. Exactly one key per object.
      anyOf:
        - title: ProductIdFilter
          type: object
          required:
            - id
          properties:
            id:
              oneOf:
                - $ref: '#/components/schemas/MedipimProductId'
                  description: Single product ID.
                - type: array
                  items:
                    $ref: '#/components/schemas/MedipimProductId'
                    examples:
                      - - MB08BC0E93
                        - M22CFEE020
                  description: Array of product IDs. Matches products whose ID is any one of the given values (OR logic). Max 1000 items.
                  maxItems: 1000
          additionalProperties: false
        - title: ProductStatusFilter
          type: object
          required:
            - status
          properties:
            status:
              oneOf:
                - type: string
                  enum:
                    - active
                    - replaced
                    - inactive
                  description: Single product status.
                - type: array
                  items:
                    type: string
                    enum:
                      - active
                      - replaced
                      - inactive
                  description: Array of product statuses. Matches products whose status is any one of the given values (OR logic).
                  examples:
                    - - active
                      - replaced
          additionalProperties: false
        - title: EcommerceStatusFilter
          type: object
          required:
            - ecommerce
          deprecated: true
          description: 'Deprecated: use the `status` filter instead.'
          properties:
            ecommerce:
              type: string
              deprecated: true
              description: Deprecated. Use the `status` filter instead.
          additionalProperties: false
        - title: OrganizationIdFilter
          type: object
          required:
            - organization
          properties:
            organization:
              oneOf:
                - type: integer
                  description: Single organization ID.
                  examples:
                    - 1
                - type: array
                  items:
                    type: integer
                    description: Organization IDs (match any).
          additionalProperties: false
        - title: PublicCategoryIdFilter
          type: object
          properties:
            publicCategories:
              oneOf:
                - type: integer
                  description: Single public category ID.
                - type: array
                  items:
                    type: integer
                    description: Public category IDs (match any).
          additionalProperties: false
        - title: MedipimCategoryIdFilter
          type: object
          required:
            - medipimCategories
          properties:
            medipimCategories:
              oneOf:
                - type: string
                  description: Single Medipim category identifier.
                  examples:
                    - medipimCategory-d23e1fd4-1761-4ee4-a68c-9722e4dc669b
                - type: array
                  items:
                    type: string
                    description: Medipim category identifiers (match any).
                    examples:
                      - - medipimCategory-d23e1fd4-1761-4ee4-a68c-9722e4dc669b
                        - medipimCategory-aae70f6f-ac09-442a-87f0-998ea0607255
          additionalProperties: false
        - title: BrandIdFilter
          type: object
          required:
            - brand
          properties:
            brand:
              oneOf:
                - type: integer
                  description: Single brand ID.
                  examples:
                    - 4
                - type: array
                  items:
                    type: integer
                  description: Brand IDs (match any).
                  examples:
                    - - 14
                      - 3
          additionalProperties: false
        - title: ProductFamilyIdFilter
          type: object
          properties:
            productFamilies:
              oneOf:
                - type: integer
                  description: Single product family ID.
                - type: array
                  items:
                    type: integer
                    description: Product family IDs (match any).
          additionalProperties: false
        - title: SearchFilter
          type: object
          required:
            - search
          properties:
            search:
              type: object
              required:
                - query
                - locale
              properties:
                query:
                  type: string
                locale:
                  type: string
                  description: Locale code (e.g. nl, fr).
                type:
                  type: string
                  enum:
                    - starts
                    - contains
                    - exact
                    - refcode
                    - symptoms
                  description: Optional search type. Defaults to 'starts' if omitted.
          additionalProperties: false
          examples:
            - search:
                query: aspirin
                locale: en
                type: starts
        - title: MinimumContentFilter
          type: object
          required:
            - minimumContent
          properties:
            minimumContent:
              type: boolean
              description: |-
                Matches products that have an image AND a description AND a public category.
                When **true**, products must have all three; when **false**, products must lack at least one.
          additionalProperties: false
          examples:
            - minimumContent: true
        - title: HasContentFilter
          type: object
          required:
            - hasContent
          description: |-
            Filter products by presence or absence of content in a specific field.

            The `flag` property specifies which field to check. Use the [get-product-fields](/openapi/get-product-fields) endpoint to retrieve the full list of valid flags.

            Set `condition` to `true` (default) to match products that **have** content, or `false` to match products that **lack** content.

            For fields that have localized values (e.g. descriptions), add a `locale` parameter to check a specific language.

            **Description content source prefixes**: for description fields, you can prefix the flag with a content source to filter by who generated the content:
            - `user_generated.descriptions.<type>` — content entered by the organization
            - `ai_generated.descriptions.<type>` — content generated by AI
            - `system_generated.descriptions.<type>` — content from an automated data source

            **Examples**:
            - `{"hasContent": {"flag": "weight"}}` — products that have a weight value
            - `{"hasContent": {"flag": "descriptions.usage", "locale": "nl"}}` — products with a Dutch usage description
            - `{"hasContent": {"flag": "user_generated.descriptions.usage", "locale": "nl"}}` — products with a user-written Dutch usage description
            - `{"hasContent": {"flag": "media", "condition": false}}` — products that have no media
          properties:
            hasContent:
              type: object
              required:
                - flag
              properties:
                flag:
                  type: string
                  description: |-
                    The field to check for content. Use the [get-product-fields](/openapi/get-product-fields) endpoint for the full list of valid flags.
                    For descriptions, you can optionally prefix with a content source: `user_generated.`, `ai_generated.`, or `system_generated.`.
                condition:
                  type: boolean
                  default: true
                  description: When `true` (default), matches products that have content in the specified field. When `false`, matches products that lack content.
                locale:
                  type: string
                  description: Locale code (e.g. `nl`, `fr`, `en`). Required when checking localized fields such as descriptions.
          additionalProperties: false
          examples:
            - hasContent:
                flag: media
                condition: false
                locale: en
        - title: EanFilter
          type: object
          required:
            - ean
          description: |-
            Matches products by EAN (European Article Number), also known as GTIN (Global Trade Item Number). EAN is a standardized barcode identifier issued by GS1 used worldwide to identify products. A single product can have multiple EAN codes.
            EAN codes must be provided as strings (with or without leading zeros). Arrays are limited to 1000 items.
          properties:
            ean:
              oneOf:
                - type: string
                  description: Single EAN code.
                  examples:
                    - '3574660696318'
                - type: array
                  items:
                    type: string
                    examples:
                      - - '3574660696318'
                        - '3401526293056'
                  description: EAN codes (match any) up to 1000 items.
                  maxItems: 1000
          additionalProperties: false
          examples:
            - ean: '3574660696318'
        - title: GTINFilter
          type: object
          required:
            - gtin
          deprecated: true
          properties:
            gtin:
              deprecated: true
              description: Deprecated. Use `eanGtin14` filter instead.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
          additionalProperties: false
        - title: EAN/GTIN8Filter
          type: object
          required:
            - eanGtin8
          properties:
            eanGtin8:
              description: Filter by 8-digit GTIN (GTIN-8), a short-form barcode typically used for small packages. Codes may be represented with or without leading zeros. To avoid confusion, provide values as strings. Arrays are limited to 1000 items.
              oneOf:
                - type: string
                  examples:
                    - '30106659'
                - type: array
                  items:
                    type: string
                  examples:
                    - - '30106659'
                      - '87111606'
          additionalProperties: false
          examples:
            - eanGtin8: '35746606'
        - title: EAN/GTIN12Filter
          type: object
          required:
            - eanGtin12
          properties:
            eanGtin12:
              description: Filter by 12-digit GTIN (GTIN-12, also known as UPC-A), commonly used in the US and Canada. Codes may be represented with or without leading zeros. To avoid confusion, provide values as strings. Arrays are limited to 1000 items.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
          additionalProperties: false
          examples:
            - eanGtin12: '357466069012'
        - title: EAN/GTIN13Filter
          type: object
          required:
            - eanGtin13
          properties:
            eanGtin13:
              description: Filter by 13-digit GTIN (GTIN-13, also known as EAN-13), the most common barcode format used internationally outside the US and Canada. Codes may be represented with or without leading zeros. To avoid confusion, provide values as strings. Arrays are limited to 1000 items.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
          additionalProperties: false
          examples:
            - eanGtin13: '357466069013'
        - title: EAN/GTIN14Filter
          type: object
          required:
            - eanGtin14
          properties:
            eanGtin14:
              description: Filter by 14-digit GTIN (GTIN-14), typically used for trade units and cases in logistics. Codes may be represented with or without leading zeros. To avoid confusion, provide values as strings. Arrays are limited to 1000 items.
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
          additionalProperties: false
          examples:
            - eanGtin14: '3574660696318'
        - title: HsCodeFilter
          type: object
          required:
            - hsCode
          description: Matches products by HS code (Harmonised System). The HS code is an internationally standardized system of names and numbers to classify traded products, maintained by the World Customs Organization (WCO).
          properties:
            hsCode:
              oneOf:
                - type: string
                  description: Single HS code.
                - type: array
                  items:
                    type: string
                  maxItems: 1000
                  description: HS codes (match any).
          additionalProperties: false
          examples:
            - hsCode: '010203'
        - title: CtiFilter
          type: object
          required:
            - cti
          description: Matches products by CTI (Common Technical Identifier). The CTI groups products where the product is identical except for the quantity or packaging — for example, a box of 20 and a box of 50 tablets of the same medicine share the same CTI.
          properties:
            cti:
              type: string
              description: CTI code.
          additionalProperties: false
          examples:
            - cti: '240904'
        - title: NameCtiFilter
          type: object
          required:
            - nameCti
          description: |-
            Matches products by name-based CTI (grouping by name number). An identical value is assigned for products where the name is identical except for the quantity indication, allowing you to group identical products for which different packaging exists.
            Note: Medipim retrieves product names from various sources, so poorly structured names can lead to discrepancies in grouping.
          properties:
            nameCti:
              type: string
              description: nameCti / grouping by name number.
          additionalProperties: false
          examples:
            - nameCti: '603722'
        - title: ActiveIngredientFilter
          type: object
          required:
            - activeIngredient
          description: Matches products by active ingredient.
          properties:
            activeIngredient:
              oneOf:
                - type: number
                - type: array
                  items:
                    type: number
          additionalProperties: false
          examples:
            - activeIngredient: 1
            - activeIngredient:
                - 1
                - 2
        - title: ConservationFilter
          type: object
          required:
            - conservation
          description: Matches products by conservation.
          properties:
            conservation:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
          additionalProperties: false
          examples:
            - conservation: room
            - conservation:
                - room
                - frozen
        - title: PrescriptionFilter
          type: object
          required:
            - prescription
          description: Matches products on whether they require a prescription.
          properties:
            prescription:
              type: boolean
          additionalProperties: false
          examples:
            - prescription: true
            - prescription: false
        - title: IsANutritionSupplementFilter
          type: object
          required:
            - isANutritionSupplement
          description: Matches products on whether they are a food supplement.
          properties:
            isANutritionSupplement:
              type: boolean
          additionalProperties: false
          examples:
            - isANutritionSupplement: true
            - isANutritionSupplement: false
        - title: PopularityFilter
          type: object
          required:
            - popularity
          description: |-
            Matches products by popularity score.

            Uses a numerical operator for comparison. Supported operators: `eq` (equal, default), `neq` (not equal), `gt` (greater than), `gte` (greater than or equal), `lt` (less than), `lte` (less than or equal).
          properties:
            popularity:
              type: object
              required:
                - value
              properties:
                value:
                  type: number
                  description: The popularity value to compare against.
                operator:
                  type: string
                  enum:
                    - eq
                    - neq
                    - gt
                    - gte
                    - lt
                    - lte
                  default: eq
                  description: Comparison operator. Defaults to `eq` (equal) if omitted.
          additionalProperties: false
          examples:
            - popularity:
                value: 50
                operator: gte
        - title: AllowedSpeciesFilter
          type: object
          required:
            - allowedSpecies
          description: Matches products by allowed species (target species the product is intended for).
          properties:
            allowedSpecies:
              oneOf:
                - type: string
                  enum:
                    - human
                    - veterinary
                    - surface_maintenance
                    - phytopharmacy
                  description: Single species.
                - type: array
                  items:
                    type: string
                    enum:
                      - human
                      - veterinary
                      - surface_maintenance
                      - phytopharmacy
                  description: Species (match any).
          additionalProperties: false
          examples:
            - allowedSpecies: human
            - allowedSpecies:
                - human
                - veterinary
        - title: ATCCategoryFilter
          type: object
          required:
            - atcCategory
          description: Matches products by ATC (Anatomical Therapeutic Chemical) classification code.
          properties:
            atcCategory:
              oneOf:
                - type: string
                  description: Single ATC category code.
                - type: array
                  items:
                    type: string
                  description: ATC category codes (match any).
          additionalProperties: false
          examples:
            - atcCategory: BC01D
            - atcCategory:
                - BC01D
                - A1
        - title: NarcoticFilter
          type: object
          required:
            - narcotic
          description: Matches products that are marked as narcotics or not.
          properties:
            narcotic:
              type: string
              enum:
                - 'yes'
                - 'no'
                - unknown
          additionalProperties: false
          examples:
            - narcotic: 'yes'
        - title: BiocideFilter
          type: object
          required:
            - biocide
          description: Matches products that are marked as biocides or not.
          properties:
            biocide:
              type: string
              enum:
                - 'yes'
                - 'no'
                - unknown
          additionalProperties: false
          examples:
            - biocide: 'yes'
        - title: ProductAttributeFilter
          type: object
          required:
            - attributes
          deprecated: true
          properties:
            attributes:
              deprecated: true
              description: Deprecated. Use `colors`, `dietaryRestrictions` or `galenicShape` filter instead.
              oneOf:
                - type: integer
                - type: array
                  items:
                    type: integer
          additionalProperties: false
        - title: DietaryRestrictionsFilter
          type: object
          required:
            - dietaryRestrictions
          properties:
            dietaryRestrictions:
              oneOf:
                - $ref: '#/components/schemas/DietaryRestrictionId'
                - type: array
                  items:
                    $ref: '#/components/schemas/DietaryRestrictionId'
          additionalProperties: false
        - title: ColorsFilter
          type: object
          required:
            - colors
          properties:
            colors:
              oneOf:
                - $ref: '#/components/schemas/ColorId'
                - type: array
                  items:
                    $ref: '#/components/schemas/ColorId'
          additionalProperties: false
        - title: NotApplicableFieldFilter
          type: object
          required:
            - notApplicableField
          description: Matches products by fields marked as not applicable.
          properties:
            notApplicableField:
              oneOf:
                - type: string
                  description: Single field name.
                - type: array
                  items:
                    type: string
                  description: Field names (match any).
          additionalProperties: false
          examples:
            - notApplicableField: productFamily
            - notApplicableField:
                - productFamily
                - brand
        - title: OfficialDeletionAtFilter
          type: object
          required:
            - officialDeletionAt
          description: Matches products with a specific commercial end date.
          properties:
            officialDeletionAt:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
          examples:
            - officialDeletionAt: 1471525605
            - officialDeletionAt:
                from: 1471525605
                until: 1571525605
        - title: CreatedAtFilter
          type: object
          required:
            - createdAt
          description: Matches items created since the given time.
          properties:
            createdAt:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
          examples:
            - createdAt:
                from: 1712345678
                until: 1712345678
        - title: UpdatedSinceFilter
          type: object
          required:
            - updatedSince
          description: Alias for `touchedAt`. Matches products that were last modified within a given time range.
          properties:
            updatedSince:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
        - title: DeletedFilter
          type: object
          required:
            - deleted
          properties:
            deleted:
              type: boolean
              description: Include or exclude pre-deleted (soft-deleted) products.
          additionalProperties: false
        - title: MediaIdFilter
          type: object
          required:
            - media
          properties:
            media:
              oneOf:
                - type: integer
                  description: Single media item ID.
                - type: array
                  items:
                    type: integer
                    description: Media item IDs (match any).
              description: Media item ID(s).
          additionalProperties: false
        - title: PublicPriceFilter
          type: object
          required:
            - publicPrice
          description: |-
            Matches products by public price (the consumer-facing price including VAT). The value is in **cents** (base denomination) — for example, `820` means €8.20.

            Uses a numerical operator for comparison. Supported operators: `eq` (equal, default), `neq` (not equal), `gt` (greater than), `gte` (greater than or equal), `lt` (less than), `lte` (less than or equal).
          properties:
            publicPrice:
              type: object
              required:
                - value
              properties:
                value:
                  type: number
                  description: The price value to compare against (in cents).
                operator:
                  type: string
                  enum:
                    - eq
                    - neq
                    - gt
                    - gte
                    - lt
                    - lte
                  default: eq
                  description: Comparison operator. Defaults to `eq` (equal) if omitted.
          additionalProperties: false
          examples:
            - publicPrice:
                value: 1000
                operator: gte
        - title: HasCorrectionsFilter
          type: object
          required:
            - hasCorrections
          description: Matches products that have or do not have pending corrections.
          properties:
            hasCorrections:
              type: boolean
              description: '`true` to match products with corrections, `false` for products without.'
          additionalProperties: false
          examples:
            - hasCorrections: true
        - title: TouchedAtFilter
          type: object
          required:
            - touchedAt
          description: Matches products that were last modified within a given time range.
          properties:
            touchedAt:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
        - title: HasCannabisDataFilter
          description: Matches products that have or do not have cannabis data.
          type: object
          required:
            - hasCannabisData
          properties:
            hasCannabisData:
              type: boolean
              description: true = has cannabis data; false = does not have cannabis data.
          additionalProperties: false
          examples:
            - hasCannabisData: true
        - title: CannabisFormFilter
          description: Matches products by cannabis form.
          type: object
          required:
            - cannabisForm
          properties:
            cannabisForm:
              oneOf:
                - type: string
                  enum:
                    - oil
                    - flower
                    - capsule
                    - spray
                    - resin
                    - tablet
                    - wafer
                    - gummy
                    - lozenge
                  description: Single cannabis form.
                - type: array
                  items:
                    type: string
                    enum:
                      - oil
                      - flower
                      - capsule
                      - spray
                      - resin
                      - tablet
                      - wafer
                      - gummy
                      - lozenge
                  description: Cannabis forms (match any).
          additionalProperties: false
          examples:
            - cannabisForm: oil
        - title: CannabisCategoryFilter
          description: Matches products by cannabis category.
          type: object
          required:
            - cannabisCategory
          properties:
            cannabisCategory:
              oneOf:
                - type: string
                  enum:
                    - full_spectrum
                    - broad_spectrum
                    - isolate
                  description: Single cannabis category.
                - type: array
                  items:
                    type: string
                    enum:
                      - full_spectrum
                      - broad_spectrum
                      - isolate
                  description: Cannabis categories (match any).
          additionalProperties: false
          examples:
            - cannabisCategory: full_spectrum
        - title: CultivarTypeFilter
          description: Matches products by cultivar type.
          type: object
          required:
            - cultivarType
          properties:
            cultivarType:
              oneOf:
                - type: string
                  enum:
                    - indica
                    - sativa
                    - hybrid
                  description: Single cultivar type.
                - type: array
                  items:
                    type: string
                    enum:
                      - indica
                      - sativa
                      - hybrid
                  description: Cultivar types (match any).
          additionalProperties: false
          examples:
            - cultivarType: indica
        - title: ThcPercentageFilter
          description: Matches products by THC percentage range.
          type: object
          required:
            - thcPercentage
          properties:
            thcPercentage:
              type: object
              properties:
                min:
                  type: number
                  format: float
                  description: Minimum THC percentage (inclusive).
                max:
                  type: number
                  format: float
                  description: Maximum THC percentage (inclusive).
              description: Range filter with optional min and/or max.
          additionalProperties: false
          examples:
            - thcPercentage:
                min: 5
                max: 20
        - title: CbdPercentageFilter
          description: Matches products by CBD percentage range.
          type: object
          required:
            - cbdPercentage
          properties:
            cbdPercentage:
              type: object
              properties:
                min:
                  type: number
                  format: float
                  description: Minimum CBD percentage (inclusive).
                max:
                  type: number
                  format: float
                  description: Maximum CBD percentage (inclusive).
              description: Range filter with optional min and/or max.
          additionalProperties: false
          examples:
            - cbdPercentage:
                min: 5
                max: 20
        - title: ThcCbdRatioFilter
          description: Matches products by THC:CBD ratio.
          type: object
          required:
            - thcCbdRatio
          properties:
            thcCbdRatio:
              oneOf:
                - type: string
                  pattern: ^\d+:\d+$
                  description: Single THC:CBD ratio in format X:Y.
                - type: array
                  items:
                    type: string
                    pattern: ^\d+:\d+$
                  description: THC:CBD ratios (match any).
          additionalProperties: false
          examples:
            - thcCbdRatio: '10:1'
        - title: StrainFilter
          description: Matches products by strain name.
          type: object
          required:
            - strain
          properties:
            strain:
              type: string
              description: Strain name.
          additionalProperties: false
          examples:
            - strain: Blue Dream
        - title: TerpeneFilter
          description: Matches products by terpene.
          type: object
          required:
            - terpene
          properties:
            terpene:
              oneOf:
                - type: string
                  description: Single terpene name.
                - type: array
                  items:
                    type: string
                  description: Terpene names (match any).
              description: |-
                Possible values: Myrcene, Limonene, β-Caryophyllene, α-Pinene, β-Pinene, Linalool, Humulene,
                Terpinolene, Ocimene, Bisabolol, Camphene, Borneol, Geraniol, Nerolidol, Valencene, Fenchol,
                Guaiol, Isopulegol, Phytol, Sabinene, α-Terpineol, p-Cymene, Eucalyptol (1,8-Cineole).
          additionalProperties: false
          examples:
            - terpene: Myrcene
        - title: MinorCannabinoidFilter
          description: Matches products by minor cannabinoid.
          type: object
          required:
            - minorCannabinoid
          properties:
            minorCannabinoid:
              oneOf:
                - type: string
                  description: Single minor cannabinoid name.
                - type: array
                  items:
                    type: string
                  description: Minor cannabinoid names (match any).
              description: 'Possible values: CBG, CBN, CBC, THCV, CBDV, CBDA, CBGA, THCA, CBL, CBT, Δ8-THC.'
          additionalProperties: false
          examples:
            - minorCannabinoid: CBG
    ProductFilter:
      description: Filter object with exactly one key. Either a **property filter** (e.g. id, search, brand, publicCategories, medipimCategories, organization, deleted, status, productFamilies, media, attributes, dietaryRestrictions, colors, createdAt, touchedAt / updatedSince, minimumContent, hasContent, hasCorrections, publicPrice, gtin, ean, hsCode, cti, galenicShape, nameCti, activeIngredient, atc, isANutritionSupplement, and region-specific filters such as cnk, hasCannabisData, cannabisForm, etc.) or a **compound filter** with key `and` (array of filter objects, all must match), `or` (array of filter objects, at least one must match), or `not` (single filter object to negate). Arrays of IDs are limited to 1000 items where applicable.
      oneOf:
        - $ref: '#/components/schemas/ProductPropertyFilter'
        - title: AndFilterOperator
          type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/ProductPropertyFilter'
              description: All of these filters must match.
          additionalProperties: false
        - title: OrFilterOperator
          type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/ProductPropertyFilter'
              description: At least one of these filters must match.
          additionalProperties: false
        - title: NotFilterOperator
          type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/ProductPropertyFilter'
              description: Negate this filter.
          additionalProperties: false
    ContentLocale:
      type: string
      description: Language code for translatable content.
      enum:
        - en
        - nl
        - fr
        - de
        - es
        - cs
      examples:
        - en
    ProductSortOption:
      description: A single sort clause. Exactly one key per object.
      oneOf:
        - title: Sort by name
          description: |-
            Sort by the translated product name. Because product names are multilingual, you must specify a `locale` to indicate which translation to sort on, along with a `direction`.

            Example: `{"name": {"direction": "ASC", "locale": "nl"}}`
          type: object
          required:
            - name
          properties:
            name:
              type: object
              required:
                - direction
                - locale
              properties:
                direction:
                  type: string
                  enum:
                    - ASC
                    - DESC
                locale:
                  allOf:
                    - $ref: '#/components/schemas/ContentLocale'
                    - description: Language of the product name to sort on.
          additionalProperties: false
        - title: Sort by relevance
          description: |-
            Sort by search relevance (always descending). Use this when you have an active search query and want the most relevant results first. Optionally pass a `locale` for locale-aware relevance scoring.

            Example: `{"auto": {}}` or `{"auto": {"locale": "fr"}}`
          type: object
          required:
            - auto
          properties:
            auto:
              type: object
              properties:
                locale:
                  $ref: '#/components/schemas/ContentLocale'
          additionalProperties: false
        - title: Sort by field
          description: |-
            Sort by a single scalar product field. The key is the field name and the value is the direction (`ASC` or `DESC`). Use this for non-translatable fields like identifiers, prices, or timestamps.

            Allowed fields: `id`, `publicPrice`, `createdAt`, `touchedAt`, `statusTouchedAt`, `status`, `pbs`, `pzn`, `pznAustria`, `cnk`, `sukl`, `pdk`, `cefip`, `nationalCode`, `cn`, `ndc`, `upc10`, `upc11`, `upc12`, `hamacherCode`, `hri`, `pin`. Available fields may vary by region.

            Example: `{"publicPrice": "DESC"}` or `{"createdAt": "ASC"}`
          type: object
          minProperties: 1
          maxProperties: 1
          additionalProperties:
            type: string
            enum:
              - ASC
              - DESC
          examples:
            - publicPrice: DESC
      examples:
        - id: ASC
    LocalizedString:
      type: object
      properties:
        nl:
          type: string
          examples:
            - Een voorbeeldtekst in het Nederlands.
        fr:
          type: string
          examples:
            - Un texte d'exemple en français.
        en:
          type: string
          examples:
            - An example text in English.
        de:
          type: string
          examples:
            - Ein Beispieltext auf Deutsch.
    TemperatureRange:
      type: object
      description: Temperature expressed in multiple scales.
      properties:
        celsius:
          type: number
        fahrenheit:
          type: number
        kelvin:
          type: number
    DimensionWithUnit:
      type: object
      properties:
        value:
          type: number
          description: Numeric value of the measurement.
        unit:
          type: string
          description: Unit of measurement (e.g. g, mg, mm, cm).
    EntityMeta:
      type: object
      description: Standard creation and modification timestamps.
      properties:
        createdAt:
          $ref: '#/components/schemas/UnixTimestamp'
        updatedAt:
          $ref: '#/components/schemas/UnixTimestamp'
    PublicCategory:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 1
        name:
          $ref: '#/components/schemas/LocalizedString'
          description: The name of the category in multiple languages.
          examples:
            - nl: Geneesmiddelen
              fr: Médicaments
              en: Medicines
              de: Arzneimittel
        parent:
          type:
            - integer
            - 'null'
          description: The id of the parent category, or null if it has no parent.
          examples:
            - null
        order:
          type: integer
          description: This field is deprecated and will be removed in future versions.
          examples:
            - 1
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              format: unix-time
              examples:
                - 1625247600
                - 1625334000
            updatedAt:
              type: integer
              format: unix-time
              examples:
                - 1625247600
                - 1625334000
    MedipimCategory:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the Medipim category.
          examples:
            - medipimCategory-550e8400-e29b-41d4-a716-446655440000
        name:
          $ref: '#/components/schemas/LocalizedString'
          description: The name of the category in multiple languages.
          examples:
            - nl: Geneesmiddelen
              fr: Médicaments
              en: Medicines
              de: Arzneimittel
        description:
          $ref: '#/components/schemas/LocalizedString'
          description: The description of the category in multiple languages.
          examples:
            - nl: Alle geneesmiddelen
              fr: Tous les médicaments
              en: All medicines
              de: Alle Arzneimittel
        parent:
          type:
            - string
            - 'null'
          description: The identifier of the parent category, or null for root categories.
          examples:
            - null
        order:
          type: integer
          description: Sort order of the category within its siblings.
          examples:
            - 1
        type:
          type: string
          enum:
            - medicine
            - veterinary_medicine
            - non_medical
            - veterinary_non_medical
          description: The type of category.
          examples:
            - medicine
    Organization:
      type: object
      description: Organization entity (customer, supplier, or other type).
      properties:
        id:
          type: string
          description: Organization ID.
          examples:
            - '12345'
        name:
          type: string
          description: Organization name.
          examples:
            - Example Pharma
        type:
          type: string
          description: Organization type (e.g. supplier, customer).
        brands:
          type: array
          items:
            type: integer
          description: Associated brand IDs.
        productFamilies:
          type: array
          items:
            type: integer
          description: Associated product family IDs.
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              format: unix-time
            updatedAt:
              type: integer
              format: unix-time
        contactInformation:
          type: object
          description: Present for supplier-type organizations.
          properties:
            address:
              type: string
            city:
              type: string
            region:
              type: string
              description: The geographic subdivision of the organization, expressed as an ISO 3166-2 subdivision code (e.g. `BE-BRU` for Brussels, `BE-VLG` for Flanders, `FR-IDF` for Île-de-France). The set of valid codes depends on the platform region. May be `null` if no region is set.
              examples:
                - BE-BRU
            zipcode:
              type: string
            country:
              type: string
            email:
              type: string
              format: email
              description: Email address of the organization.
            url:
              type: string
              format: uri
    DietaryRestriction:
      type: object
      description: A dietary restriction (e.g. allergen or diet suitability).
      properties:
        id:
          $ref: '#/components/schemas/DietaryRestrictionId'
        name:
          $ref: '#/components/schemas/LocalizedString'
          description: Name of the dietary restriction in multiple languages.
    ProductPhoto:
      description: A photo as it appears in a product response, including display order.
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          examples:
            - photo
        locales:
          type: array
          items:
            type: string
        targetGroups:
          type: array
          items:
            type: string
        photoType:
          type: string
          examples:
            - packshot
        formats:
          type: object
          description: Available image format URLs keyed by format name.
        visibleSides:
          type: array
          items:
            type: string
          examples:
            - - front
              - back
        displayOrder:
          type: integer
          description: |-
            1-based display order within the product's photos array.
            Reflects the platform's standard sorting (by photo type, then visible sides).
            Only present on photos within a product response.
          examples:
            - 1
            - 2
            - 3
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              format: unix-time
            updatedAt:
              type: integer
              format: unix-time
    ProductFrontal:
      description: A frontal image as it appears in a product response, including display order.
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - frontal
        locales:
          type: array
          items:
            type: string
        targetGroups:
          type: array
          items:
            type: string
        photoType:
          type: string
          examples:
            - packshot
        formats:
          type: object
          description: Available frontal-specific image format URLs keyed by format name.
        displayOrder:
          type: integer
          description: |-
            1-based display order within the product's frontals array.
            Independent from the photos display order sequence.
            Only present on frontals within a product response.
          examples:
            - 1
            - 2
            - 3
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              format: unix-time
            updatedAt:
              type: integer
              format: unix-time
    RelatedResource:
      type: object
      properties:
        id:
          type: string
          format: uuid
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
            - e2b1c7a2-4f3d-4e2a-9b1a-7c8e2f1d5a3b
        resource_url:
          type: string
          format: uri
          examples:
            - https://api.example.com/relatedresource/123e4567-e89b-12d3-a456-426614174000
            - https://api.example.com/relatedresource/e2b1c7a2-4f3d-4e2a-9b1a-7c8e2f1d5a3b
    Product:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/MedipimProductId'
        status:
          type: string
          enum:
            - active
            - inactive
            - replaced
            - no_selection
          description: Product status.
        ecommerce:
          type: string
          deprecated: true
          description: 'Deprecated: use `status` instead.'
        replacement:
          $ref: '#/components/schemas/MedipimProductId'
          description: Medipim ID of the replacing product. Only present when `status` is `replaced`.
        name:
          $ref: '#/components/schemas/LocalizedString'
          description: Product name.
        seoName:
          $ref: '#/components/schemas/LocalizedString'
          description: SEO-friendly product name.
        shortDescription:
          $ref: '#/components/schemas/LocalizedString'
          deprecated: true
          description: 'Deprecated: short description.'
        expires:
          type: boolean
          deprecated: true
          description: 'Deprecated: indicates whether the product refundability expires.'
        tradeInRefundValue:
          type:
            - integer
            - 'null'
          deprecated: true
          description: 'Deprecated: refund value when product is traded-in back to the supplier (in euro cents).'
        tradeInMonthsBeforeExpiry:
          type:
            - integer
            - 'null'
          deprecated: true
          description: 'Deprecated: number of months before refundability expires.'
        tradeInMonthsAfterExpiry:
          type:
            - integer
            - 'null'
          deprecated: true
          description: 'Deprecated: number of months after refundability expires.'
        prescription:
          type: boolean
          description: Whether the product requires a prescription.
        writtenRequestByPatient:
          type: boolean
          description: Whether the product requires a written request by the patient.
        requiresLegalText:
          type: boolean
          description: Whether the product requires a legal text (description) to be displayed.
        isANutritionSupplement:
          type:
            - boolean
            - 'null'
          description: Whether the product is a food supplement.
        narcotic:
          type: string
          enum:
            - 'yes'
            - 'no'
            - unknown
          description: Whether the product is a narcotic drug.
        biocide:
          type: string
          enum:
            - 'yes'
            - 'no'
            - unknown
          description: Whether the product is a biocide.
        officialDeletionAt:
          type:
            - integer
            - 'null'
          format: unix-time
          description: Official commercial end date of the product (unix timestamp), or null if not set.
        ean:
          type: array
          items:
            type: string
          description: EAN codes associated with this product.
        gtin:
          type:
            - string
            - 'null'
          deprecated: true
          description: 'Deprecated: use `eanGtin14` instead.'
        eanGtin8:
          type:
            - string
            - 'null'
          description: 8-digit GTIN (GTIN-8). May contain leading zeros.
        eanGtin12:
          type:
            - string
            - 'null'
          description: 12-digit GTIN (GTIN-12 / UPC-A). May contain leading zeros.
        eanGtin13:
          type:
            - string
            - 'null'
          description: 13-digit GTIN (GTIN-13 / EAN-13). May contain leading zeros.
        eanGtin14:
          type:
            - string
            - 'null'
          description: 14-digit GTIN (GTIN-14). May contain leading zeros.
        supplierReference:
          type:
            - string
            - 'null'
          description: Internal reference code assigned to the product by the supplier.
        hsCode:
          type:
            - string
            - 'null'
          description: Harmonised System (HS) code for customs classification.
        cnk:
          type:
            - string
            - 'null'
          description: CNK (Classificatie Nummer Kode) code. Always 7 digits.
        udi:
          type:
            - string
            - 'null'
          description: UDI (Unique Device Identification) code.
        nut:
          type:
            - string
            - 'null'
          description: NUT notification number.
        ctiExtended:
          type:
            - string
            - 'null'
          description: Extended CTI code.
        nameCti:
          type:
            - string
            - 'null'
          description: Grouping-by-name number (nameCti).
        conservation:
          type:
            - string
            - 'null'
          enum:
            - room
            - refrigerator
            - fresh
            - frozen
            - null
          description: Conservation type for the product.
        conservationLabel:
          $ref: '#/components/schemas/LocalizedString'
          description: Localized description of the conservation type.
        conservationMin:
          $ref: '#/components/schemas/TemperatureRange'
          description: Minimum conservation temperature.
        conservationMax:
          $ref: '#/components/schemas/TemperatureRange'
          description: Maximum conservation temperature.
        vat:
          type:
            - number
            - 'null'
          description: Rate of VAT as a decimal (e.g. 0.06 for 6%).
        publicPrice:
          type:
            - integer
            - 'null'
          description: Public price including VAT (in euro cents).
        manufacturerPrice:
          type:
            - integer
            - 'null'
          description: Catalog price from the manufacturer excluding VAT (in euro cents).
        pharmacistPrice:
          type:
            - integer
            - 'null'
          description: Purchase price for the pharmacist via wholesaler excluding VAT (in euro cents).
        refundValueWithOmnio:
          type:
            - integer
            - 'null'
          description: Amount the patient pays under the standard reimbursement regime, including VAT (in euro cents).
        refundValueWithoutOmnio:
          type:
            - integer
            - 'null'
          description: Amount the patient pays under increased reimbursement, including VAT (in euro cents).
        weight:
          type:
            - integer
            - 'null'
          deprecated: true
          description: 'Deprecated: use `weightWithUnit` instead. Weight in grams.'
        weightWithUnit:
          $ref: '#/components/schemas/DimensionWithUnit'
          description: Product weight with unit.
        width:
          type:
            - integer
            - 'null'
          deprecated: true
          description: 'Deprecated: use `widthWithUnit` instead. Width in millimeters.'
        widthWithUnit:
          $ref: '#/components/schemas/DimensionWithUnit'
          description: Product width with unit.
        length:
          type:
            - integer
            - 'null'
          deprecated: true
          description: 'Deprecated: use `lengthWithUnit` instead. Length in millimeters.'
        lengthWithUnit:
          $ref: '#/components/schemas/DimensionWithUnit'
          description: Product length with unit.
        depth:
          type:
            - integer
            - 'null'
          deprecated: true
          description: 'Deprecated: use `depthWithUnit` instead. Depth in millimeters.'
        depthWithUnit:
          $ref: '#/components/schemas/DimensionWithUnit'
          description: Product depth with unit.
        packageContent:
          type:
            - string
            - 'null'
          description: Package content description.
        packageQuantity:
          type:
            - integer
            - 'null'
          description: Number of items in the package.
        packagingUnit:
          type:
            - string
            - 'null'
          description: Unit of packaging (e.g. "piece", "ml").
        atc:
          type:
            - string
            - 'null'
          deprecated: true
          description: 'Deprecated: use `atcCategory` instead.'
        atcCategory:
          type: array
          items:
            type: string
          description: ATC (Anatomical Therapeutic Chemical) category codes associated with this product.
        notApplicableField:
          type: array
          items:
            type: string
          description: Fields that are not applicable to this product.
        galenicShapes:
          type: array
          description: Galenic shapes associated with this product.
          items:
            type: object
            properties:
              id:
                type: string
                description: Galenic shape code.
              parent:
                type:
                  - string
                  - 'null'
                description: Parent galenic shape code, or null for root shapes.
              name:
                $ref: '#/components/schemas/LocalizedString'
        apbCategory:
          type: array
          description: APB categories this product belongs to.
          items:
            type: object
            properties:
              id:
                type: string
                description: APB category code.
              name:
                $ref: '#/components/schemas/LocalizedString'
        bcfiCategory:
          type: array
          description: BCFI categories this product belongs to.
          items:
            type: object
            properties:
              id:
                type: string
                description: BCFI category identifier.
              parent:
                type:
                  - string
                  - 'null'
                description: Parent category identifier.
              order:
                type: integer
                description: Sort order within siblings.
              name:
                $ref: '#/components/schemas/LocalizedString'
              meta:
                $ref: '#/components/schemas/EntityMeta'
        supplyProblems:
          type: array
          description: Active or past supply problems for this product.
          items:
            type: object
            properties:
              fromDate:
                $ref: '#/components/schemas/UnixTimestamp'
                description: Start date of the supply problem.
              endDate:
                $ref: '#/components/schemas/UnixTimestamp'
                description: Expected availability date.
              reason:
                type:
                  - string
                  - 'null'
                description: Reason for the supply problem.
              impact:
                type:
                  - string
                  - 'null'
                description: Impact of the supply problem.
        endOfCommercializationData:
          type:
            - object
            - 'null'
          description: End-of-commercialization data, or null if not applicable.
          properties:
            fromDate:
              $ref: '#/components/schemas/UnixTimestamp'
              description: Start date of the end of commercialization.
            expectedEndDate:
              type:
                - integer
                - 'null'
              format: unix-time
              description: Expected date when the product would be commercially available again.
            status:
              type:
                - string
                - 'null'
              description: Status of the end of commercialization.
            reason:
              type:
                - string
                - 'null'
              description: Reason for the end of commercialization.
            impact:
              type:
                - string
                - 'null'
              description: Impact of the end of commercialization.
        publicCategories:
          type: array
          items:
            $ref: '#/components/schemas/PublicCategory'
          description: Public categories assigned to this product.
        medipimCategories:
          type: array
          description: |-
            Medipim categories assigned to this product.
            Super admins see all categories including soft-deleted ones; other users see only active categories.
          items:
            $ref: '#/components/schemas/MedipimCategory'
        brands:
          type: array
          description: Brands associated with this product.
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                $ref: '#/components/schemas/LocalizedString'
              meta:
                $ref: '#/components/schemas/EntityMeta'
        productFamily:
          type: array
          description: Product families associated with this product.
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                $ref: '#/components/schemas/LocalizedString'
              meta:
                $ref: '#/components/schemas/EntityMeta'
        organizations:
          type: array
          description: Organizations associated with this product.
          items:
            $ref: '#/components/schemas/Organization'
        activeIngredients:
          type: array
          description: Active ingredients in this product.
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                $ref: '#/components/schemas/LocalizedString'
              meta:
                $ref: '#/components/schemas/EntityMeta'
        allowedSpecies:
          type: array
          description: Target species the product is intended for.
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                $ref: '#/components/schemas/LocalizedString'
        attributes:
          type: array
          deprecated: true
          description: 'Deprecated: use `colors`, `dietaryRestrictions`, or `galenicShapes` instead.'
          items:
            type: object
        dietaryRestrictions:
          type: array
          description: Dietary restrictions associated with this product.
          items:
            $ref: '#/components/schemas/DietaryRestriction'
        colors:
          type: array
          description: Colors associated with this product.
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/ColorId'
              name:
                $ref: '#/components/schemas/LocalizedString'
        deleted:
          type: boolean
          description: Whether the product has been soft-deleted.
        photos:
          type: array
          description: |-
            Product photos sorted by photo type then visible sides. Each photo includes a 1-based `displayOrder`
            indicating the intended display position.
          items:
            $ref: '#/components/schemas/ProductPhoto'
        frontals:
          type: array
          description: |-
            Frontal images for this product. Each frontal includes a 1-based `displayOrder`
            independent from the photos sequence.
          items:
            $ref: '#/components/schemas/ProductFrontal'
        links:
          type: array
          description: Media links associated with this product.
          items:
            $ref: '#/components/schemas/RelatedResource'
        descriptions:
          type: array
          description: Descriptions for this product.
          items:
            type: object
            properties:
              id:
                type: integer
              locales:
                type: array
                items:
                  type: string
                description: Languages for which this description is suitable.
              targetGroups:
                type: array
                items:
                  type: string
                description: Target groups for which this description is suitable.
              type:
                type: string
                description: Description type (e.g. usage, indication, composition).
              content:
                $ref: '#/components/schemas/LocalizedString'
                description: The description content in multiple languages.
              meta:
                $ref: '#/components/schemas/EntityMeta'
        leaflets:
          type: array
          description: Leaflets (PIL, SPC) for this product.
          items:
            type: object
            properties:
              id:
                type: integer
              locales:
                type: array
                items:
                  type: string
                description: Languages for which the leaflet is suitable.
              type:
                type: string
                enum:
                  - pil
                  - spc
                description: Leaflet type.
              url:
                $ref: '#/components/schemas/LocalizedString'
                description: Localized URLs of the leaflet document.
              meta:
                $ref: '#/components/schemas/EntityMeta'
        meta:
          type: object
          description: Product metadata.
          properties:
            createdAt:
              $ref: '#/components/schemas/UnixTimestamp'
              description: When the product was added to Medipim.
            updatedAt:
              $ref: '#/components/schemas/UnixTimestamp'
              description: Last time the product was modified (including media changes).
            embedUrl:
              type: string
              format: uri
              description: Pre-signed link to the embed endpoint. Valid for a few hours only.
            publicPageUrl:
              type: string
              format: uri
              description: URL of the public product page on Medipim. Valid for 6 months.
    PaginatedProductResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: integer
              description: |-
                The total number of products matching the query, capped at 10,000.
                If the actual total exceeds 10,000, this will show 10,000 and `totalExceedsLimit` will be `true`.
              examples:
                - 10000
            totalExceedsLimit:
              type: boolean
              description: |-
                Indicates that the total number of matching products exceeds the pagination limit of 10,000.
                When `true`, you cannot retrieve all matching products using this endpoint.
                **Use the `/products/stream` endpoint instead to get all results.**
              examples:
                - true
            page:
              type: object
              properties:
                'no':
                  type: integer
                  description: Current page number (0-based)
                  examples:
                    - 0
                offset:
                  type: integer
                  description: Current offset in results
                  examples:
                    - 0
                size:
                  type: integer
                  description: Page size
                  examples:
                    - 250
        results:
          type: array
          items:
            $ref: '#/components/schemas/Product'
    ProductDescription:
      type: object
      properties:
        id:
          type: integer
          description: Medipim description ID.
        locales:
          type: array
          items:
            $ref: '#/components/schemas/ContentLocale'
          description: Locales this description applies to.
        targetGroups:
          type: array
          items:
            type: string
            enum:
              - public
              - pharmacist
              - doctor
              - homecare
              - hospital
              - nurse
              - physiotherapist
              - webshop
          description: Target groups this description is intended for.
        type:
          type: string
          enum:
            - full_description
            - faq
            - measurements
            - legal_text
            - indication
            - contra_indication
            - usage
            - usage_extended
            - composition
            - properties
            - side_effects
            - nutritional_value
            - usage_type
            - pregnancy_description
            - pregnancy_description_extended
            - breastfeeding_description
            - breastfeeding_description_extended
            - interactions
            - warnings
            - keywords
          description: Description type.
        content:
          type: object
          additionalProperties:
            type: string
          description: Localized HTML content keyed by locale.
        descriptionTag:
          type: string
          description: Tag identifying the description variant.
        meta:
          type: object
          properties:
            createdAt:
              $ref: '#/components/schemas/UnixTimestamp'
            updatedAt:
              $ref: '#/components/schemas/UnixTimestamp'
      example:
        id: 123
        locales:
          - en
        targetGroups:
          - public
        type: full_description
        content:
          en: <p>Product description in English</p>
        descriptionTag: default
        meta:
          createdAt: 1700000000
          updatedAt: 1700000100
    MediaItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        mediaType:
          type: string
          examples:
            - image
            - document
        locales:
          type: array
          items:
            type: string
          examples:
            - - nl_BE
              - fr_FR
        photoType:
          type: string
          examples:
            - packshot
        visibleSides:
          type: array
          items:
            type: string
          examples:
            - - front
              - back
        hasTransparency:
          type: boolean
          description: Indicates if the media item has transparency.
        original:
          type: string
          format: uri
          examples:
            - https://cdn.internal/media_items/123e4567-e89b-12d3-a456-426614174000/original.jpg
        isCentralised:
          type: boolean
          description: Indicates if the media item is stored in a central repository.
          examples:
            - true
            - false
        products:
          type: array
          items:
            $ref: '#/components/schemas/RelatedResource'
    MediaPropertyFilter:
      description: A single property filter for media items. Exactly one key per object.
      anyOf:
        - title: ProductFilter
          type: object
          required:
            - product
          description: Matches media items linked to the given product.
          properties:
            product:
              type: string
              pattern: ^M[0-9A-Z]{9}$
              description: Medipim product ID.
          additionalProperties: false
          examples:
            - product: MEE370408E
        - title: TypeFilter
          type: object
          required:
            - type
          description: Matches media items of the given type.
          properties:
            type:
              type: string
              enum:
                - photo
                - frontal
                - link
          additionalProperties: false
          examples:
            - type: photo
        - title: PhotoTypeFilter
          type: object
          required:
            - photoType
          description: Matches photos of the given sub-type.
          properties:
            photoType:
              type: string
              enum:
                - packshot
                - productshot
                - lifestyle_image
                - pillshot
          additionalProperties: false
          examples:
            - photoType: packshot
        - title: OrganizationFilter
          type: object
          required:
            - organization
          description: Matches media items owned by the given organization.
          properties:
            organization:
              type: string
              format: uuid
              description: Organization ID.
          additionalProperties: false
        - title: BrandFilter
          type: object
          required:
            - brand
          description: Matches media items linked to the given brand(s).
          properties:
            brand:
              oneOf:
                - type: string
                  format: uuid
                  description: Single brand ID.
                - type: array
                  items:
                    type: string
                    format: uuid
                  description: Array of brand IDs (match any).
          additionalProperties: false
        - title: ProductFamilyFilter
          type: object
          required:
            - productFamily
          description: Matches media items linked to the given product family/families.
          properties:
            productFamily:
              oneOf:
                - type: string
                  format: uuid
                  description: Single product family ID.
                - type: array
                  items:
                    type: string
                    format: uuid
                  description: Array of product family IDs (match any).
          additionalProperties: false
        - title: LocaleFilter
          type: object
          required:
            - locale
          description: Matches media items tagged with the given locale(s). The alias `language` is also accepted.
          properties:
            locale:
              oneOf:
                - $ref: '#/components/schemas/ContentLocale'
                - type: array
                  items:
                    $ref: '#/components/schemas/ContentLocale'
                  description: Array of locales (match any).
          additionalProperties: false
        - title: VisibleSidesFilter
          type: object
          required:
            - visibleSides
          description: Matches photos showing the given visible side(s).
          properties:
            visibleSides:
              oneOf:
                - type: string
                  enum:
                    - front
                    - left
                    - right
                    - back
                    - bottom
                    - top
                - type: array
                  items:
                    type: string
                    enum:
                      - front
                      - left
                      - right
                      - back
                      - bottom
                      - top
                  description: Array of visible sides (match any).
          additionalProperties: false
        - title: TargetGroupFilter
          type: object
          required:
            - targetGroup
          description: Matches media items assigned to the given target group(s).
          properties:
            targetGroup:
              oneOf:
                - type: string
                  description: Single target group.
                - type: array
                  items:
                    type: string
                  description: Array of target groups (match any).
          additionalProperties: false
        - title: PublishedFilter
          type: object
          required:
            - published
          description: Matches media items by publication status.
          properties:
            published:
              type: boolean
          additionalProperties: false
          examples:
            - published: true
        - title: DeletedFilter
          type: object
          required:
            - deleted
          description: Matches media items by deletion status.
          properties:
            deleted:
              type: boolean
          additionalProperties: false
          examples:
            - deleted: false
        - title: HasLinkedProductsFilter
          type: object
          required:
            - hasLinkedProducts
          description: Matches media items that are (or are not) linked to at least one product.
          properties:
            hasLinkedProducts:
              type: boolean
          additionalProperties: false
        - title: AvailableFilter
          type: object
          required:
            - available
          description: Matches media items that are currently available (not expired or embargoed).
          properties:
            available:
              type: boolean
          additionalProperties: false
        - title: FrontalAvailableFilter
          type: object
          required:
            - frontalAvailable
          description: Matches media items that have (or do not have) a frontal image.
          properties:
            frontalAvailable:
              type: boolean
          additionalProperties: false
        - title: IsCentralisedFilter
          type: object
          required:
            - isPartOfCentralisedMediaItem
          description: Matches media items that are (or are not) part of a centralised media item.
          properties:
            isPartOfCentralisedMediaItem:
              type: boolean
          additionalProperties: false
        - title: CreatedAtFilter
          type: object
          required:
            - createdAt
          description: Matches media items created within a given time range. The alias `createdSince` is also accepted.
          properties:
            createdAt:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
          examples:
            - createdAt: 1712345678
        - title: TouchedAtFilter
          type: object
          required:
            - touchedAt
          description: Matches media items last modified within a given time range.
          properties:
            touchedAt:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
          examples:
            - touchedAt:
                from: 1712345678
        - title: UpdatedSinceFilter
          type: object
          required:
            - updatedSince
          description: Alias for `touchedAt`. Matches media items last modified within a given time range.
          properties:
            updatedSince:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
          examples:
            - updatedSince: 1712345678
        - title: SearchFilter
          type: object
          required:
            - search
          description: Full-text search across media item metadata.
          properties:
            search:
              type: object
              required:
                - query
                - locale
              properties:
                query:
                  type: string
                  description: Search query string.
                locale:
                  $ref: '#/components/schemas/ContentLocale'
          additionalProperties: false
          examples:
            - search:
                query: packshot
                locale: en
    MediaFilter:
      description: Filter object with exactly one key. Either a **property filter** (e.g. product, type, photoType, organization, brand, productFamily, locale, visibleSides, targetGroup, published, deleted, hasLinkedProducts, available, frontalAvailable, isPartOfCentralisedMediaItem, createdAt, touchedAt / updatedSince, search) or a **compound filter** with key `and` (array of filter objects, all must match), `or` (array of filter objects, at least one must match), or `not` (single filter object to negate).
      oneOf:
        - $ref: '#/components/schemas/MediaPropertyFilter'
        - title: AndFilter
          type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/MediaFilter'
              description: All filters must match.
          additionalProperties: false
        - title: OrFilter
          type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/MediaFilter'
              description: At least one filter must match.
          additionalProperties: false
        - title: NotFilter
          type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/MediaFilter'
              description: Negate the given filter.
          additionalProperties: false
    MediaSortOption:
      description: Sort order for media items. Each sort option is an object with exactly one key.
      oneOf:
        - title: Sort by name
          description: |-
            Sort by the translated media item name. Requires a direction and a locale to determine which translation to sort on.

            Example: `{"name": {"direction": "ASC", "locale": "nl"}}`
          type: object
          required:
            - name
          properties:
            name:
              type: object
              required:
                - direction
                - locale
              properties:
                direction:
                  type: string
                  enum:
                    - ASC
                    - DESC
                locale:
                  allOf:
                    - $ref: '#/components/schemas/ContentLocale'
                    - description: Language of the media item name to sort on.
          additionalProperties: false
        - title: Sort by field
          description: |-
            Sort by a scalar media field. The key is the field name and the value is the direction (`ASC` or `DESC`).

            Allowed fields: `id`, `createdAt`, `touchedAt`.

            Example: `{"createdAt": "DESC"}` or `{"id": "ASC"}`
          type: object
          minProperties: 1
          maxProperties: 1
          additionalProperties:
            type: string
            enum:
              - ASC
              - DESC
          examples:
            - createdAt: DESC
      examples:
        - id: ASC
    PublicCategoryTreeCategory:
      allOf:
        - $ref: '#/components/schemas/PublicCategory'
        - type: object
          properties:
            children:
              type: array
              items:
                $ref: '#/components/schemas/PublicCategoryTreeCategory'
    MedipimCategoryPropertyFilter:
      type: object
      description: Filter Medipim categories by a single property.
      oneOf:
        - properties:
            id:
              type: string
              description: Match by Medipim category identifier.
          required:
            - id
        - properties:
            parent:
              type: string
              description: Match by parent category identifier.
          required:
            - parent
        - properties:
            search:
              type: object
              properties:
                query:
                  type: string
                  description: Search term to match against category names.
                locale:
                  type: string
                  description: Locale to search in (e.g. "en", "nl", "fr", "de").
              required:
                - query
                - locale
          required:
            - search
        - properties:
            deleted:
              type: boolean
              description: Filter by deleted status.
          required:
            - deleted
    MedipimCategoryFilter:
      description: A filter expression for Medipim categories. Can be a property filter or a logical combinator (`and`, `or`, `not`).
      oneOf:
        - $ref: '#/components/schemas/MedipimCategoryPropertyFilter'
        - type: object
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/MedipimCategoryFilter'
          required:
            - and
        - type: object
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/MedipimCategoryFilter'
          required:
            - or
        - type: object
          properties:
            not:
              $ref: '#/components/schemas/MedipimCategoryFilter'
          required:
            - not
    MedipimCategoryTreeNode:
      description: A Medipim category with its children nested recursively.
      allOf:
        - $ref: '#/components/schemas/MedipimCategory'
        - type: object
          properties:
            children:
              type: array
              description: Child categories nested under this category.
              items:
                $ref: '#/components/schemas/MedipimCategoryTreeNode'
    BcfiCategory:
      type: object
      properties:
        id:
          type: string
          description: Unique BCFI category identifier.
          example: '0000018'
        parent:
          type: string
          nullable: true
          description: ID of the parent BCFI category, or `null` for top-level categories.
          example: '0000001'
        order:
          type: integer
          description: Sort order within the parent category.
          example: 3
        name:
          type: object
          description: Localized name of the category.
          properties:
            nl:
              type: string
              nullable: true
            fr:
              type: string
              nullable: true
            en:
              type: string
              nullable: true
            de:
              type: string
              nullable: true
          example:
            nl: Analgetica
            fr: Analgésiques
            en: Analgesics
            de: null
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              description: When the category was created (unix timestamp).
            updatedAt:
              type: integer
              description: When the category was last updated (unix timestamp).
    FineLineCategory:
      type: object
      properties:
        id:
          type: string
          description: Unique fine-line category identifier.
          example: '123'
        parent:
          type:
            - string
            - 'null'
          description: ID of the parent fine-line category, or `null` for top-level categories.
          example: '10'
        name:
          type: object
          description: Localized name of the category.
          properties:
            en:
              type: string
              nullable: true
          example:
            en: Pain Relief
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              description: When the category was created (unix timestamp).
            updatedAt:
              type: integer
              description: When the category was last updated (unix timestamp).
    Update:
      type: object
      properties:
        id:
          type: string
          description: Unique update identifier.
          example: '456'
        type:
          type: string
          enum:
            - product
            - organization
            - public_category
            - brand
          description: The sub-type of the update, indicating what kind of entity it relates to.
          example: product
        organization:
          type: string
          description: ID of the organization that published this update.
          example: '123'
        title:
          type: object
          description: Localized title of the update.
          example:
            en: New product launched
        content:
          type: object
          description: Content of the update.
          properties:
            shortDescription:
              type: object
              description: Localized short description.
              example:
                en: A brief summary of the update.
            description:
              type: object
              description: Localized full description (may contain HTML).
              example:
                en: <p>Full details about the update.</p>
            media:
              type: array
              description: Media items attached to this update (images in various formats).
              items:
                type: object
                properties:
                  url:
                    type: string
                    description: URL of the media file.
                  type:
                    type: string
                    description: |-
                      The media format. Possible values: `no_format`, `landscape_16_9`,
                      `portrait_9_16`, `square_250x250`, `small_square_200x200`,
                      `banner_468x60`, `leaderboard_728x90`, `inline_rectangle_300x250`,
                      `large_rectangle_336x280`, `skyscraper_120x600`, `wide_skyscraper_160x600`,
                      `half_page_ad_300x600`, `large_leaderboard_970x90`.
                    enum:
                      - no_format
                      - landscape_16_9
                      - portrait_9_16
                      - square_250x250
                      - small_square_200x200
                      - banner_468x60
                      - leaderboard_728x90
                      - inline_rectangle_300x250
                      - large_rectangle_336x280
                      - skyscraper_120x600
                      - wide_skyscraper_160x600
                      - half_page_ad_300x600
                      - large_leaderboard_970x90
        locales:
          type: array
          description: List of locales that this update is available in.
          items:
            type: string
          example:
            - en
        products:
          type: array
          description: Associated product IDs. Only present for manual updates with sub-type `product`.
          items:
            type: string
        brands:
          type: array
          description: Associated brand IDs. Only present for manual updates with sub-type `brand`.
          items:
            type: string
        categories:
          type: array
          description: Associated public category IDs. Only present for manual updates with sub-type `public_category`.
          items:
            type: string
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              description: When the update was created (unix timestamp).
            updatedAt:
              type: integer
              description: When the update was last modified (unix timestamp).
    OrganizationPropertyFilter:
      description: A property filter. The object must contain exactly one key; that key must be one of the following. Multiple keys (e.g. id and public together) are invalid; use an `and` filter to combine conditions.
      oneOf:
        - title: organizationIdFilter
          type: object
          required:
            - id
          properties:
            id:
              oneOf:
                - type: integer
                  description: Organization ID.
                - type: array
                  items:
                    type: integer
                  description: Organization IDs (match any).
          additionalProperties: false
        - title: organizationTypeFilter
          type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - supplier
                - marketing
                - medical_professional
                - other
              description: Organization type.
          additionalProperties: false
        - title: organizationNameFilter
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: Organization name.
          additionalProperties: false
        - title: SearchFilter
          type: object
          required:
            - search
          properties:
            search:
              type: string
              description: Search in name and identifiers.
          additionalProperties: false
        - title: searchNameFilter
          type: object
          required:
            - searchName
          properties:
            searchName:
              type: string
              description: Search in name.
          additionalProperties: false
        - title: specializationsFilter
          type: object
          required:
            - specializations
          properties:
            specializations:
              type: array
              items:
                type: integer
              description: List of public category IDs to filter by specialization. The organization must have at least one of these specializations.
          additionalProperties: false
        - title: publicFilter
          type: object
          required:
            - public
          properties:
            public:
              type: boolean
              description: Whether the organization is public or non-public. Non-public organizations are only visible to users with the appropriate permissions.
          additionalProperties: false
        - title: sysId
          type: object
          required:
            - sysId
          properties:
            sysId:
              type: string
              description: Some organizations are 'system' organizations. Those have a special string identifier based on their name.
          additionalProperties: false
        - title: externalId
          type: object
          required:
            - externalId
          properties:
            externalId:
              type: string
              description: External identifier.
          additionalProperties: false
        - title: createdByFilter
          type: object
          required:
            - createdBy
          properties:
            createdBy:
              type: integer
              description: User ID of creator.
          additionalProperties: false
        - title: resellerId
          type: object
          required:
            - resellerId
          properties:
            resellerId:
              type: string
              description: Reseller organization ID.
          additionalProperties: false
      examples:
        - type: supplier
    OrganizationFilter:
      description: Filter object with exactly one key. Either a property filter (one of id, type, name, etc.) or a compound filter with key `and` (array of filter objects, all must match) or `or` (array of filter objects, at least one must match). Each element in an and/or array has the same structure.
      oneOf:
        - $ref: '#/components/schemas/OrganizationPropertyFilter'
        - title: and
          type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationPropertyFilter'
              description: All of these filters must match.
          additionalProperties: false
        - title: or
          type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationPropertyFilter'
              description: At least one of these filters must match.
          additionalProperties: false
    OrganizationSortOption:
      description: A single sort clause. Exactly one of id, name, or city with value ASC or DESC.
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - name
          properties:
            name:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - city
          properties:
            city:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
      examples:
        - name: ASC
    PaginatedOrganizationResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: integer
              description: Total number of organizations matching the query.
            totalExceedsLimit:
              type: boolean
              description: True if the total exceeds the pagination limit.
            page:
              type: object
              properties:
                'no':
                  type: integer
                  description: Current page number (0-based)
                offset:
                  type: integer
                  description: Current offset in results
                size:
                  type: integer
                  description: Page size
        results:
          type: array
          items:
            $ref: '#/components/schemas/Organization'
    OrganizationSubscriptionData:
      type: object
      description: Subscription check result for organizations matching a filter.
      properties:
        organization:
          type: string
          description: Organization ID.
        name:
          type: string
          description: Organization name.
        activeSubscriptions:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              name:
                type: string
              start:
                type: integer
                format: unix-time
              end:
                type: integer
                format: unix-time
        apiKeys:
          type: array
          description: API keys associated with the organization.
    BrandPropertyFilter:
      description: A single property filter. Exactly one key per object.
      oneOf:
        - type: object
          required:
            - search
          properties:
            search:
              type: string
              description: Search in brand name.
          additionalProperties: false
        - type: object
          required:
            - id
          properties:
            id:
              oneOf:
                - type: integer
                  description: Single brand ID.
                - type: array
                  items:
                    type: integer
                  description: Brand IDs (match any).
          additionalProperties: false
        - type: object
          required:
            - in
          properties:
            in:
              oneOf:
                - type: integer
                  description: Single brand ID.
                - type: array
                  items:
                    type: integer
                  description: Brand IDs (match any).
          additionalProperties: false
        - type: object
          required:
            - assignable
          properties:
            assignable:
              type: boolean
              description: Filter by brands assignable to the authenticated user's organization.
          additionalProperties: false
        - type: object
          required:
            - deleted
          properties:
            deleted:
              type: boolean
              description: Include or exclude pre-deleted (soft-deleted) brands.
          additionalProperties: false
    BrandFilter:
      description: Filter object with exactly one key. Either a property filter (search, id, in, assignable, deleted) or a compound filter with key `and` (array of filter objects, all must match) or `or` (array of filter objects, at least one must match) or `not` (single filter object to negate).
      oneOf:
        - $ref: '#/components/schemas/BrandPropertyFilter'
        - type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/BrandFilter'
              description: All of these filters must match.
          additionalProperties: false
        - type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/BrandFilter'
              description: At least one of these filters must match.
          additionalProperties: false
        - type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/BrandPropertyFilter'
              description: Negate this filter.
          additionalProperties: false
    BrandSortOption:
      description: A single sort clause. Exactly one of id, name, or product_count with value ASC or DESC.
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - name
          properties:
            name:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - product_count
          properties:
            product_count:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
    Brand:
      type: object
      description: A brand (manufacturer or label) associated with products.
      properties:
        id:
          type: integer
          description: Brand ID.
        name:
          type: string
          description: Brand name.
        logo:
          type:
            - string
            - 'null'
          format: uri
          description: URL of the brand logo, or null if no logo is set.
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              format: unix-time
              description: Creation timestamp.
            updatedAt:
              type: integer
              format: unix-time
              description: Last update timestamp.
    PaginatedBrandResponse:
      type: object
      description: Paginated list of brands.
      properties:
        meta:
          type: object
          properties:
            total:
              type: integer
              description: Total number of brands matching the query.
            totalExceedsLimit:
              type: boolean
              description: True if the total exceeds the pagination limit (when applicable).
            page:
              type: object
              properties:
                'no':
                  type: integer
                  description: Current page number (0-based).
                offset:
                  type: integer
                  description: Current offset in results.
                size:
                  type: integer
                  description: Page size.
        results:
          type: array
          items:
            $ref: '#/components/schemas/Brand'
    DietaryRestrictionPropertyFilter:
      description: A single property filter for dietary restrictions. Exactly one key per object.
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              oneOf:
                - $ref: '#/components/schemas/DietaryRestrictionId'
                - type: array
                  items:
                    $ref: '#/components/schemas/DietaryRestrictionId'
                  description: Dietary restriction IDs (match any).
          additionalProperties: false
    DietaryRestrictionFilter:
      description: Filter object with exactly one key. Either a property filter (`id` – single dietary restriction ID or array of IDs, match any) or a compound filter with key `and` (array of filter objects, all must match), `or` (array of filter objects, at least one must match), or `not` (single filter object to negate).
      oneOf:
        - $ref: '#/components/schemas/DietaryRestrictionPropertyFilter'
        - type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/DietaryRestrictionPropertyFilter'
              description: All of these filters must match.
          additionalProperties: false
        - type: object
          required:
            - or
          properties:
            or:
              type: array
              description: At least one of these filters must match.
          additionalProperties: false
        - type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/DietaryRestrictionPropertyFilter'
              description: Negate this filter.
          additionalProperties: false
    UserPropertyFilter:
      description: A property filter for users. The object must contain exactly one key. Multiple keys are invalid; use an `and` filter to combine conditions.
      anyOf:
        - title: UserIdFilter
          type: object
          required:
            - id
          properties:
            id:
              oneOf:
                - type: integer
                  description: Single user ID.
                - type: array
                  items:
                    type: integer
                  description: User IDs (match any).
          additionalProperties: false
        - title: OrganizationFilter
          type: object
          required:
            - organization
          properties:
            organization:
              type: string
              description: Organization ID. Matches users belonging to this organization.
          additionalProperties: false
        - title: StatusFilter
          type: object
          required:
            - status
          description: |-
            Matches users by active status. A user is considered active when they are enabled **and** have an active subscription.
            Set to `true` to match active users, `false` to match inactive users.
          properties:
            status:
              type: boolean
          additionalProperties: false
          examples:
            - status: true
        - title: HasOrganizationFilter
          type: object
          required:
            - hasOrganization
          description: Matches users that belong to an organization (true) or are unaffiliated (false).
          properties:
            hasOrganization:
              type: boolean
          additionalProperties: false
          examples:
            - hasOrganization: true
        - title: HasApiKeyFilter
          type: object
          required:
            - hasApiKey
          description: Matches users that have an API key (true) or do not (false).
          properties:
            hasApiKey:
              type: boolean
          additionalProperties: false
          examples:
            - hasApiKey: true
        - title: PolicyFilter
          type: object
          required:
            - policy
          description: Matches users by assigned policy.
          properties:
            policy:
              oneOf:
                - type: string
                  description: Single policy ID.
                - type: array
                  items:
                    type: string
                  description: Policy IDs (match any).
          additionalProperties: false
        - title: RoleFilter
          type: object
          required:
            - role
          description: Matches users by role.
          properties:
            role:
              oneOf:
                - type: string
                  enum:
                    - super_admin
                    - admin
                    - organization_manager
                    - organization_customer_service
                    - medical_professional
                    - software_developer
                    - reseller
                    - demo
                  description: Single role.
                - type: array
                  items:
                    type: string
                    enum:
                      - super_admin
                      - admin
                      - organization_manager
                      - organization_customer_service
                      - medical_professional
                      - software_developer
                      - reseller
                      - demo
                  description: Roles (match any).
          additionalProperties: false
          examples:
            - role: organization_manager
            - role:
                - organization_manager
                - admin
        - title: TargetGroupFilter
          type: object
          required:
            - targetGroup
          description: Matches users by target group.
          properties:
            targetGroup:
              type: string
              enum:
                - public
                - pharmacist
                - doctor
                - homecare
                - hospital
                - nurse
                - physiotherapist
                - webshop
              description: Target group.
          additionalProperties: false
          examples:
            - targetGroup: pharmacist
        - title: HasSubscriptionFilter
          type: object
          required:
            - hasSubscription
          description: Matches users that have a subscription (true) or do not (false).
          properties:
            hasSubscription:
              type: boolean
          additionalProperties: false
          examples:
            - hasSubscription: true
        - title: SubscriptionTypeFilter
          type: object
          required:
            - subscriptionType
          description: Matches users by subscription type.
          properties:
            subscriptionType:
              type: integer
              description: Subscription type ID.
          additionalProperties: false
          examples:
            - subscriptionType: 1
        - title: SubscriptionEndFilter
          type: object
          required:
            - subscriptionEnd
          description: Matches users whose subscription ends within a given time range.
          properties:
            subscriptionEnd:
              type: object
              properties:
                from:
                  type: integer
                  format: unix-time
                  description: Matches users whose subscription ends on or after this timestamp.
                until:
                  type: integer
                  format: unix-time
                  description: Matches users whose subscription ends before this timestamp.
          additionalProperties: false
          examples:
            - subscriptionEnd:
                from: 1704063600
                until: 1735686000
        - title: PublicFilter
          type: object
          required:
            - public
          description: Matches users whose organization is public (true) or non-public (false).
          properties:
            public:
              type: boolean
          additionalProperties: false
          examples:
            - public: true
        - title: VatNrFilter
          type: object
          required:
            - vatNr
          description: Matches users whose organization has the given VAT number.
          properties:
            vatNr:
              type: string
              description: VAT number.
          additionalProperties: false
          examples:
            - vatNr: BE0123456789
        - title: CreatedByFilter
          type: object
          required:
            - createdBy
          description: Matches users created by a specific user.
          properties:
            createdBy:
              type: integer
              description: User ID of the creator.
          additionalProperties: false
        - title: ResellerIdFilter
          type: object
          required:
            - resellerId
          description: Matches users whose organization has a specific reseller.
          properties:
            resellerId:
              type: string
              description: Reseller organization ID.
          additionalProperties: false
        - title: HasPoliciesFilter
          type: object
          required:
            - hasPolicies
          description: Matches users that have policies assigned (true) or not (false).
          properties:
            hasPolicies:
              type: boolean
          additionalProperties: false
          examples:
            - hasPolicies: true
        - title: HasRoleFilter
          type: object
          required:
            - hasRole
          description: Matches users that have a role assigned (true) or not (false).
          properties:
            hasRole:
              type: boolean
          additionalProperties: false
          examples:
            - hasRole: true
    UserFilter:
      description: Filter object with exactly one key. Either a property filter (one of id, organization, status, etc.) or a compound filter with key `and` (array of filter objects, all must match), `or` (array of filter objects, at least one must match), or `not` (single filter object to negate).
      oneOf:
        - $ref: '#/components/schemas/UserPropertyFilter'
        - title: AndFilterOperator
          type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/UserPropertyFilter'
              description: All of these filters must match.
          additionalProperties: false
        - title: OrFilterOperator
          type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/UserPropertyFilter'
              description: At least one of these filters must match.
          additionalProperties: false
        - title: NotFilterOperator
          type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/UserPropertyFilter'
              description: Negate this filter.
          additionalProperties: false
    UserSortOption:
      description: A single sort clause. Exactly one of id, name, email, status, organization, or createdAt with value ASC or DESC.
      oneOf:
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - name
          properties:
            name:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - email
          properties:
            email:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - organization
          properties:
            organization:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - createdAt
          properties:
            createdAt:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
      examples:
        - name: ASC
    User:
      type: object
      description: A user account on the platform.
      properties:
        id:
          type: integer
          description: User ID.
          examples:
            - 42
        name:
          type: string
          description: Full name of the user.
          examples:
            - Jane Doe
        organization:
          type:
            - integer
            - 'null'
          description: ID of the organization the user belongs to, or null if unaffiliated.
          examples:
            - 123
        meta:
          type: object
          properties:
            createdAt:
              type: integer
              format: unix-time
              description: When the user was created.
            updatedAt:
              type: integer
              format: unix-time
              description: Last time the user was modified.
    PaginatedUserResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: integer
              description: Total number of users matching the query.
            totalExceedsLimit:
              type: boolean
              description: True if the total exceeds the pagination limit.
            page:
              type: object
              properties:
                'no':
                  type: integer
                  description: Current page number (0-based)
                offset:
                  type: integer
                  description: Current offset in results
                size:
                  type: integer
                  description: Page size
        results:
          type: array
          items:
            $ref: '#/components/schemas/User'
    SubscriptionTypePropertyFilter:
      description: A property filter for subscription types. The object must contain exactly one key.
      anyOf:
        - title: SubscriptionTypeIdFilter
          type: object
          required:
            - id
          properties:
            id:
              type: integer
              description: Subscription type ID.
          additionalProperties: false
          examples:
            - id: 1
        - title: SubscriptionTypeCodeFilter
          type: object
          required:
            - code
          properties:
            code:
              type: string
              description: Subscription type code.
          additionalProperties: false
          examples:
            - code: pro
    SubscriptionTypeFilter:
      description: Filter object with exactly one key. Either a property filter (one of id, code) or a compound filter with key `and` (array of filter objects, all must match), `or` (array of filter objects, at least one must match), or `not` (single filter object to negate).
      oneOf:
        - $ref: '#/components/schemas/SubscriptionTypePropertyFilter'
        - title: AndFilterOperator
          type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/SubscriptionTypePropertyFilter'
              description: All of these filters must match.
          additionalProperties: false
        - title: OrFilterOperator
          type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/SubscriptionTypePropertyFilter'
              description: At least one of these filters must match.
          additionalProperties: false
        - title: NotFilterOperator
          type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/SubscriptionTypePropertyFilter'
              description: Negate this filter.
          additionalProperties: false
    SubscriptionTypeSortOption:
      description: A single sort clause. Only `id` is supported.
      type: object
      required:
        - id
      properties:
        id:
          type: string
          enum:
            - ASC
            - DESC
      additionalProperties: false
      examples:
        - id: ASC
    SubscriptionType:
      type: object
      description: A subscription type that determines which features and data a user can access.
      properties:
        id:
          type: integer
          description: Subscription type ID.
          examples:
            - 1
        name:
          $ref: '#/components/schemas/LocalizedString'
          description: Localized name of the subscription type.
        code:
          type: string
          description: Unique code identifying the subscription type.
          examples:
            - pro
    PaginatedSubscriptionTypeResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: integer
              description: Total number of subscription types matching the query.
            totalExceedsLimit:
              type: boolean
              description: True if the total exceeds the pagination limit.
            page:
              type: object
              properties:
                'no':
                  type: integer
                  description: Current page number (0-based)
                offset:
                  type: integer
                  description: Current offset in results
                size:
                  type: integer
                  description: Page size
        results:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionType'
    ColorPropertyFilter:
      description: A property filter for colors. The object must contain exactly one key.
      anyOf:
        - title: ColorIdFilter
          type: object
          required:
            - id
          properties:
            id:
              oneOf:
                - $ref: '#/components/schemas/ColorId'
                  description: Single color ID.
                - type: array
                  items:
                    $ref: '#/components/schemas/ColorId'
                  description: Color IDs (match any).
          additionalProperties: false
          examples:
            - id: blue
            - id:
                - blue
                - red
    ColorFilter:
      description: Filter object with exactly one key. Either a property filter (id) or a compound filter with key `and` (array of filter objects, all must match), `or` (array of filter objects, at least one must match), or `not` (single filter object to negate).
      oneOf:
        - $ref: '#/components/schemas/ColorPropertyFilter'
        - title: AndFilterOperator
          type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/ColorPropertyFilter'
              description: All of these filters must match.
          additionalProperties: false
        - title: OrFilterOperator
          type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/ColorPropertyFilter'
              description: At least one of these filters must match.
          additionalProperties: false
        - title: NotFilterOperator
          type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/ColorPropertyFilter'
              description: Negate this filter.
          additionalProperties: false
    Color:
      type: object
      description: A color that can be associated with a product.
      properties:
        id:
          $ref: '#/components/schemas/ColorId'
          description: Color identifier.
        name:
          $ref: '#/components/schemas/LocalizedString'
          description: Localized name of the color.
    CorrectionPropertyFilter:
      description: A property filter for corrections. The object must contain exactly one key.
      anyOf:
        - title: ProductFilter
          type: object
          required:
            - product
          description: Matches corrections by product.
          properties:
            product:
              $ref: '#/components/schemas/MedipimProductId'
              description: Medipim product ID.
          additionalProperties: false
          examples:
            - product: MB08BC0E93
        - title: StatusFilter
          type: object
          required:
            - status
          description: Matches corrections by status.
          properties:
            status:
              type: string
              enum:
                - open
                - in_progress
                - solved
                - closed
          additionalProperties: false
          examples:
            - status: open
        - title: OrganizationFilter
          type: object
          required:
            - organization
          description: Matches corrections by organization.
          properties:
            organization:
              oneOf:
                - type: integer
                  description: Single organization ID.
                - type: array
                  items:
                    type: integer
                  description: Organization IDs (match any).
          additionalProperties: false
          examples:
            - organization: 1
        - title: SearchFilter
          type: object
          required:
            - search
          description: Matches corrections by a text search query.
          properties:
            search:
              type: string
          additionalProperties: false
          examples:
            - search: missing photo
        - title: LocaleFilter
          type: object
          required:
            - locale
          description: Matches corrections by language.
          properties:
            locale:
              oneOf:
                - type: string
                  description: Single locale code.
                - type: array
                  items:
                    type: string
                  description: Locale codes (match any).
          additionalProperties: false
          examples:
            - locale: nl
            - locale:
                - nl
                - fr
        - title: TypeFilter
          type: object
          required:
            - type
          description: Matches corrections by type.
          properties:
            type:
              type: string
              enum:
                - missing_description
                - missing_photo
                - missing_weight_dimensions
                - missing_brand_family
                - missing_category
                - wrong_description
                - wrong_photo
                - wrong_category
                - other
                - product_does_not_exist
          additionalProperties: false
          examples:
            - type: missing_photo
        - title: CreatedByFilter
          type: object
          required:
            - createdBy
          description: Matches corrections created by a specific user.
          properties:
            createdBy:
              type: integer
              description: Medipim user ID.
          additionalProperties: false
          examples:
            - createdBy: 1
        - title: CreatedAtFilter
          type: object
          required:
            - createdAt
          description: Matches corrections created within a given time range.
          properties:
            createdAt:
              $ref: '#/components/schemas/TimestampFilter'
          additionalProperties: false
          examples:
            - createdAt: 1471525605
            - createdAt:
                from: 1471525605
                until: 1571525605
    CorrectionFilter:
      description: Filter object with exactly one key. Either a property filter (one of product, status, organization, search, locale, type, createdBy, createdAt) or a compound filter with key `and` (array of filter objects, all must match), `or` (array of filter objects, at least one must match), or `not` (single filter object to negate).
      oneOf:
        - $ref: '#/components/schemas/CorrectionPropertyFilter'
        - title: AndFilterOperator
          type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/CorrectionPropertyFilter'
              description: All of these filters must match.
          additionalProperties: false
        - title: OrFilterOperator
          type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/CorrectionPropertyFilter'
              description: At least one of these filters must match.
          additionalProperties: false
        - title: NotFilterOperator
          type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/CorrectionPropertyFilter'
              description: Negate this filter.
          additionalProperties: false
    CorrectionSortOption:
      description: A single sort clause. Supported fields are `touchedAt` and `createdAt`.
      oneOf:
        - type: object
          required:
            - touchedAt
          properties:
            touchedAt:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
        - type: object
          required:
            - createdAt
          properties:
            createdAt:
              type: string
              enum:
                - ASC
                - DESC
          additionalProperties: false
      examples:
        - touchedAt: ASC
    Correction:
      type: object
      description: A correction is a feedback request on a product's data, such as a missing photo or wrong description.
      properties:
        id:
          type: integer
          description: Correction ID.
          examples:
            - 1
        product:
          $ref: '#/components/schemas/MedipimProductId'
          description: Medipim ID of the product this correction relates to, or null if not product-specific.
        locale:
          type: string
          description: Language of the correction (locale code, e.g. `nl`, `fr`).
          examples:
            - nl
        type:
          type: string
          enum:
            - missing_description
            - missing_photo
            - missing_weight_dimensions
            - missing_brand_family
            - missing_category
            - wrong_description
            - wrong_photo
            - wrong_category
            - other
            - product_does_not_exist
          description: Type of correction.
        text:
          type:
            - string
            - 'null'
          description: Free-text feedback describing the issue.
        status:
          type: string
          enum:
            - open
            - in_progress
            - solved
            - closed
          description: Current status of the correction.
        meta:
          type: object
          properties:
            createdAt:
              type:
                - integer
                - 'null'
              format: unix-time
              description: When the correction was created.
            updatedAt:
              type:
                - integer
                - 'null'
              format: unix-time
              description: Last time the correction was modified.
    PaginatedCorrectionResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: integer
              description: Total number of corrections matching the query.
            totalExceedsLimit:
              type: boolean
              description: True if the total exceeds the pagination limit.
            page:
              type: object
              properties:
                'no':
                  type: integer
                  description: Current page number (0-based)
                offset:
                  type: integer
                  description: Current offset in results
                size:
                  type: integer
                  description: Page size
        results:
          type: array
          items:
            $ref: '#/components/schemas/Correction'
  responses:
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  status:
                    type: integer
                    const: 401
                  code:
                    type: string
                    const: authentication.not_authenticated
                  message:
                    type: string
                    const: Please provide your API key and secret
    ForbiddenResponse:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  status:
                    type: integer
                    const: 403
                  code:
                    type: string
                    const: authentication.invalid_api_secret
                  message:
                    type: string
                    const: ''
    UnprocessableEntityResponse:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  status:
                    type: integer
                    const: 422
                  code:
                    type: string
                    const: validation_failed
                  message:
                    type: string
                    examples:
                      - 'Unknown filter: string (at `filter`)'
                  violations:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          examples:
                            - Invalid filter syntax (at `filter`)
                        path:
                          type: string
                          examples:
                            - 'Unknown filter: string (at `filter`)'
                        value:
                          type: string
                      required:
                        - message
                        - path
  parameters:
    ProductFindById:
      name: id
      in: query
      schema:
        $ref: '#/components/schemas/MedipimProductId'
      description: Medipim product ID (M followed by 9 alphanumeric characters).
      example: MB08BC0E93
    ProductFindByEanGtin8:
      name: eanGtin8
      in: query
      schema:
        type: string
      description: EAN/GTIN-8 barcode.
      example: '30106659'
    ProductFindByEanGtin12:
      name: eanGtin12
      in: query
      schema:
        type: string
      description: EAN/GTIN-12 barcode.
      example: '357466069012'
    ProductFindByEanGtin13:
      name: eanGtin13
      in: query
      schema:
        type: string
      description: EAN/GTIN-13 barcode.
      example: '3574660696318'
    ProductFindByEanGtin14:
      name: eanGtin14
      in: query
      schema:
        type: string
      description: EAN/GTIN-14 barcode.
      example: '03574660696318'
