Bulk update product card slugs
bulk_update_card_slugsChange storefront URL slugs for up to 100 product cards in one atomic request; if any card or slug is invalid, the entire batch is rejected and nothing is applied.
Instructions
Change the URL identifier (slug) of up to 100 product cards in one synchronous, atomic request — the only way to change a card's storefront URL (update_variant has no slug field). Address cards by product_card_id, read from Variant.product_card_id (get_variant/list_variants) — NOT a product id. No field returns the card slug: Variant.slug is the variant's own slug and does not change; verify the write by re-reading relative_link_url, which carries the new slug immediately. If a single item is invalid (card not found, card listed twice, slug malformed, repeated in the batch or already taken by another card) the whole request is rejected with 400 and NOTHING is applied; the response errors list names every offending card (product_card_id + code: PRODUCT_CARD_NOT_FOUND, DUPLICATE_ITEM, INVALID_SLUG, DUPLICATE_SLUG, SLUG_ALREADY_TAKEN). Old links keep working after the change. Do not assemble the new URL from the slug: read the storefront link from relative_link_url (list_variant_links), which follows the store's URL rules. Success returns {"ok":true}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"items": "<items>"
},
"name": "bulk_update_card_slugs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Slug updates, 1-100 items, one entry per product card. |