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

# Update product variant

> Update an existing product variant

Also accepts `PATCH` with the same body.



## OpenAPI

````yaml /api-reference/openapi.json put /admin/api/v1/products/products/{product_id}/variants/{id}
openapi: 3.0.3
info:
  title: ARUKZ ERP API
  version: v1
  description: >-
    The REST API of ARUKZ ERP: sales, purchases, inventory, products, partners,
    accounts, projects and reference data. Every call acts as the user whose
    token it carries and sees only that user's company.
servers:
  - url: https://erp.arukz.com
    description: ARUKZ ERP (hosted)
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Sign in for a token and sign out.
  - name: Sales
    description: Quotations, sales orders and their lines, deliveries and invoices.
  - name: Purchases
    description: Purchase orders, receipts, bills, agreements and vendor price lists.
  - name: Inventory
    description: >-
      Warehouses, locations, lots, stock quantities, receipts, deliveries,
      transfers and scrap.
  - name: Products
    description: 'The product catalogue: categories, attributes, variants and packaging.'
  - name: Partners
    description: Customers, vendors, contacts, addresses and bank accounts.
  - name: Accounts
    description: >-
      Invoices, bills, credit notes, refunds, taxes, journals and the chart of
      accounts.
  - name: Projects
    description: Projects, tasks, stages and milestones.
  - name: Reference data
    description: Currencies and rates, banks, countries, states and units of measure.
paths:
  /admin/api/v1/products/products/{product_id}/variants/{id}:
    put:
      tags:
        - Products
      summary: Update product variant
      description: |-
        Update an existing product variant

        Also accepts `PATCH` with the same body.
      operationId: products-product-variants-update-product-variant
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: integer
            description: The product ID
            example: 1
          description: The product ID
        - name: id
          in: path
          required: true
          schema:
            type: integer
            description: The variant ID
            example: 1
          description: The variant ID
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: 'Product type: goods, service, consu (consumable).'
                  enum:
                    - goods
                    - service
                  example: goods
                name:
                  type: string
                  description: >-
                    Product name (max 255 characters). Must not be greater than
                    255 characters.
                  example: Laptop Computer
                service_tracking:
                  type: string
                  description: Must not be greater than 255 characters.
                  nullable: true
                  example: b
                reference:
                  type: string
                  description: >-
                    Internal reference code (max 255 characters). Must not be
                    greater than 255 characters.
                  nullable: true
                  example: PROD-001
                barcode:
                  type: string
                  description: >-
                    Product barcode (max 255 characters). Must not be greater
                    than 255 characters.
                  nullable: true
                  example: '1234567890'
                price:
                  type: number
                  description: Sales price (minimum 0). Must be at least 0.
                  example: 999.99
                cost:
                  type: number
                  description: Product cost (minimum 0). Must be at least 0.
                  nullable: true
                  example: 750
                volume:
                  type: number
                  description: >-
                    Product volume (min 0, max 99999999999). Must be at least 0.
                    Must not be greater than 99999999999.
                  nullable: true
                  example: 0.5
                weight:
                  type: number
                  description: >-
                    Product weight (min 0, max 99999999999). Must be at least 0.
                    Must not be greater than 99999999999.
                  nullable: true
                  example: 2.5
                description:
                  type: string
                  description: Product description.
                  nullable: true
                  example: High-performance laptop with latest specifications.
                description_purchase:
                  type: string
                  description: Purchase description.
                  nullable: true
                  example: Enterprise laptop for business use.
                description_sale:
                  type: string
                  description: Sales description.
                  nullable: true
                  example: Perfect for professionals and power users.
                enable_sales:
                  type: boolean
                  description: Whether this product can be sold.
                  nullable: true
                  example: false
                enable_purchase:
                  type: boolean
                  description: Whether this product can be purchased.
                  nullable: true
                  example: false
                is_favorite:
                  type: boolean
                  description: Mark this product as favorite.
                  nullable: true
                  example: false
                images:
                  type: array
                  items:
                    type: string
                  nullable: true
                  example:
                    - architecto
                uom_id:
                  type: integer
                  description: Unit of measure ID.
                  nullable: true
                  example: 1
                uom_po_id:
                  type: integer
                  description: Purchase unit of measure ID.
                  nullable: true
                  example: 1
                category_id:
                  type: integer
                  description: >-
                    Product category ID. The `id` of an existing record in the
                    products_categories table.
                  example: 1
                company_id:
                  type: integer
                  description: Company ID this product belongs to.
                  nullable: true
                  example: 1
                tags:
                  type: array
                  items:
                    type: integer
                  description: The `id` of an existing record in the products_tags table.
                  example:
                    - 16
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                data:
                  id: 1
                  type: goods
                  name: Big Vision 4K Action Camera
                  service_tracking: none
                  reference: Action-01
                  barcode: BV4K-0001
                  price: 150
                  cost: 100
                  volume: 0
                  weight: 1.2
                  description: >-
                    <p>A high-quality 4k action camera designed for everyday
                    use.</p><p>The <strong>4K Action Camera</strong> is crafted
                    with premium materials, ensuring durability and
                    functionality. Perfect for those who value quality and
                    innovation in their everyday essentials.</p>
                  description_purchase: null
                  description_sale: null
                  enable_sales: false
                  enable_purchase: false
                  is_favorite: false
                  is_configurable: true
                  images:
                    - 01JR9QKPXFKP1S054PZDM17MEP.png
                    - 01JR9QKPXPX1TJKCH0DMZ29M12.png
                  sort: null
                  parent_id: null
                  uom_id: 1
                  uom_po_id: 1
                  category_id: 11
                  creator_id: 1
                  company_id: 1
                  created_at: '2025-04-08T03:37:55.000000Z'
                  updated_at: '2025-09-23T07:28:33.000000Z'
                  deleted_at: null
                message: Product variant updated successfully.
        '401':
          description: Unauthenticated
          content:
            application/json:
              example:
                message: Unauthenticated.
        '404':
          description: Product variant not found
          content:
            application/json:
              example:
                message: Resource not found.
        '422':
          description: Validation error
          content:
            application/json:
              example:
                message: The given data was invalid.
                errors:
                  name:
                    - The name field must be a string.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API token from [Sign in](/api-reference/authentication), sent as
        `Authorization: Bearer <token>`. Tokens last 30 days.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.