AdminPostProductsReq
internal.internal.AdminPostProductsReq
Schema
The title of the Producttrue
will result in a Gift Card being created.
type: boolean
default: false
discountable:
description: A flag to indicate if discounts can be applied to the Line Items generated from this Product
type: boolean
default: true
images:
description: An array of images of the Product. Each value in the array is a URL to the image. You can use the upload API Routes to upload the image and obtain a URL.
type: array
items:
type: string
thumbnail:
description: The thumbnail to use for the Product. The value is a URL to the thumbnail. You can use the upload API Routes to upload the thumbnail and obtain a URL.
type: string
handle:
description: A unique handle to identify the Product by. If not provided, the kebab-case version of the product title will be used. This can be used as a slug in URLs.
type: string
status:
description: The status of the product. The product is shown to the customer only if its status is published
.
type: string
enum: [draft, proposed, published, rejected]
default: draft
type:
description: The Product Type to associate the Product with.
type: object
required:
collection_id: description: The ID of the Product Collection the Product belongs to. type: string tags: description: Product Tags to associate the Product with. type: array items: type: object required:
- value
properties:
id:
description: The ID of an existing Product Tag. If not provided, a new product tag will be created.
type: string
value:
description: The value of the Tag. If the `id`Sales channels to associate the Product with.`currency_code` is not provided.
type: string
currency_code:
description: The 3 character ISO currency code the price will be used in. This is only required if `region_id` is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
amount:
description: The price amount.
type: integer
min_quantity:
description: The minimum quantity required to be added to the cart for the price to be used.
type: integer
max_quantity:
description: The maximum quantity required to be added to the cart for the price to be used.
type: integer
options:
type: array
description: An array of Product Option values that the variant corresponds to. The option values should be added into the array in the same index as in the `options` field of the product.
externalDocs:
url: https://docs.medusajs.com/modules/products/admin/manage-products#create-a-product
description: Example of how to create a product with options and variants
items:
type: object
required:
- value
properties:
value:
description: The value to give for the Product Option at the same index in the Product's `options`Learn about the metadata attribute, and how to delete and update it.
Properties
categories
ProductProductCategoryReq[]collection_id
stringdescription
stringdiscountable
booleanRequiredhandle
stringheight
numberhs_code
stringimages
string[]is_giftcard
booleanRequiredlength
numbermaterial
stringmetadata
Record<string, unknown>mid_code
stringoptions
ProductOptionReq[]origin_country
stringsales_channels
ProductSalesChannelReq[]status
ProductStatussubtitle
stringtags
ProductTagReq[]thumbnail
stringtitle
stringRequiredtype
ProductTypeReqvariants
ProductVariantReq[]weight
numberwidth
number