The catalog admin atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/PloutusLab/krafta-web/llms.txt
Use this file to discover all available pages before exploring further.
/admin/catalog (the Operations Hub) is the master interface for managing every product that can appear in the Krafta storefront. It shows all products regardless of their active status, so drafts and deactivated items remain visible for editing. A status badge on each row displays Active in green or Draft in orange. The page also highlights any products that are missing a configured print area or have no uploaded mockup images under a “Requieren Acción” (requires action) section.
Deleting a product is irreversible — it performs a hard delete and cascades to all related
ProductVariant and PrintTemplate records. To hide a product from the storefront without permanent removal, set its active field to false by leaving the mockup image blank or reverting to the placeholder URL instead of hard-deleting.Create a product
New products are created through the three-step wizard at/admin/catalog/create.
Step 1 — Ficha Comercial: Fill in the product name, optional SKU, category, description, base price, and upload commercial photos via POST /api/upload. Color variants can be added with a name and hex code. The name field is required to advance to step 2.
Step 2 — Superficie: Upload a flat mockup image and draw the print area using the PrintAreaEditor component. Print area values are stored as percentages (0–100) relative to the mockup image dimensions, not in pixels.
Step 3 — Mockups Realistas: Configure the layered mockup scenes that customers will see in the design editor. Once saved, the wizard posts the full payload to POST /api/catalog.
POST /api/catalog — request body
Display name shown in the storefront and admin catalog list.
Customer-facing product description.
Name of the category to assign. If the category does not exist it is created automatically with a URL slug derived from the name.
Unique SKU for the base variant. Must be unique across the entire catalog — a duplicate SKU returns a
400 error with code P2002.Base sale price in USD. Must be a positive decimal.
Array of image URLs for the product photo carousel. The first element becomes the cover image (
thumbnailUrl).Print area configuration object. All coordinate fields are percentages (0–100) of the mockup image dimensions.
Product activation logic
A product is automatically set toactive: true by the API when both conditions are met:
- The
imagesarray contains at least one URL. - The
mockupImageUrlis not the placeholder path/mockups/tudisenoaqui.png(or/mockups/franela.png).
active: false (Draft) and will not appear in the public storefront until both requirements are satisfied.
Edit a product
Products can be edited at/admin/catalog/edit/[id]. The edit page calls GET /api/catalog?id=<productId>&editor=1 to load the current state, then submits changes via PUT /api/catalog.
PUT /api/catalog — request body
PrintTemplate record linked to the first variant. If no PrintTemplate exists yet, it is created with the provided values.
Delete a product
ProductVariant, PrintTemplate). This action cannot be undone.
Bulk CSV import
The catalog page supports bulk product import via a CSV file. Click Importación Masiva, select a.csv file, and the page processes each row sequentially using POST /api/catalog. Download the official template first to ensure correct column ordering:
| Column | Field |
|---|---|
sku | Variant SKU |
title | Product name |
description | Product description |
base_price | Base price (USD) |
currency | Currency code |
category | Category name |
