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