---
displayed_sidebar: productReference
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# UpdateProductVariantDTO

The data to update in a product variant. The `id` is used to identify which product variant to update.

<ParameterTypes parameters={[
  {
    "name": "allow_backorder",
    "type": "`boolean`",
    "description": "Whether the product variant can be ordered when it's out of stock.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "barcode",
    "type": "`string`",
    "description": "The barcode of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "ean",
    "type": "`string`",
    "description": "The EAN of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "height",
    "type": "`number`",
    "description": "The height of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "hs_code",
    "type": "`string`",
    "description": "The HS Code of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "id",
    "type": "`string`",
    "description": "The ID of the product variant to update.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "inventory_quantity",
    "type": "`number`",
    "description": "The inventory quantiy of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "length",
    "type": "`number`",
    "description": "The length of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "manage_inventory",
    "type": "`boolean`",
    "description": "Whether the product variant's inventory should be managed by the core system.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "material",
    "type": "`string`",
    "description": "The material of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "metadata",
    "type": "`Record<string, unknown>`",
    "description": "Holds custom data in key-value pairs.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "mid_code",
    "type": "`string`",
    "description": "The MID Code of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "options",
    "type": "[CreateProductVariantOptionDTO](product.CreateProductVariantOptionDTO.mdx)[]",
    "description": "The product variant options to create and associate with the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "option_id",
        "type": "`string`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "value",
        "type": "`string`",
        "description": "The value of a product variant option.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "origin_country",
    "type": "`string`",
    "description": "The origin country of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "sku",
    "type": "`string`",
    "description": "The SKU of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "title",
    "type": "`string`",
    "description": "The tile of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "upc",
    "type": "`string`",
    "description": "The UPC of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "weight",
    "type": "`number`",
    "description": "The weight of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "width",
    "type": "`number`",
    "description": "The width of the product variant.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} />
