Skip to main content

Crop and Re-embed a Catalog Image

POST 

/v1/api/quality/catalog/product-embeddings/:productId/:embeddingId/crop

Cuts one or more rectangular regions out of a catalog image and embeds each as its own reference image, for old full-frame captures that hold several products. The original image is then permanently deleted: its embedding rows (rotation, color and SIFT siblings), its media record and its stored file.

The crops are created as active. Cropping a pending image therefore approves it ("Crop & Approve"); cropping an active image keeps it approved. If the original was the product's thumbnail override, the override moves to the first crop.

Only images backed by a media record can be cropped; legacy base64 capture crops are rejected with 404. Cropping and embedding (every rotation of every crop) run before anything is written, and the original is only deleted once all crops are stored, so a failure leaves the original untouched. If another request already replaced or moved the image, or it was rejected or deleted, nothing is changed and the request fails with 409.

Auth Required

Required Permissions:

  • quality.catalog:write

The signed-in user must also belong to the product's site, which is looked up from the product itself (the request carries no site_id). API keys are not site-scoped and are checked on their permission alone.

Request​

Responses​

Crops created and the original deleted