List the assets of a record
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/assets/entity/example/example';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/stores/example/assets/entity/example/example \ --header 'x-api-key: <x-api-key>'Returns the assets linked to one record, such as a product or the store itself, ordered by their link position. Each asset carries its links. Narrow the result to one field of the record with entity_field.
Required scopes: read:assets
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Type of the record, such as product, collection, blog_post, blog_category, content_page, store or store_settings.
ID of the record.
The store’s ref, as returned by GET /stores.
Query Parameters
Section titled “Query Parameters”Only assets linked to this field, such as gallery or logo.
Responses
Section titled “Responses”object
Unique asset identifier
Owner type of the asset
Owner ID (user ID or store ID)
File name in storage
Original file name
MIME type of the file
File size in bytes
Storage provider
Storage bucket name
Storage path
Asset type
Public URL
CDN URL
File extension
Asset category
Image width in pixels
Image height in pixels
Video/audio duration in seconds
Asset metadata
object
Thumbnail URLs
object
Transformation settings
object
BlurHash for progressive loading
Dominant color in hex
Asset status
Asset visibility
Whether asset is approved
Moderation status
Moderation notes
Number of times asset has been accessed
Last access timestamp
Asset version number
Parent asset ID for versioning
External provider asset ID
External provider name
External provider metadata
object
Creation timestamp
Creator user ID
Last update timestamp
Last updater user ID
Deletion timestamp
Deleter user ID
Asset links (only included when include_links=true)
object
Link ID
Asset ID
Entity type (product, banner, store, etc.)
Entity ID
Field name (gallery, featured, logo, etc.)
Friendly name of the linked entity (product name, category name, etc.)
Sort order
Is primary asset
Extra metadata
object
Creator user ID
Creation timestamp
Example
[ { "id": "uuid-string", "owner_type": "user", "owner_id": "123", "file_name": "logo-1234567890.png", "original_name": "company-logo.png", "mime_type": "image/png", "file_size": 1024000, "storage_provider": "supabase", "storage_bucket": "public-cdn", "storage_path": "stores/store_123/branding/logo-1234.png", "asset_type": "image", "public_url": "https://example.com/image.png", "cdn_url": "https://cdn.example.com/image.png", "file_extension": "png", "asset_category": "product", "width": 1200, "height": 800, "duration": 120, "metadata": { "alt": "Company logo", "tags": [ "branding" ] }, "thumbnails": { "small": "url1", "medium": "url2", "large": "url3" }, "transformations": { "width": 800, "height": 600, "quality": 90 }, "blurhash": "LKO2?U%2Tw=w]~RBVZRi};RPxuwH", "dominant_color": "#3B82F6", "status": "active", "visibility": "public", "is_approved": true, "moderation_status": "approved", "moderation_notes": "Content is appropriate", "usage_count": 5, "last_accessed_at": "2024-01-01T12:00:00Z", "version": 1, "parent_asset_id": "parent-uuid", "external_id": "canva-design-id", "external_provider": "canva", "external_metadata": { "type": "design", "design": { "id": "canva-id" } }, "created_at": "2024-01-01T12:00:00Z", "created_by": "user-uuid", "updated_at": "2024-01-01T12:00:00Z", "updated_by": "user-uuid", "deleted_at": null, "deleted_by": null, "links": [ { "id": "12345", "asset_id": "uuid-string", "entity_type": "product", "entity_id": "123", "field": "gallery", "friendly_name": "Premium Leather Wallet", "sort_order": 0, "is_primary": false, "extra": { "alt": "Product image" }, "created_by": "user-uuid", "created_at": "2024-01-01T12:00:00Z" } ] }]The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}