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

# Update products

> Update products in store. Product can be identified by product_id/variant_id or directly with SKU/Article Number if unique



## OpenAPI

````yaml put /v1/products
openapi: 3.1.0
info:
  title: Quickbutik API
  version: 1.0.0
  description: >-
    Use the Quickbutik API to access and manage stores, products, orders, and
    more.
  contact:
    name: Quickbutik API Support
    url: https://quickbutik.com/support
  license:
    name: Proprietary
  x-fiddle-import-file: true
servers:
  - url: https://api.quickbutik.com
    description: Production server
security:
  - BasicAuth: []
tags:
  - name: Orders
    description: Order management operations
  - name: Products
    description: Product catalog management
  - name: Categories
    description: Product category management
  - name: Payment Methods
    description: Available payment methods
  - name: Shipping Methods
    description: Available shipping methods
  - name: Metadata
    description: Custom metadata management
  - name: Settings
    description: Store settings and configuration
  - name: Scripts
    description: Storefront script management
paths:
  /v1/products:
    put:
      tags:
        - Products
      summary: Update products
      description: >-
        Update products in store. Product can be identified by
        product_id/variant_id or directly with SKU/Article Number if unique
      operationId: update-products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ProductUpdate'
      responses:
        '200':
          $ref: '#/components/responses/ProductUpdateSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ProductNotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ProductUpdate:
      type: object
      properties:
        product_id:
          type: integer
          description: Product id - which you would like to update
        variant_id:
          type: integer
          description: Product variant id (if specific variant)
        sku:
          type: string
          description: >-
            (OR) Article Number - on product/variant which you would like to
            update
        is_giftcard:
          type: boolean
          description: >-
            Set or unset this product as a gift card. Requires the gift card app
            to be active for the shop.
          example: true
        title:
          type: string
          description: Product title
        price:
          type: integer
          example: 299
          description: Price
        before_price:
          type: integer
          example: 399
          description: Compare price
        purchase_price:
          type: integer
          example: 69
          description: Purchase price (excl. vat)
        tax_rate:
          type: integer
          example: 25
          description: VAT percentage (%)
        stock:
          type: integer
          example: 1
          description: Stock quantity
        qty_location:
          type: string
          description: Stock location
        disable_minusqty:
          type: string
          example: '1'
          description: Disable minus stock (dont allow the stock to go negative)
        visible:
          type: integer
          example: 1
        description:
          type: string
          description: Product description
        gtin:
          type: string
          description: EAN number (GTIN)
        supplier_name:
          type: string
          description: Supplier name
        supplier_sku:
          type: string
          description: Supplier SKU/article number
        datafield_1:
          type: string
          description: 'Data field #1'
        datafield_2:
          type: string
          description: 'Data field #2'
        datafield_3:
          type: string
          description: 'Data field #3'
        seo_description:
          type: string
          description: SEO description (if specific)
        seo_title:
          type: string
          description: SEO title (if specific)
        weight:
          type: number
          example: 400
          description: Weight (in grams)
        images:
          $ref: '#/components/schemas/ProductImages'
        preorder:
          type:
            - integer
            - 'null'
          description: >
            Assign a preorder option to this product/variant by its ID. Set to
            `null` or `0` to clear the preorder status.

            Use `GET /v1/settings/preorders` to retrieve the list of valid
            preorder option IDs for your store.
          example: 1
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Custom metadata for the product
        variants:
          type: object
          description: Product variants configuration
          properties:
            sync:
              type: array
              description: Variants to sync (replaces all existing variants)
              items:
                $ref: '#/components/schemas/ProductVariant'
            add:
              type: array
              description: Variants to add to existing variants
              items:
                $ref: '#/components/schemas/ProductVariant'
            update:
              type: array
              description: Update specific variants by their variant_id
              items:
                allOf:
                  - $ref: '#/components/schemas/ProductVariant'
                  - type: object
                    required:
                      - variant_id
                    properties:
                      variant_id:
                        type: integer
                        description: ID of the variant to update
    ProductImages:
      type: object
      description: >-
        Object with numeric string keys containing image objects. Each key
        represents an image position/index.
      additionalProperties:
        type: object
        properties:
          id:
            type: string
            description: Image ID
            example: '2380'
          url:
            type: string
            description: URL to the image
            example: https://quickbutik.com/image.png
          alttext:
            type:
              - string
              - 'null'
            description: Alt text for the image
            example: Our logo
    ProductVariant:
      type: object
      description: >-
        Variant structure used for creating or updating variants via POST/PUT
        requests. Note that GET requests return a different structure (see
        ProductVariantResponse).
      required:
        - variant_option1_name
        - variant_option1_value
      properties:
        variant_option1_name:
          type: string
          example: Color
          description: First variant option name (e.g., Color, Size)
        variant_option1_value:
          type: string
          example: Red
          description: First variant option value
        variant_option2_name:
          type: string
          example: Size
          description: Second variant option name (optional)
        variant_option2_value:
          type: string
          example: Large
          description: Second variant option value
        variant_option3_name:
          type: string
          description: Third variant option name (optional)
        variant_option3_value:
          type: string
          description: Third variant option value
        variant_option4_name:
          type: string
          description: Fourth variant option name (optional)
        variant_option4_value:
          type: string
          description: Fourth variant option value
        variant_option5_name:
          type: string
          description: Fifth variant option name (optional)
        variant_option5_value:
          type: string
          description: Fifth variant option value
        sku:
          type: string
          description: Variant SKU (optional, will be auto-generated if not provided)
        price:
          type: number
          description: Variant-specific price (optional)
        purchase_price:
          type: number
          description: Variant-specific purchase price (optional)
        qty:
          type: integer
          description: Variant-specific stock quantity (optional)
        qty_location:
          type: string
          description: Variant-specific stock location (optional)
        before_price:
          type: number
          description: Variant-specific compare price (optional)
        gtin:
          type: string
          description: Variant-specific GTIN/EAN (optional)
        supplier_sku:
          type: string
          description: Variant-specific supplier SKU (optional)
        weight:
          type: number
          description: Variant-specific weight in grams (optional)
        visible:
          type: integer
          enum:
            - 0
            - 1
          description: Variant visibility (1 = visible, 0 = hidden)
        preorder:
          type:
            - integer
            - 'null'
          description: >
            Assign a preorder option to this variant by its ID. Set to `null` or
            `0` to clear. Overrides the product-level preorder setting for this
            variant.

            Use `GET /v1/settings/preorders` to retrieve valid option IDs.
          example: 1
        images:
          type: array
          description: Variant-specific images
          items:
            $ref: '#/components/schemas/ProductImages'
    SuccessResponse:
      type: object
      properties:
        success:
          type: integer
          example: 1
        errors:
          type: array
          items:
            type: string
    Error:
      type: object
      properties:
        code:
          type: integer
          example: 404
        error:
          type: string
          example: Resource not found
  responses:
    ProductUpdateSuccess:
      description: Product updated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessResponse'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - Invalid or missing authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ProductNotFound:
      description: >-
        Product/s could not be found or no products match the search criteria.
        Note that empty search results return 404 rather than 200 with an empty
        array.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >
        **Basic Authentication with API Keys**


        The Quickbutik API uses Basic Authentication where you use your API key
        as both the username and password.


        **How it works:**

        1. Format your credentials as `api_key:api_key` (using the SAME API key
        for both username and password)

        2. Base64 encode the formatted string

        3. Include in the Authorization header as: `Authorization: Basic
        ENCODED_STRING`


        **Example:**

        - API Key: `sk_live_abc123`

        - Formatted: `sk_live_abc123:sk_live_abc123`

        - Base64 Encoded: `c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=`

        - Header: `Authorization: Basic
        c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=`


        **cURL Example:**

        ```bash

        curl https://api.quickbutik.com/v1/orders -u your_api_key:your_api_key

        ```


        All API requests must be made over HTTPS. Requests made over HTTP will
        be rejected.


        API keys can be generated in the Quickbutik Control Panel under Settings
        → API.

````