Loading...
Was this page helpful?
This documentation provides a reference to the validateProductInputStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step validates that all provided products have options. If a product is missing options or a shipping profile, an error is thrown.
1const data = validateProductInputStep({2 products: [3 {4 title: "Shirt",5 options: [6 {7 title: "Size",8 values: ["S", "M", "L"]9 }10 ],11 variants: [12 {13 title: "Small Shirt",14 sku: "SMALLSHIRT",15 options: {16 Size: "S"17 },18 prices: [19 {20 amount: 10,21 currency_code: "usd"22 }23 ],24 manage_inventory: true,25 },26 ]27 }28 ]29})
ValidateProductInputStepInput
ValidateProductInputStepInputproducts
Omit<CreateProductWorkflowInputDTO, "sales_channels">[]