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