Manage the catalog
- One call per product:
product_upsertwith the whole product. Prices in minor units (price_amount: 34900= $349.00). Every product needs ≥1 variant; use a single variant titled "Default" when there are no options. - Publish with
status: "active"; drafts are invisible in the storefront. - Options (Talla, Color):
options: [{ name: "Talla", values: ["M", "L"] }]and one variant per combination withoption_values: { "Talla": "M" }. - Physical:
variants[].physical(weight_g and dimensions) andvariants[].inventory.on_hand. Stock with policydenynever oversells. - Digital: create the product, then
product_file_uploadwith the variant id and a local file path. Buyers get an expiring link by email. - Images:
media_addwith a URL or a local path; the first image is the one shown in listings. - Updates: send
id(and each variantid) to update in place. Variants left out are archived, not deleted; orders keep their snapshots. - Stock changes:
inventory_adjustwith a reason. - Use
dry_run: truewhen unsure; check results withproduct_get. - Collections ("Lo más vendido", "Regalos"):
collection_upsertwithtitleandproduct_idsin display order. The storefront filters with?collection=<slug>. Remove one withdelete: { id }; products are kept. - Discounts:
discount_upsert.kind: "percent"uses basis points (value: 1000= 10%),"fixed"uses minor units,"free_shipping"usesvalue: 0. Codes are uppercase;code: nullmakes an automatic discount. Limit withmin_subtotal_amount,usage_limit,per_customer_limit,starts_at/ends_at, orapplies_to: { type: "collections", collection_ids: [...] }. Call it with nodiscountto list the current ones. Used discounts cannot be deleted, only paused (status: "disabled"). - Many products at once:
products_importwith a CSV file path (our template, Spanish headers or a Shopify export). Always rundry_run: truefirst and show the owner the summary and row errors.products_bulkpublishes, drafts or archives a list of products; for prices it returns a preview, and you sendconfirm: trueonly after the owner approves it.
Raw Markdown for agents: skills/manage-catalog/SKILL.md · Edit on GitHub