diff --git a/packages/core/types/src/product/common.ts b/packages/core/types/src/product/common.ts index 9c43e90b8a17e..470fa059e8428 100644 --- a/packages/core/types/src/product/common.ts +++ b/packages/core/types/src/product/common.ts @@ -697,6 +697,10 @@ export interface FilterableProductProps * The IDs to filter products by. */ id?: string | string[] + /** + * The external IDs to filter products by. + */ + external_id?: string | string[] /** * Filters only or excluding gift card products */ diff --git a/packages/medusa/src/api/utils/common-validators/products/index.ts b/packages/medusa/src/api/utils/common-validators/products/index.ts index bcb910cdf4fcd..a07bc2c471f2c 100644 --- a/packages/medusa/src/api/utils/common-validators/products/index.ts +++ b/packages/medusa/src/api/utils/common-validators/products/index.ts @@ -13,6 +13,7 @@ export const StoreGetProductParamsDirectFields = z.object({ handle: z.string().optional(), is_giftcard: booleanString().optional(), category_id: z.union([z.string(), z.array(z.string())]).optional(), + external_id: z.union([z.string(), z.array(z.string())]).optional(), collection_id: z.union([z.string(), z.array(z.string())]).optional(), tag_id: z.union([z.string(), z.array(z.string())]).optional(), type_id: z.union([z.string(), z.array(z.string())]).optional(),