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