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

# Create products

> Create and add products to store



## OpenAPI

````yaml post /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:
    post:
      tags:
        - Products
      summary: Create products
      description: Create and add products to store
      operationId: create-products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductCreate'
      responses:
        '200':
          $ref: '#/components/responses/ProductCreateSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ProductNotFound'
components:
  schemas:
    ProductCreate:
      type: object
      required:
        - title
      properties:
        sku:
          type: string
          example: T-SHIRT123
          description: Article Number (SKU)
        is_giftcard:
          type: boolean
          description: >-
            Mark this product as a gift card. Requires the gift card app to be
            active for the shop.
          example: true
        title:
          type: string
          example: My white tee!
          description: Product title
        description:
          type: string
          example: <p><strong>This is so so cool!</strong> Heee</p>
          description: Product description. Accepts HTML
        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
          description: VAT percent (%)
        weight:
          type: number
          example: 400
          description: Weight (in grams)
        stock:
          type: integer
          example: 1
          description: Stock quantity
        disable_minusqty:
          type: string
          example: '1'
          description: 'Stock: Disable minus quantity?'
        gtin:
          type: string
          description: EAN-number / GTN (Global Trade Item Number)
        headcategory_id:
          type: integer
          description: >-
            Optional: Category id if a product should be placed into a specific
            category
        headcategory_name:
          type: string
          example: T-shirts
          description: >-
            Optional: Category name if product should be placed into a new
            category
        visible:
          type: integer
          example: 1
          description: Visibility in store
        images:
          $ref: '#/components/schemas/ProductImages'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Custom metadata for the product
        preorder:
          type:
            - integer
            - 'null'
          description: >
            Assign a preorder option to this product by its ID. Set to `null` or
            `0` to leave it as a regular product.

            Use `GET /v1/settings/preorders` to retrieve the list of valid
            preorder option IDs for your store.
          example: 1
        permanent_redirect_from_url:
          type: string
          description: URL to create a permanent redirect from (for SEO purposes)
        skipIfDuplicate:
          type: boolean
          description: Skip creation if product with same SKU already exists
        variants:
          type: object
          description: Product variants configuration
          properties:
            sync:
              type: array
              description: Variants to sync (replaces all existing variants)
              items:
                type: object
                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)
                  images:
                    type: array
                    description: Variant-specific images
                    items:
                      $ref: '#/components/schemas/ProductImages'
            add:
              type: array
              description: Variants to add to existing variants
              items:
                $ref: '#/components/schemas/ProductVariant'
    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'
    Error:
      type: object
      properties:
        code:
          type: integer
          example: 404
        error:
          type: string
          example: Resource not found
  responses:
    ProductCreateSuccess:
      description: Product created successfully
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: integer
                example: 1
              variants:
                type: array
                items:
                  type: object
                description: Created product variants
              notices:
                type: array
                items:
                  type: string
                description: Optional warning or error messages
    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'
  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.

````