BizKitHub
DokumentacePrůzkumník APIInternal/api/v1/internal/blob/create-product-image-variants
postInternalVeřejné 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

Parametry

Bez parametrů

Tento endpoint nepřijímá žádné parametry v cestě, query, hlavičce ani v těle.

Schéma odpovědi

1 zdokumentovaný stavový kód

200Úspěch

Tato odpověď nemá JSON tělo.

Ukázka odpovědi

application/json
{
  "success": true
}

Ukázka požadavku

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"

Potřebujete API klíč?

Všechny veřejné endpointy BizKitHub API se ověřují API klíčem.

Získat API klíč