> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Product Collection

> Updates the product collection.

For `STATIC` collections, you can update only the `name`.

For `AUTO_UPDATE` collections, you can update its `name` and `filters`.



## OpenAPI

````yaml /openapi/product-collections.json put /v1/product-collections/{productCollectionId}
openapi: 3.0.1
info:
  title: Voucherify API - Product Collections
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/product-collections/{productCollectionId}:
    parameters:
      - schema:
          $ref: '#/components/schemas/ParameterProductCollectionId'
        name: productCollectionId
        in: path
        required: true
        description: A unique product collection ID.
    put:
      tags:
        - Product Collections
      summary: Update Product Collection
      description: |-
        Updates the product collection.

        For `STATIC` collections, you can update only the `name`.

        For `AUTO_UPDATE` collections, you can update its `name` and `filters`.
      operationId: put-product-collection
      parameters: []
      requestBody:
        required: true
        description: Specify the parameters to be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductCollectionsUpdateRequestBody'
            examples:
              Update static collection:
                value:
                  name: New static collection name
              Update auto-update collection:
                value:
                  name: New auto-update collection name
                  filter:
                    junction: AND
                    metadata.brand:
                      conditions:
                        $is:
                          - Voucherify
                    metadata.vendor:
                      conditions:
                        $in:
                          - Bull&Pear
                          - D&B
                          - FloppCity
                          - Home
                          - I&N
                          - Reversed
                    price:
                      conditions:
                        $more_than_equal:
                          - 10000
      responses:
        '200':
          description: >-
            Returns a product collection object if a valid identifier was
            provided in the path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductCollectionsUpdateResponseBody'
              examples:
                Static:
                  value:
                    id: pc_bQ2p9TycbEhd3YzwFCR3JQYA
                    name: Shirts
                    type: STATIC
                    products:
                      - id: prod_0a9f9aeddb019a42db
                        object: product
                      - id: prod_0a9f9ab4ab019a42d5
                        object: product
                    created_at: '2022-02-28T11:42:12.484Z'
                    updated_at: '2026-02-23T17:43:22.384Z'
                    object: products_collection
                Dynamic:
                  value:
                    id: pc_Dj1qSH7bho4SVh7aSDKjU174
                    name: Products in Poland
                    type: AUTO_UPDATE
                    filter:
                      junction: and
                      metadata.product_location:
                        conditions:
                          $in_location:
                            - loc_RcYz537sV07e1t5aG5tIH9FD
                    created_at: '2022-07-14T16:12:26.377Z'
                    updated_at: '2026-02-23T17:43:22.384Z'
                    object: products_collection
        '400':
          description: Returns an error if the data is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Name is not `string`:
                  value:
                    code: 400
                    key: invalid_payload
                    message: Invalid payload
                    details: Property .name must be string
                    request_id: v-1204a5e6cb9054fc8a
                Incorrect `junction` property:
                  value:
                    code: 400
                    key: invalid_payload
                    message: Invalid payload
                    details: >-
                      Property .filter has wrong `junction` property. It must be
                      one of: and, or
                    request_id: v-1204a62a891054fd04
                Empty `filter` object:
                  value:
                    code: 400
                    key: invalid_payload
                    message: Invalid payload
                    details: >-
                      'AUTO_UPDATE' collection must contain valid filter with
                      'junction' property
                    request_id: v-1204a662d6c65738b0
        '404':
          description: >-
            Returns an error when requesting a product collection that has been
            deleted or does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Not Found:
                  value:
                    code: 404
                    key: not_found
                    message: Resource not found
                    details: >-
                      Cannot find products_collection with id
                      pc_wIv11jDp2n7YuX6Tkyue2Lv
                    request_id: v-1204a6862d1054fdb6
                    resource_id: pc_wIv11jDp2n7YuX6Tkyue2Lv
                    resource_type: products_collection
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - product-collections
components:
  schemas:
    ParameterProductCollectionId:
      type: string
      example: pc_41V4DiQQO8YGqj0J2oZD57j4
    ProductCollectionsUpdateRequestBody:
      title: Product Collections Update Request Body
      description: >-
        Response body schema for **PUT**
        `v1/product-collections/{productCollectionId}`.
      oneOf:
        - $ref: '#/components/schemas/ProductCollectionsUpdateStaticRequestBody'
        - $ref: '#/components/schemas/ProductCollectionsUpdateDynamicRequestBody'
    ProductCollectionsUpdateResponseBody:
      type: object
      title: Product Collections Update Response Body
      description: >-
        Response body schema for **PUT**
        `v1/product-collections/{productCollectionId}`.
      allOf:
        - $ref: '#/components/schemas/ProductCollectionsItem'
        - type: object
          properties:
            updated_at:
              type: string
              example: '2022-04-26T08:35:54.960Z'
              description: >-
                Timestamp representing the date and time when the product
                collection was last updated. The value is shown in the ISO 8601
                format.
              format: date-time
    Error:
      title: Error Object
      type: object
      description: Error details
      properties:
        code:
          type: integer
          description: Error's HTTP status code.
        key:
          type: string
          description: Short string describing the kind of error which occurred.
        message:
          type: string
          description: A human-readable message providing a short description of the error.
        details:
          type: string
          description: A human-readable message providing more details about the error.
        request_id:
          type: string
          example: v-0a885062c80375740f
          description: >-
            This ID is useful when troubleshooting and/or finding the root cause
            of an error response by our support team.
        resource_id:
          type: string
          description: >-
            Unique resource ID that can be used in another endpoint to get more
            details.
          example: rf_0c5d710a87c8a31f86
        resource_type:
          type: string
          description: The resource type.
          example: voucher
        error:
          type: object
          description: Includes additional information about the error.
          properties:
            message:
              type: string
              description: The message configured by the user in a validation rule.
      required:
        - code
        - message
    ProductCollectionsUpdateStaticRequestBody:
      title: Product Collections Create Static Request Body
      description: >-
        Request body schema for **PUT**
        `v1/product-collections/{productCollectionId}`.
      type: object
      properties:
        name:
          type: string
          description: Unique user-defined product collection name.
      required:
        - name
    ProductCollectionsUpdateDynamicRequestBody:
      title: Product Collections Update Dynamic (Auto Update) Request Body
      description: >-
        Request body schema for **PUT**
        `v1/product-collections/{productCollectionId}`.
      type: object
      properties:
        name:
          type: string
          description: Unique user-defined product collection name.
        filter:
          type: object
          description: >-
            Defines a set of criteria and boundary conditions for an
            `AUTO_UPDATE` product collection type.


            Sending the `filter` object overwrites the existing values.
          properties:
            junction:
              $ref: '#/components/schemas/Junction'
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/FieldConditions'
            description: >-
              Valid keys: `id`, `product_id`, `source_id`, `name`, `price`,
              `object`, `attributes`, `image_url`, `skus`, `created_at`,
              `updated_at` and `metadata.*`
    ProductCollectionsItem:
      title: Product Collection Base
      description: 'This is an object representing a product collection base. '
      type: object
      properties:
        id:
          type: string
          description: Product collection ID.
        name:
          type: string
          example: All Products
          description: Unique user-defined product collection name.
        type:
          type: string
          description: >-
            Describes whether the product collection is dynamic (products come
            in and leave based on set criteria) or static (manually selected
            products).
          enum:
            - STATIC
            - AUTO_UPDATE
        filter:
          type: object
          description: >-
            Defines a set of criteria and boundary conditions for an
            `AUTO_UPDATE` product collection type.
          required:
            - junction
          properties:
            junction:
              $ref: '#/components/schemas/Junction'
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/FieldConditions'
            description: >-
              Valid keys: `id`, `product_id`, `source_id`, `name`, `price`,
              `object`, `attributes`, `image_url`, `skus`, `created_at`,
              `updated_at` and `metadata.*`
        products:
          description: Defines a set of products for a `STATIC` product collection type.
          type: array
          items:
            title: Product Collections Item Products Item
            type: object
            properties:
              id:
                type: string
                example: prod_0a41bcf807c5fcaaf6
                description: The product ID.
              product_id:
                type: string
                description: Product ID for SKUs.
              object:
                type: string
                enum:
                  - sku
                  - product
                description: Denotes the type of the object represented by the ID.
            required:
              - id
              - object
        created_at:
          type: string
          example: '2021-12-09T12:51:29.898Z'
          description: >-
            Timestamp representing the date and time when the product collection
            was created. The value is shown in the ISO 8601 format.
          format: date-time
        object:
          type: string
          description: >-
            The type of the object represented by JSON. This object stores
            information about the static product collection.
          default: products_collection
          enum:
            - products_collection
      required:
        - id
        - name
        - type
        - created_at
        - object
    Junction:
      title: Junction
      description: >-
        Logical Operator Between Filters. Filter by conditions set on the
        `junction` parameter indicating how the `conditions` should be accounted
        for in the query. An `AND` is an all-inclusive logical operator, meaning
        the `AND` operator displays a record if **ALL** the conditions separated
        by AND are TRUE, while  an `OR` operator displays a record if **ANY** of
        the conditions separated by OR is TRUE.
      enum:
        - and
        - or
      type: string
    FieldConditions:
      title: Field Conditions
      type: object
      properties:
        conditions:
          description: >-
            Data filters used to narrow down the data records to be returned in
            the result.
          allOf:
            - $ref: '#/components/schemas/FiltersCondition'
    FiltersCondition:
      title: Filters Condition
      type: object
      properties:
        $in:
          $ref: '#/components/schemas/Any'
        $not_in:
          $ref: '#/components/schemas/Any'
        $is:
          $ref: '#/components/schemas/Any'
        $is_days_ago:
          $ref: '#/components/schemas/Any'
        $is_days_in_future:
          $ref: '#/components/schemas/Any'
        $is_not:
          $ref: '#/components/schemas/Any'
        $has_value:
          $ref: '#/components/schemas/Any'
        $is_unknown:
          $ref: '#/components/schemas/Any'
        $contains:
          $ref: '#/components/schemas/Any'
        $not_contain:
          $ref: '#/components/schemas/Any'
        $starts_with:
          $ref: '#/components/schemas/Any'
        $ends_with:
          $ref: '#/components/schemas/Any'
        $more_than:
          $ref: '#/components/schemas/Any'
        $less_than:
          $ref: '#/components/schemas/Any'
        $more_than_ago:
          $ref: '#/components/schemas/Any'
        $less_than_ago:
          $ref: '#/components/schemas/Any'
        $more_than_future:
          $ref: '#/components/schemas/Any'
        $less_than_future:
          $ref: '#/components/schemas/Any'
        $more_than_equal:
          $ref: '#/components/schemas/Any'
        $less_than_equal:
          $ref: '#/components/schemas/Any'
        $after:
          $ref: '#/components/schemas/Any'
        $before:
          $ref: '#/components/schemas/Any'
        $count:
          $ref: '#/components/schemas/Any'
        $count_less:
          $ref: '#/components/schemas/Any'
        $count_more:
          $ref: '#/components/schemas/Any'
    Any:
      title: Any
      type: array
      items:
        oneOf:
          - title: string
            type: string
          - title: string - date
            type: string
            format: date
          - title: string - date-time
            type: string
            format: date-time
          - title: number
            type: number
          - title: object
            type: object
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````