diff --git a/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx b/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx index 3a9065bba3..81a81619f8 100644 --- a/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx +++ b/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx @@ -237,7 +237,7 @@ curl -X POST 'http://localhost:9000/admin/products' \ }' ``` -Make sure to replace `{token}` with the token you received from the previous request, `shipping_profile_id` with the ID of a shipping profile in your application, and `{brand_id}` with the ID of a brand in your application. +Make sure to replace `{token}` with the token you received from the previous request, `shipping_profile_id` with the ID of a shipping profile in your application, and `{brand_id}` with the ID of a brand in your application. You can retrieve the ID of a shipping profile either from the Medusa Admin, or the [List Shipping Profiles API route](!api!/admin#shipping-profiles_getshippingprofiles). The request creates a product and returns it. diff --git a/www/apps/book/app/learn/fundamentals/api-routes/additional-data/page.mdx b/www/apps/book/app/learn/fundamentals/api-routes/additional-data/page.mdx index a81643ddd9..909440232e 100644 --- a/www/apps/book/app/learn/fundamentals/api-routes/additional-data/page.mdx +++ b/www/apps/book/app/learn/fundamentals/api-routes/additional-data/page.mdx @@ -117,6 +117,7 @@ curl -X POST 'http://localhost:9000/admin/products' \ "values": ["Default option value"] } ], + "shipping_profile_id": "{shipping_profile_id}", "additional_data": { "brand": "Acme" } @@ -125,7 +126,7 @@ curl -X POST 'http://localhost:9000/admin/products' \ -Make sure to replace the `{token}` in the authorization header with an admin user's authentication token. +Make sure to replace the `{token}` in the authorization header with an admin user's authentication token, and `{shipping_profile_id}` with an existing shipping profile's ID. diff --git a/www/apps/book/app/learn/fundamentals/custom-cli-scripts/seed-data/page.mdx b/www/apps/book/app/learn/fundamentals/custom-cli-scripts/seed-data/page.mdx index c6c1b51c06..a24559d8d1 100644 --- a/www/apps/book/app/learn/fundamentals/custom-cli-scripts/seed-data/page.mdx +++ b/www/apps/book/app/learn/fundamentals/custom-cli-scripts/seed-data/page.mdx @@ -124,6 +124,7 @@ const productsData = new Array(productsNum).fill(0).map((_, index) => { Size: sizeOptions[Math.floor(Math.random() * 3)], }, })), + shipping_profile_id: "sp_123", sales_channels: [ { id: defaultSalesChannel[0].id, diff --git a/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx b/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx index 9bb7371075..f09cb0b101 100644 --- a/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx @@ -176,6 +176,7 @@ export const createMultiPartProductsWorkflow = createWorkflow( values: ["Default Variant"], }, ], + shipping_profile_id: "sp_123", }, ], }, @@ -229,6 +230,7 @@ export const createBundledProducts = createWorkflow( products: [ { title: "Shirt", + shipping_profile_id: "sp_123", variants: [ { title: "Shirt", @@ -253,6 +255,7 @@ export const createBundledProducts = createWorkflow( }, { title: "Pants", + shipping_profile_id: "sp_123", variants: [ { title: "Pants", @@ -277,6 +280,7 @@ export const createBundledProducts = createWorkflow( }, { title: "Shoes", + shipping_profile_id: "sp_123", variants: [ { title: "Shoes", @@ -381,6 +385,7 @@ export const createBundledProducts = createWorkflow( products: [ { title: "Bundled Clothes", + shipping_profile_id: "sp_123", variants: [ { title: "Bundle", diff --git a/www/apps/resources/app/commerce-modules/product/extend/page.mdx b/www/apps/resources/app/commerce-modules/product/extend/page.mdx index 76a8732954..dc0e241ac5 100644 --- a/www/apps/resources/app/commerce-modules/product/extend/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/extend/page.mdx @@ -319,6 +319,7 @@ curl -X POST 'localhost:9000/admin/products' \ "values": ["Default option value"] } ], + "shipping_profile_id": "{shipping_profile_id}", "additional_data": { "custom_name": "test" } @@ -327,6 +328,8 @@ curl -X POST 'localhost:9000/admin/products' \ Make sure to replace `{token}` with an admin user's JWT token. Learn how to retrieve it in the [API reference](!api!/admin#1-bearer-authorization-with-jwt-tokens). +Also, make sure to replace `{shipping_profile_id}` with an existing shipping profile's ID. You can retrieve one either from the Medusa Admin dashboard or using the [List Shipping Profiles API Route](!api!/admin#shipping-profiles_getshippingprofiles). + The request will return the product's details. You'll learn how to retreive the `custom_name` property with the product's details in the next section. ---