Media

Media is the write side of the image pipeline. You upload in three steps: mint a presigned upload credential, upload the bytes directly to the returned target, then finalize to confirm the object landed. Finalize flips the asset to ready and produces an assetRef that resolves to a CDN URL wherever it is referenced.

The upload -> finalize -> ready contract:

  1. Upload — POST .../media/uploads returns a presigned target and a pending asset row.
  2. Send bytes — the client uploads straight to the presigned target; no bytes flow through the API.
  3. Finalize — POST .../media/:id/finalize confirms the object landed and flips the asset to ready, at which point its assetRef is resolvable.

Media management (operator-managed)

Tenant-level media management is operator/console-managed. Merchants manage their own media through the merchant routes below.

MethodPathPurpose
POST/v1/tenants/:tenant/media/uploadsMint a presigned upload credential + a pending asset row.
POST/v1/tenants/:tenant/media/:id/finalizeConfirm the object landed and flip the asset to ready.
GET/v1/tenants/:tenant/mediaList a tenant’s assets.
GET/v1/tenants/:tenant/media/:idFetch one asset.

Merchant routes

fdk_ credential, tenant from the credential per credential-carries-ownership, scope manage:own_media. Mounted at /v1/merchant/media — the portal’s media library/upload.

MethodPathScopePurpose
GET/v1/merchant/media/assetsmanage:own_mediaList the caller’s assets.
GET/v1/merchant/media/assets/:idmanage:own_mediaFetch one asset.
POST/v1/merchant/media/uploadsmanage:own_mediaMint a presigned upload credential.
POST/v1/merchant/media/assets/:id/finalizemanage:own_mediaFinalize an uploaded asset.

Manifest gates

None. Media refs surface through the manifest’s brand.assets (logoRef / faviconRef / ogImageRef) and product imagery, but there is no per-store media on/off toggle.