1 type: object
2 description: The product variant's details.
3 x-schemaName: AdminProductVariant
4 required:
5 - prices
6 - options
7 - id
8 - title
9 - sku
10 - barcode
11 - ean
12 - upc
13 - thumbnail
14 - allow_backorder
15 - manage_inventory
16 - hs_code
17 - origin_country
18 - mid_code
19 - material
20 - weight
21 - length
22 - height
23 - width
24 - created_at
25 - updated_at
26 - deleted_at
27 properties:
28 prices:
29 type: array
30 description: The variant's prices.
31 items:
32 $ref: ./AdminPrice.yaml
33 id:
34 type: string
35 title: id
36 description: The variant's ID.
37 title:
38 type: string
39 title: title
40 description: The variant's title.
41 sku:
42 type: string
43 title: sku
44 description: The variant's SKU.
45 barcode:
46 type: string
47 title: barcode
48 description: The variant's barcode.
49 ean:
50 type: string
51 title: ean
52 description: The variant's EAN code.
53 upc:
54 type: string
55 title: upc
56 description: The variant's UPC.
57 allow_backorder:
58 type: boolean
59 title: allow_backorder
60 description: Whether the variant can be ordered even if it's out of stock.
61 manage_inventory:
62 type: boolean
63 title: manage_inventory
64 description: >-
65 Whether the Medusa application manages the variant's inventory quantity
66 and availablility. If disabled, the variant is always considered in stock.
67 inventory_quantity:
68 type: number
69 title: inventory_quantity
70 description: >-
71 The variant's inventory quantity. This is only included if you pass in the
72 `fields` query parameter a `+variants.inventory_quantity` parameter.
73 hs_code:
74 type: string
75 title: hs_code
76 description: The variant's HS code.
77 origin_country:
78 type: string
79 title: origin_country
80 description: The variant's origin country.
81 mid_code:
82 type: string
83 title: mid_code
84 description: The variant's MID code.
85 material:
86 type: string
87 title: material
88 description: The variant's material.
89 weight:
90 type: number
91 title: weight
92 description: The variant's weight.
93 length:
94 type: number
95 title: length
96 description: The variant's length.
97 height:
98 type: number
99 title: height
100 description: The variant's height.
101 width:
102 type: number
103 title: width
104 description: The variant's width.
105 variant_rank:
106 type: number
107 title: variant_rank
108 description: The variant's rank among its sibling variants.
109 options:
110 type: array
111 description: The variant's option values.
112 items:
113 $ref: ./AdminProductOptionValue.yaml
114 product:
115 type: object
116 product_id:
117 type: string
118 title: product_id
119 description: The ID of the product that the variant belongs to.
120 calculated_price:
121 $ref: ./BaseCalculatedPriceSet.yaml
122 created_at:
123 type: string
124 format: date-time
125 title: created_at
126 description: The date the variant was created.
127 updated_at:
128 type: string
129 format: date-time
130 title: updated_at
131 description: The date the variant was updated.
132 deleted_at:
133 type: string
134 format: date-time
135 title: deleted_at
136 description: The date the variant was deleted.
137 metadata:
138 type: object
139 description: The variant's metadata, can hold custom key-value pairs.
140 externalDocs:
141 url: https://docs.medusajs.com/api/admin#manage-metadata
142 description: Learn how to manage metadata
143 inventory_items:
144 type: array
145 description: The variant's inventory items.
146 items:
147 $ref: ./AdminProductVariantInventoryItemLink.yaml
148 images:
149 type: array
150 description: The variant's images.
151 items:
152 $ref: ./BaseProductImage.yaml
153 thumbnail:
154 type: string
155 title: thumbnail
156 description: The variant's thumbnail.
157 translations:
158 type: array
159 description: The variant's translations.
160 items:
161 $ref: ./AdminTranslation.yaml