---
displayed_sidebar: productReference
---

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

# UpdateProductDTO

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

<ParameterTypes parameters={[
  {
    "name": "categories",
    "type": "`object`[]",
    "description": "The product categories to associate with the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "id",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "collection_id",
    "type": "`null` \\| `string`",
    "description": "The product collection to be associated with the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "description",
    "type": "`string`",
    "description": "The description of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "discountable",
    "type": "`boolean`",
    "description": "Whether the product can be discounted.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "handle",
    "type": "`string`",
    "description": "The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "height",
    "type": "`number`",
    "description": "The height of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "hs_code",
    "type": "`string`",
    "description": "The HS Code of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "id",
    "type": "`string`",
    "description": "The ID of the product to update.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "images",
    "type": "`string`[] \\| `object`[]",
    "description": "The product's images. If an array of strings is supplied, each string will be a URL and a `ProductImage` will be created\nand associated with the product. If an array of objects is supplied, you can pass along the ID of an existing `ProductImage`.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "is_giftcard",
    "type": "`boolean`",
    "description": "Whether the product is a gift card.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "length",
    "type": "`number`",
    "description": "The length of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "material",
    "type": "`string`",
    "description": "The material of the product.",
    "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.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "options",
    "type": "[CreateProductOptionDTO](product.CreateProductOptionDTO.mdx)[]",
    "description": "The product options to be created and associated with the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "product_id",
        "type": "`string`",
        "description": "The ID of the associated product.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "title",
        "type": "`string`",
        "description": "The product option's title.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "origin_country",
    "type": "`string`",
    "description": "The origin country of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "status",
    "type": "[ProductStatus](../enums/product.ProductStatus.mdx)",
    "description": "The status of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "DRAFT",
        "type": "`\"draft\"`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "PROPOSED",
        "type": "`\"proposed\"`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "PUBLISHED",
        "type": "`\"published\"`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "REJECTED",
        "type": "`\"rejected\"`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "subtitle",
    "type": "`string`",
    "description": "The subttle of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "tags",
    "type": "[CreateProductTagDTO](product.CreateProductTagDTO.mdx)[]",
    "description": "The product tags to be created and associated with the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "value",
        "type": "`string`",
        "description": "The value of the product tag.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "thumbnail",
    "type": "`string`",
    "description": "The URL of the product's thumbnail.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "title",
    "type": "`string`",
    "description": "The title of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "type",
    "type": "[CreateProductTypeDTO](product.CreateProductTypeDTO.mdx)",
    "description": "The product type to create and associate with the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "id",
        "type": "`string`",
        "description": "The product type's ID.",
        "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": "value",
        "type": "`string`",
        "description": "The product type's value.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "type_id",
    "type": "`null` \\| `string`",
    "description": "The product type to be associated with the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "variants",
    "type": "([CreateProductVariantDTO](product.CreateProductVariantDTO.mdx) \\| [UpdateProductVariantDTO](product.UpdateProductVariantDTO.mdx))[]",
    "description": "The product variants to be created and associated with the product. You can also update existing product variants associated with the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "weight",
    "type": "`number`",
    "description": "The weight of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "width",
    "type": "`number`",
    "description": "The width of the product.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} />
