Updates which sellers are allowed to sell in a product category by creating and removing seller–category links in one call — the mechanism behind restricted categories. Triggered by POST /admin/product-categories/:id/sellers. No events are emitted.
Usage
import { linkSellersToProductCategoryWorkflow } from "@mercurjs/core/workflows"
await linkSellersToProductCategoryWorkflow(container).run({
input: {
id: "pcat_01H...",
add: ["sel_01H..."],
remove: ["sel_01J..."],
},
})
Id of the product category whose seller links are being updated.
Seller ids to link to the category.
Seller ids to unlink from the category.
Result
Returns nothing; the links are created and removed in place.