1 type: object
2 description: The product's details.
3 x-schemaName: AdminCreateProduct
4 required:
5 - title
6 properties:
7 title:
8 type: string
9 title: title
10 description: The product's title.
11 subtitle:
12 type: string
13 title: subtitle
14 description: The product's subtitle.
15 description:
16 type: string
17 title: description
18 description: The product's description.
19 is_giftcard:
20 type: boolean
21 title: is_giftcard
22 description: Whether the product is a gift card.
23 discountable:
24 type: boolean
25 title: discountable
26 description: Whether the product is discountable.
27 images:
28 type: array
29 description: The product's images.
30 items:
31 type: object
32 description: A product's image details.
33 required:
34 - url
35 properties:
36 url:
37 type: string
38 title: url
39 description: The image's URL.
40 thumbnail:
41 type: string
42 title: thumbnail
43 description: The URL of the product's thumbnail.
44 handle:
45 type: string
46 title: handle
47 description: The product's handle.
48 status:
49 type: string
50 description: The product's status.
51 enum:
52 - draft
53 - proposed
54 - published
55 - rejected
56 type_id:
57 type: string
58 title: type_id
59 description: The ID of the type the product belongs to.
60 collection_id:
61 type: string
62 title: collection_id
63 description: The ID of the collection the product belongs to.
64 categories:
65 type: array
66 description: The categories the product belongs to.
67 items:
68 type: object
69 description: A category's details.
70 required:
71 - id
72 properties:
73 id:
74 type: string
75 title: id
76 description: The category's ID.
77 tags:
78 type: array
79 description: The product's tags.
80 items:
81 type: object
82 description: A tag's details.
83 required:
84 - id
85 properties:
86 id:
87 type: string
88 title: id
89 description: The tag's ID.
90 options:
91 type: array
92 description: The product's options.
93 items:
94 oneOf:
95 - $ref: ./AdminCreateProductOption.yaml
96 - type: object
97 description: Existing global options to associate with the product.
98 required:
99 - id
100 properties:
101 id:
102 type: string
103 title: id
104 description: The option's ID.
105 value_ids:
106 type: array
107 description: >-
108 The IDs of the option values to associate with the product. This
109 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: ./AdminCreateProductVariant.yaml
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.