1 type: object
2 description: The product variant's details.
3 x-schemaName: AdminCreateProductVariant
4 required:
5 - title
6 - prices
7 properties:
8 title:
9 type: string
10 title: title
11 description: The variant's title.
12 sku:
13 type: string
14 title: sku
15 description: The variant's SKU.
16 ean:
17 type: string
18 title: ean
19 description: The variant's EAN.
20 upc:
21 type: string
22 title: upc
23 description: The variant's UPC.
24 barcode:
25 type: string
26 title: barcode
27 description: The variant's barcode.
28 hs_code:
29 type: string
30 title: hs_code
31 description: The variant's HS code.
32 mid_code:
33 type: string
34 title: mid_code
35 description: The variant's MID code.
36 allow_backorder:
37 type: boolean
38 title: allow_backorder
39 description: Whether it's allowed to order this variant when it's out of stock.
40 manage_inventory:
41 type: boolean
42 title: manage_inventory
43 description: >-
44 Whether Medusa manages the variant's inventory quantity. If disabled, the
45 product variant is always considered in stock.
46 variant_rank:
47 type: number
48 title: variant_rank
49 description: The sorting order of the variant among other variants in the product.
50 weight:
51 type: number
52 title: weight
53 description: The variant's weight.
54 length:
55 type: number
56 title: length
57 description: The variant's length.
58 height:
59 type: number
60 title: height
61 description: The variant's height.
62 width:
63 type: number
64 title: width
65 description: The variant's width.
66 origin_country:
67 type: string
68 title: origin_country
69 description: The variant's origin country.
70 material:
71 type: string
72 title: material
73 description: The variant's material.
74 metadata:
75 type: object
76 description: The variant's metadata, used to store custom key-value pairs.
77 externalDocs:
78 url: https://docs.medusajs.com/api/admin#manage-metadata
79 description: Learn how to manage metadata
80 prices:
81 type: array
82 description: The variant's prices.
83 items:
84 $ref: ./AdminCreateProductVariantPrice.yaml
85 options:
86 type: object
87 description: >-
88 The variant's options, where the key is an option's name, and the value is
89 the option's value.
90 example:
91 Color: Black
92 inventory_items:
93 type: array
94 description: The variant's inventory items to create.
95 items:
96 $ref: ./AdminCreateProductVariantInventoryKit.yaml