Skip to content

Assets

The asset library holds the workspace’s pictures, documents and videos. Reading it needs the assets:read ability. The account sees only the files its asset category scopes let it see; any other file answers 404, as if it didn’t exist. Product reads still give the files that a product’s values name, since access to the product decides those.

GET /api/v1/assets lists the library’s files in a stable order, with the same cursor paging as the product list: limit, meta.next_cursor and links.next. These parameters narrow it, the same ones as on the library page and in the MCP tool:

Parameter Keeps
q Assets that hold every word (at most 8), in their code, file names, title, caption, alt text, tags, field values or metadata. Words of three characters or more also match the SKU of a product the account may see that uses the file
tag Assets with the tag, ignoring case. tag[]=a&tag[]=b keeps assets that have all of them (at most 10)
product Files a product with exactly that SKU uses, ignoring case, its own or inherited from a model. product[]=A&product[]=B keeps files any of them uses (at most 100)
kind Files of the kind: image, pdf, document, spreadsheet, presentation, video, audio, archive, other. kind[]=image&kind[]=pdf keeps either
category, uncategorized Assets filed in the asset category (its code) or below it, or filed in no category
collection, supplier Assets in the collection, or files that came from the supplier (by code)
status draft, approved or archived; status[]=draft&status[]=archived keeps either
rights The usage-rights state: ok, not_yet, expiring or expired
unused, duplicates Assets nothing uses, and pictures with a near duplicate (both worked out nightly)
from, to Assets added between two days (YYYY-MM-DD, inclusive)
updated_since Assets changed at or after a time (ISO 8601)
orientation Pictures that lie landscape, portrait or square, as they are shown
min_width, max_width, min_height, max_height Pictures at least or at most that many pixels wide or high, as they are shown
min_size, max_size Files of at least or at most that many bytes
fields The workspace’s own asset fields of select or yes/no type, by code: fields[setting]=studio, fields[setting][]=studio&fields[setting][]=outdoor (any of them), fields[retouched]=1

A filter the API can’t read (an unknown kind, a broken date), or one that names a category, collection, supplier or asset field that doesn’t exist, answers 422.

GET /api/v1/assets/{code} reads one asset:

  • code, kind, and alt_text, title and caption per locale;
  • values: the workspace’s asset fields, in the product value shape with "_" for the channel;
  • tags, categories, supplier (the supplier’s code or null) and file_names (the names the file arrived under);
  • focal_point: {x, y} from 0 to 1, from the top left, which cropped renditions keep in view; null is the centre;
  • metadata: what the picture said about itself when it arrived, such as camera, lens, keywords, byline, copyright and taken_at;
  • rights: license, holder, usable_from, usable_until, and state;
  • status (draft, approved or archived) and deliverable: whether the file may leave the PIM today, which means approved and usable under its rights. Feeds, shops and share links leave out the others, while product values keep naming them;
  • file: id, reference (media:<id>, what product values use), name, file_name, mime_type, size in bytes, and a picture’s width, height and orientation as it is shown.

The file also carries addresses that serve it without a session for as long as it exists: url (the original), thumb_url (240 px), preview_url (1200 px), and renditions, the file in every rendition the workspace has set up under Settings › Renditions, by code. A rendition’s address never changes what it serves, so it may be cached for a year: when the file is replaced, its focal point moves or the rendition’s settings change, the address changes instead. A rendition is made the first time it is asked for. Documents without a preview have no renditions.