Products API Routes
A product is a set of variants that the customer chooses from when making a purchase.
A product can be organized into categories or collections.
A product can have many options, and variants for each of these options' values.
These API routes allow admin users to manage products.
GET /admin/products#
List Products
Retrieve a list of products. The products can be filtered by fields such as id. The products can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.price_list_idstring | string[]OptionalqstringOptionalstatus("draft")[] | ("proposed")[] | ("published")[] | ("rejected")[]Optionalsales_channel_idstring | string[]Optionaltitlestring | string[]Optionalhandlestring | string[]Optionalidstring | string[]Optionalis_giftcardbooleanOptionaltype_idstring | string[]Optionalcategory_idstring | string[]Optionalcreated_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptional$andobject[]Optional$orobject[]Optionalcollection_idstring | string[]OptionalvariantsobjectOptionalFilter the retrieved products' variants.
variantsobjectOptionalwith_deletedbooleanOptionalexternal_idstring | string[]Optionaltag_idstring | string[]Optionaloption_idstring | string[]Optionaloption_value_idstring | string[]OptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberproductsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products#
Create Product
Create a product.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
titlestringsubtitlestringOptionaldescriptionstringOptionalis_giftcardbooleanOptionaldiscountablebooleanOptionalimagesobject[]OptionalThe product's images.
imagesobject[]OptionalthumbnailstringOptionalhandlestringOptionalstatus"draft" | "proposed" | "published" | "rejected"Optionaltype_idstringOptionalcollection_idstringOptionalcategoriesobject[]OptionalThe categories the product belongs to.
categoriesobject[]Optionaltagsobject[]OptionalThe product's tags.
tagsobject[]Optionaloptionsobject[]OptionalThe product's options.
optionsobject[]Optionalvariantsobject[]OptionalThe product's variants.
variantsobject[]Optionalsales_channelsobject[]OptionalThe sales channels the product is available in.
sales_channelsobject[]OptionalweightnumberOptionallengthnumberOptionalheightnumberOptionalwidthnumberOptionalhs_codestringOptionalmid_codestringOptionalorigin_countrystringOptionalmaterialstringOptionalmetadataobjectOptionalexternal_idstringOptionalshipping_profile_idstringOptionaladditional_dataobjectOptionaladditional_data parameter.Request examples
Responses
200 OK
productobjectThe product's details.
productobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.created: Emitted when product variants are created.product.created: Emitted when products are created.inventory-item.created: Emitted when inventory items are created.inventory-level.created: Emitted when inventory levels are created.
POST /admin/products/batch#
Manage Products
Manage products to create, update, or delete them.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
createobject[]OptionalThe products to create.
createobject[]Optionalupdateobject[]OptionalThe products to update.
updateobject[]Optionaldeletestring[]OptionalRequest examples
Responses
200 OK
createdobject[]The created products
createdobject[]updatedobject[]The updated products.
updatedobject[]deletedobjectThe deleted products' details.
deletedobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.updated: Emitted when product variants are updated.product-variant.created: Emitted when product variants are created.product.updated: Emitted when products are updated.product.created: Emitted when products are created.product.deleted: Emitted when products are deleted.product-option.deleted: Emitted when product options are deleted.inventory-item.created: Emitted when inventory items are created.inventory-item.deleted: Emitted when inventory items are deleted.inventory-level.created: Emitted when inventory levels are created.
POST /admin/products/export#
Export Products
Start a product export process to retrieve a CSV of exported products.
You'll receive in the response the transaction ID of the workflow generating the CSV file. To check the status of the execution, send a GET request to /admin/workflows-executions/export-products/:transaction-id.
Once the execution finishes successfully, a notification is created for the export. You can retrieve the notifications using the /admin/notification API route to retrieve the file's download URL.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.tagsobjectOptionalFilter products by their tags.
tagsobjectOptionalvariantsobjectOptionalFilter the products' variants.
variantsobjectOptionaltitlestring | string[]Optionalstatus("draft")[] | ("proposed")[] | ("published")[] | ("rejected")[]Optionalidstring | string[]Optionalsales_channel_idstring | string[]Optionalcreated_atobjectOptionalupdated_atobjectOptionalhandlestring | string[]Optionalis_giftcardbooleanOptionalcollection_idstring | string[]Optionaltype_idstring | string[]Optionaldeleted_atobjectOptionalorderstringOptional-.qstringOptionalcategory_idstring | string[]OptionallimitnumberOptionaloffsetnumberOptionalwith_deletedbooleanOptional$andobject[]Optional$orobject[]Optionalprice_list_idstring | string[]Optionalexternal_idstring | string[]Optionaltag_idstring | string[]Optionaloption_idstring | string[]Optionaloption_value_idstring | string[]OptionalRequest examples
Responses
202 OK
transaction_idstring/admin/workflows-executions/export-products/:transaction-id400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/import#
Create Product Import
Create a new product import process. The products aren't imported until the import is confirmed with the /admin/products/:transaction-id/import API route.
POST /admin/products/imports instead.Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Request body (application/json)
fileobjectRequest examples
Responses
202 OK
transaction_idstring/admin/products/:transaction-id/import API route.summaryobjectThe import's summary.
summaryobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.updated: Emitted when product variants are updated.product-variant.created: Emitted when product variants are created.product.updated: Emitted when products are updated.product.created: Emitted when products are created.product.deleted: Emitted when products are deleted.product-option.deleted: Emitted when product options are deleted.inventory-item.created: Emitted when inventory items are created.inventory-item.deleted: Emitted when inventory items are deleted.inventory-level.created: Emitted when inventory levels are created.
POST /admin/products/import/{transaction_id}/confirm#
Confirm Product Import
Confirm that a created product import should start importing the products into Medusa.
POST /admin/products/imports/:transaction_id/confirm instead.Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
transaction_idstringRequest examples
Responses
202 OK
400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/imports#
Create Product Import
Create a new product import process. The products aren't imported until the import is confirmed with the /admin/products/:transaction-id/imports API route.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Request body (application/json)
file_keystringoriginalnamestringextensionstringcsvsizenumbermime_typestringtext/csvRequest examples
Responses
202 OK
transaction_idstring/admin/products/:transaction-id/import API route.summaryobjectThe import's summary.
summaryobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/imports/{transaction_id}/confirm#
Confirm Product Import
Confirm that a created product import should start importing the products into Medusa.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
transaction_idstringRequest examples
Responses
202 OK
400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/products/{id}#
Get a Product
Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
productobjectThe product's details.
productobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/{id}#
Update a Product
Update a product's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
titlestringOptionalsubtitlestringOptionaldescriptionstringOptionalis_giftcardbooleanOptionaldiscountablebooleanOptionalimagesobject[]OptionalThe product's images.
imagesobject[]OptionalthumbnailstringOptionalhandlestringOptionalstatus"draft" | "proposed" | "published" | "rejected"Optionaltype_idstringOptionalcollection_idstringOptionalcategoriesobject[]OptionalThe product's categories.
categoriesobject[]Optionaltagsobject[]OptionalThe product's tags.
tagsobject[]Optionaloptionsobject[]OptionalThe product's options.
optionsobject[]Optionalvariantsobject[]OptionalThe product's variants. You can add new variants or update existing ones, passing their IDs in the object.
variantsobject[]Optionalsales_channelsobject[]OptionalThe sales channels that the product is available in.
sales_channelsobject[]OptionalweightnumberOptionallengthnumberOptionalheightnumberOptionalwidthnumberOptionalhs_codestringOptionalmid_codestringOptionalorigin_countrystringOptionalmaterialstringOptionalmetadataobjectOptionalexternal_idstringOptionaladditional_dataobjectOptionaladditional_data parameter.Request examples
Responses
200 OK
productobjectThe product's details.
productobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.updated: Emitted when product variants are updated.product.updated: Emitted when products are updated.
DELETE /admin/products/{id}#
Delete a Product
Delete a product.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "product"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product.deleted: Emitted when products are deleted.product-option.deleted: Emitted when product options are deleted.inventory-item.deleted: Emitted when inventory items are deleted.
POST /admin/products/{id}/images/{image_id}/variants/batch#
Manage Variants of Product Image
Manage the association between product variants and a product image. You can add or remove associations between variants and the image.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringimage_idstringRequest body (application/json)
addstring[]Optionalremovestring[]OptionalRequest examples
Responses
200 OK
addedstring[]removedstring[]400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.updated: Emitted when product variants are updated.
GET /admin/products/{id}/options#
List a Product's Options
Retrieve a list of options of a product. The options can be filtered by fields like id. The options can also be paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.qstringOptionalidstring | string[]Optionaltitlestring | string[]Optional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionalis_exclusivebooleanOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberproduct_optionsobject[]The list of product options.
product_optionsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/{id}/options/batch#
Add Options to Product
Add a list of options to a product.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest body (application/json)
addstring[] | object[]OptionalThe options to add to the product.
addstring[] | object[]Optionalremovestring[]Optionalupdateobject[]OptionalThe product's update.
updateobject[]OptionalRequest examples
Responses
200 OK
productobjectThe product's details.
productobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product.updated: Emitted when products are updated.
GET /admin/products/{id}/variants#
List Variants of a Product
Retrieve a list of variants in a product. The variants can be filtered by fields like FILTER FIELDS. The variants can also be paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.qstringOptionalidstring | string[]Optionalmanage_inventorybooleanOptionalmanage_inventory property is enabled.allow_backorderbooleanOptionalcreated_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionaleanstring | string[]Optionalupcstring | string[]Optionalbarcodestring | string[]Optionalskustring | string[]OptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumbervariantsobject[]The list of product variants.
variantsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/{id}/variants#
Create a Product Variant
Create a variant for a product.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
titlestringskustringOptionaleanstringOptionalupcstringOptionalbarcodestringOptionalhs_codestringOptionalmid_codestringOptionalallow_backorderbooleanOptionalmanage_inventorybooleanOptionalvariant_ranknumberOptionalweightnumberOptionallengthnumberOptionalheightnumberOptionalwidthnumberOptionalorigin_countrystringOptionalmaterialstringOptionalmetadataobjectOptionalpricesobject[]The variant's prices.
pricesobject[]optionsobjectOptionalinventory_itemsobject[]OptionalThe variant's inventory items to create.
inventory_itemsobject[]Optionaladditional_dataobjectOptionaladditional_data parameter.Request examples
Responses
200 OK
productobjectThe product's details.
productobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.created: Emitted when product variants are created.inventory-item.created: Emitted when inventory items are created.inventory-level.created: Emitted when inventory levels are created.
POST /admin/products/{id}/variants/batch#
Manage Variants in a Product
Manage variants in a product to create, update, or delete them.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
createobject[]OptionalThe product variants to create.
createobject[]Optionalupdateobject[]OptionalThe product variants to update.
updateobject[]Optionaldeletestring[]OptionalRequest examples
Responses
200 OK
createdobject[]The created product variants.
createdobject[]updatedobject[]The updated product variants.
updatedobject[]deletedobjectThe details of the deleted product variants.
deletedobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.updated: Emitted when product variants are updated.product-variant.created: Emitted when product variants are created.product-variant.deleted: Emitted when product variants are deleted.inventory-item.created: Emitted when inventory items are created.inventory-item.deleted: Emitted when inventory items are deleted.inventory-level.created: Emitted when inventory levels are created.
POST /admin/products/{id}/variants/inventory-items/batch#
Manage Variants Inventory in a Product
Manage a product's variant's inventoris to associate them with inventory items, update their inventory items, or delete their association with inventory items.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest body (application/json)
createobject[]OptionalThe associations to create between product variants and inventory items.
createobject[]Optionalupdateobject[]OptionalThe product variants to update their association with inventory items.
updateobject[]Optionaldeleteobject[]OptionalThe product variants to delete their association with inventory items.
deleteobject[]OptionalRequest examples
Responses
200 OK
createdobject | object[]A created association between a product variant and an inventory item.
createdobject | object[]updatedobject | object[]A created association between a product variant and an inventory item.
updatedobject | object[]deletedobject | object[]A created association between a product variant and an inventory item.
deletedobject | object[]400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/products/{id}/variants/{variant_id}#
Get Variant of a Product
Retrieve a product's variant by its ID.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringvariant_idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
variantobjectThe product variant's details.
variantobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/{id}/variants/{variant_id}#
Update a Product Variant
Update a variant's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringvariant_idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
titlestringOptionalskustringOptionaleanstringOptionalupcstringOptionalbarcodestringOptionalhs_codestringOptionalmid_codestringOptionalallow_backorderbooleanOptionalmanage_inventorybooleanOptionalvariant_ranknumberOptionalweightnumberOptionallengthnumberOptionalheightnumberOptionalwidthnumberOptionalorigin_countrystringOptionalmaterialstringOptionalmetadataobjectOptionalpricesobject[]OptionalThe product variant's prices.
pricesobject[]OptionaloptionsobjectOptionaladditional_dataobjectOptionaladditional_data parameter.Request examples
Responses
200 OK
productobjectThe product's details.
productobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.updated: Emitted when product variants are updated.
DELETE /admin/products/{id}/variants/{variant_id}#
Delete Product Variant
Delete a variant of a product.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringvariant_idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
idstringobjectstringdeletedbooleanDefault: "variant"
parentobjectOptionalThe product's details.
parentobjectOptional400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.deleted: Emitted when product variants are deleted.inventory-item.deleted: Emitted when inventory items are deleted.
POST /admin/products/{id}/variants/{variant_id}/images/batch#
Manage Images of Product Variant
Manage the association between product images and a product variant. You can add or remove associations between images and the variant.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringvariant_idstringRequest body (application/json)
addstring[]Optionalremovestring[]OptionalRequest examples
Responses
200 OK
addedstring[]removedstring[]400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-variant.updated: Emitted when product variants are updated.
POST /admin/products/{id}/variants/{variant_id}/inventory-items#
Associate Variant with Inventory Item
Associate with a product variant an inventory item that manages its inventory details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringvariant_idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
required_quantitynumberinventory_item_idstringRequest examples
Responses
200 OK
variantobjectThe product variant's details.
variantobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/products/{id}/variants/{variant_id}/inventory-items/{inventory_item_id}#
Update Product Variant's Inventory Details
Update the inventory item that manages the inventory details of a product variant.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringvariant_idstringinventory_item_idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
required_quantitynumberrequired_quantity. When the customer orders the quantity, Medusa reserves the ordered quantity multiplied by the value set for required_quantity.Request examples
Responses
200 OK
variantobjectThe product variant's details.
variantobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/products/{id}/variants/{variant_id}/inventory-items/{inventory_item_id}#
Remove Inventory Item Association with Product Variant
Remove the association between an inventory item and its product variant.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringvariant_idstringinventory_item_idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
idobjectA created association between a product variant and an inventory item.
idobjectobjectstringDefault: "variant-inventory-item-link"
deletedbooleanparentobjectThe product variant's details.
parentobject400, 401, 404, 409, 422, 500: an error response is returned.