UpsertProductDTO

A product to be created or updated.

idstringOptional
The ID of the product to update. If not provided, a product is created instead. In that case, the title property is required.
titlestringOptional
The title of the product.
subtitlenull | stringOptional
The subttle of the product.
descriptionnull | stringOptional
The description of the product.
is_giftcardbooleanOptional
Whether the product is a gift card.
discountablebooleanOptional
Whether the product can be discounted.
thumbnailnull | stringOptional
The URL of the product's thumbnail.
handlestringOptional
The handle of the product. The handle can be used to create slug URL paths. If not supplied, the value of the handle attribute of the product is set to the slug version of the title attribute.
statusProductStatusOptional
The status of the product.
imagesUpsertProductImageDTO[]Optional
The associated images to create or update.
external_idnull | stringOptional
The id of the product in an external system
type_idnull | stringOptional
The product type to associate with the product.
collection_idnull | stringOptional
The product collection to associate with the product.
tag_idsstring[]Optional
The tags to associate with the product
category_idsstring[]Optional
The product categories to associate with the product.
optionsUpsertProductOptionDTO[]Optional
The associated options to create or update.
variantsUpsertProductVariantDTO[]Optional
The product variants to be created and associated with the product. You can also update existing product variants associated with the product.
widthnull | numberOptional
The width of the product.
heightnull | numberOptional
The height of the product.
lengthnull | numberOptional
The length of the product.
weightnull | numberOptional
The weight of the product.
origin_countrynull | stringOptional
The origin country of the product.
hs_codenull | stringOptional
The HS Code of the product.
materialnull | stringOptional
The material of the product.
mid_codenull | stringOptional
The MID Code of the product.
metadataMetadataTypeOptional
Holds custom data in key-value pairs.
Was this page helpful?
Edit this page
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break