POST
/
vendor
/
products
/
{id}
/
variants
{
  "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.

Query Parameters

fields
string

Comma-separated fields to include in the response.

Body

application/json
title
string

The title of the variant.

sku
string

The unique SKU for the variant.

ean
string

The EAN number of the variant.

upc
string

The UPC number of the variant.

barcode
string

The barcode of the variant.

hs_code
string

The HS code of the variant.

mid_code
string

The MID code of the variant.

allow_backorder
boolean
default:false

Whether the variant can be backordered.

manage_inventory
boolean
default:true

Whether Medusa should keep track of inventory for this variant.

variant_rank
number

The rank of the variant.

weight
number

The weight of the variant.

length
number

The length of the variant.

height
number

The height of the variant.

width
number

The width of the variant.

origin_country
string

The country of origin of the variant.

material
string

The material composition of the variant.

metadata
object

Additional metadata for the variant.

prices
object[]

The prices of the variant.

options
object

The options of the variant.

inventory_items
object[]

The inventory items of the variant.

Response

200 - application/json

OK

product
object

A product object with its properties