POST
/
vendor
/
products
/
{id}
/
variants
/
{variant_id}
{
  "product": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "title": "<string>",
    "subtitle": "<string>",
    "description": "<string>",
    "handle": "<string>",
    "is_giftcard": true,
    "status": "draft",
    "thumbnail": "<string>",
    "width": 123,
    "weight": 123,
    "length": 123,
    "height": 123,
    "origin_country": "<string>",
    "hs_code": "<string>",
    "mid_code": "<string>",
    "material": "<string>",
    "collection": {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": "2023-11-07T05:31:56Z",
      "title": "<string>",
      "handle": "<string>",
      "metadata": {
        "car": "white"
      }
    },
    "type": {
      "id": "<string>",
      "value": "<string>",
      "metadata": {
        "car": "white"
      }
    },
    "tags": [
      {
        "id": "<string>",
        "value": "<string>",
        "metadata": {
          "car": "white"
        }
      }
    ],
    "categories": [
      {
        "id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z",
        "name": "<string>",
        "handle": "<string>",
        "is_active": true,
        "is_internal": true,
        "rank": 123,
        "parent_category": {},
        "category_children": [
          {}
        ],
        "metadata": {
          "car": "white"
        }
      }
    ],
    "variants": [
      {
        "id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z",
        "title": "<string>",
        "sku": "<string>",
        "barcode": "<string>",
        "ean": "<string>",
        "upc": "<string>",
        "allow_backorder": true,
        "manage_inventory": true,
        "hs_code": "<string>",
        "origin_country": "<string>",
        "mid_code": "<string>",
        "material": "<string>",
        "weight": 123,
        "length": 123,
        "height": 123,
        "width": 123,
        "options": [
          {
            "id": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": "2023-11-07T05:31:56Z",
            "value": "<string>",
            "metadata": {
              "car": "white"
            }
          }
        ],
        "metadata": {
          "car": "white"
        }
      }
    ],
    "options": [
      {
        "id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z",
        "title": "<string>",
        "values": [
          {
            "id": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": "2023-11-07T05:31:56Z",
            "value": "<string>",
            "metadata": {
              "car": "white"
            }
          }
        ],
        "metadata": {
          "car": "white"
        }
      }
    ],
    "images": [
      {
        "id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z",
        "url": "<string>",
        "rank": 123,
        "metadata": {
          "car": "white"
        }
      }
    ],
    "discountable": true,
    "external_id": "<string>",
    "metadata": {
      "car": "white"
    },
    "rating": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the Product.

variant_id
string
required

The ID of the Variant.

Query Parameters

fields
string

Comma-separated fields to include in the response.

Body

application/json
id
string

The ID of the variant to update.

title
string

The title of the variant.

prices
object[]

The prices of the variant.

sku
string | null

The unique SKU for the variant.

ean
string | null

The EAN number of the variant.

upc
string | null

The UPC number of the variant.

barcode
string | null

A generic GTIN field for the variant.

hs_code
string | null

The Harmonized System code of the variant.

mid_code
string | null

The Manufacturer Identification code of the variant.

allow_backorder
boolean

Whether the variant can be backordered.

manage_inventory
boolean

Whether Medusa should keep track of the inventory of this variant.

variant_rank
number

The rank of the variant when presented in a list of variants.

weight
number | null

The weight of the variant.

length
number | null

The length of the variant.

height
number | null

The height of the variant.

width
number | null

The width of the variant.

origin_country
string | null

The country of origin of the variant.

material
string | null

The material composition of the variant.

metadata
object | null

An optional set of key-value pairs with additional information.

options
object

The options of the variant.

Response

200 - application/json

OK

product
object

A product object with its properties