BizKitHub
DocsAPI ReferenceInternal/api/v1/internal/blob/create-product-image-variants
postInternalPublic API v1

/api/v1/internal/blob/create-product-image-variants

Internal endpoint called by the scout image-variants worker (issue #80). Accepts 4 pre-rendered WebP buffers for a shop__product_image, uploads them to the same S3 directory as the source blob (deterministic key <source>.<code>-webp.webp), and returns the created core__blob rows. Idempotent: overlapping calls hit the (blob_path, organisation_id) unique constraint and return the existing rows.

Side effects (persist + invalidate):

  • Sets shop__product_image.variant_{thumb,card,hero,zoom}_webp_blob_id on the row.
  • Triggers updateProductReadModel([product_id]) so /product/detail and /product/feed ship the fresh URLs on the next fetch. A best-effort try/catch protects the endpoint from a failed rebuild — the variant upload itself always succeeds.
internalpostApiV1InternalBlobCreate-product-image-variants

Parameters

No parameters required

This endpoint takes no path, query, header or body parameters.

Response schema

1 status code documented

200Success

This response returns no JSON body.

Response example

application/json
{
  "success": true
}

Request example

POST /api/v1/internal/blob/create-product-image-variants

post
curl -X POST "https://api.bizkithub.com/api/v1/internal/blob/create-product-image-variants" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key