1 /**
2 * @schema AdminCreateProduct
3 * type: object
4 * description: The product's details.
5 * x-schemaName: AdminCreateProduct
6 * required:
7 * - title
8 * properties:
9 * title:
10 * type: string
11 * title: title
12 * description: The product's title.
13 * subtitle:
14 * type: string
15 * title: subtitle
16 * description: The product's subtitle.
17 * description:
18 * type: string
19 * title: description
20 * description: The product's description.
21 * is_giftcard:
22 * type: boolean
23 * title: is_giftcard
24 * description: Whether the product is a gift card.
25 * discountable:
26 * type: boolean
27 * title: discountable
28 * description: Whether the product is discountable.
29 * images:
30 * type: array
31 * description: The product's images.
32 * items:
33 * type: object
34 * description: A product's image details.
35 * required:
36 * - url
37 * properties:
38 * url:
39 * type: string
40 * title: url
41 * description: The image's URL.
42 * thumbnail:
43 * type: string
44 * title: thumbnail
45 * description: The URL of the product's thumbnail.
46 * handle:
47 * type: string
48 * title: handle
49 * description: The product's handle.
50 * status:
51 * type: string
52 * description: The product's status.
53 * enum:
54 * - draft
55 * - proposed
56 * - published
57 * - rejected
58 * type_id:
59 * type: string
60 * title: type_id
61 * description: The ID of the type the product belongs to.
62 * collection_id:
63 * type: string
64 * title: collection_id
65 * description: The ID of the collection the product belongs to.
66 * categories:
67 * type: array
68 * description: The categories the product belongs to.
69 * items:
70 * type: object
71 * description: A category's details.
72 * required:
73 * - id
74 * properties:
75 * id:
76 * type: string
77 * title: id
78 * description: The category's ID.
79 * tags:
80 * type: array
81 * description: The product's tags.
82 * items:
83 * type: object
84 * description: A tag's details.
85 * required:
86 * - id
87 * properties:
88 * id:
89 * type: string
90 * title: id
91 * description: The tag's ID.
92 * options:
93 * type: array
94 * description: The product's options.
95 * items:
96 * oneOf:
97 * - $ref: "#/components/schemas/AdminCreateProductOption"
98 * - type: object
99 * description: Existing global options to associate with the product.
100 * required:
101 * - id
102 * properties:
103 * id:
104 * type: string
105 * title: id
106 * description: The option's ID.
107 * value_ids:
108 * type: array
109 * description: The IDs of the option values to associate with the product. This is useful to associate specific values from a global option.
110 * items:
111 * type: string
112 * title: value_ids
113 * description: The value's ID.
114 * description: The product option's details.
115 * variants:
116 * type: array
117 * description: The product's variants.
118 * items:
119 * $ref: "#/components/schemas/AdminCreateProductVariant"
120 * sales_channels:
121 * type: array
122 * description: The sales channels the product is available in.
123 * items:
124 * type: object
125 * description: A sales channel's details.
126 * required:
127 * - id
128 * properties:
129 * id:
130 * type: string
131 * title: id
132 * description: The sales channel's ID.
133 * weight:
134 * type: number
135 * title: weight
136 * description: The product's weight.
137 * length:
138 * type: number
139 * title: length
140 * description: The product's length.
141 * height:
142 * type: number
143 * title: height
144 * description: The product's height.
145 * width:
146 * type: number
147 * title: width
148 * description: The product's width.
149 * hs_code:
150 * type: string
151 * title: hs_code
152 * description: The product's HS code.
153 * mid_code:
154 * type: string
155 * title: mid_code
156 * description: The product's MID code.
157 * origin_country:
158 * type: string
159 * title: origin_country
160 * description: The product's origin country.
161 * material:
162 * type: string
163 * title: material
164 * description: The product's material.
165 * metadata:
166 * type: object
167 * description: The product's metadata, used to store custom key-value pairs.
168 * externalDocs:
169 * url: https://docs.medusajs.com/api/admin#manage-metadata
170 * description: Learn how to manage metadata
171 * external_id:
172 * type: string
173 * title: external_id
174 * description: The ID of the product in an external or third-party system.
175 * shipping_profile_id:
176 * type: string
177 * title: shipping_profile_id
178 * description: The ID of the product's shipping profile.
179 *
180 */
181