Skip to content

List the asset library

GET
/assets
curl --request GET \
--url 'https://app.currentpim.se/api/v1/assets?rights=ok&orientation=landscape' \
--header 'Authorization: Bearer <token>'

Pages in id order by cursor, narrowed by the library’s filters (the same ones as the library page and the MCP tool search_assets). A filter that can’t be read, or names an unknown category, collection or supplier, is refused with 422. Needs assets:read and assets.view.

cursor
string

The meta.next_cursor of the previous page; leave out for the first page.

limit
integer
>= 1 <= 500

Rows per page: 100 unless given, at most 500.

q
string
<= 255 characters

Words to find. Every word must be in the asset, in any of its code, file names, title, caption, alt text, tags, field values or metadata (values only, not the locale or field codes), or, for words of three characters or more, anywhere in the SKU of a live product the account may see that uses one of the asset’s files (its own value or inherited from a model; a few seconds after that product was saved); at most 8 words count.

tag
One of:
string
<= 100 characters

Only assets with this tag, ignoring case. Repeat as tag[]=a&tag[]=b for assets that have all of several tags (at most 10).

product
One of:
string
<= 255 characters

Only files a live product with exactly this SKU uses (ignoring case), its own value or inherited from a model. Repeat as product[]=A&product[]=B for files any of several products use (at most 100; products is read the same). A SKU no product has, or one the account may not see, finds nothing.

kind
One of:
string
Allowed values: image pdf document spreadsheet presentation video audio archive other

Only files of this kind. Repeat as kind[]=image&kind[]=pdf for files of any of several kinds.

category
string

An asset category code, with the categories below it.

uncategorized
boolean

Only assets filed in no category (ignored when category is given).

collection
string

An asset collection code: only assets in it.

supplier
string

A supplier code: only files that came from that supplier.

status
One of:
string
Allowed values: draft approved archived

Only assets in this status: approved files may leave the PIM, draft ones wait for approval, archived ones are no longer used. Repeat as status[]=draft&status[]=archived for any of several.

rights
string
Allowed values: ok not_yet expiring expired

Only assets in this usage-rights state.

unused
boolean

Only assets no live product and no open draft uses, as counted nightly.

duplicates
boolean

Only pictures that have a near duplicate, as found nightly.

creator
integer
>= 1

Only assets added by the user with this id.

from
string format: date

Only assets added on or after this day.

to
string format: date

Only assets added on or before this day.

updated_since
string format: date-time

Only assets changed at or after this time (ISO 8601).

orientation
string
Allowed values: landscape portrait square

Only pictures that lie this way, as they are shown.

min_width
integer
>= 1

Only pictures at least this many pixels wide, as they are shown.

max_width
integer
>= 1

Only pictures at most this many pixels wide.

min_height
integer
>= 1

Only pictures at least this many pixels high.

max_height
integer
>= 1

Only pictures at most this many pixels high.

min_size
integer
>= 1

Only files of at least this many bytes.

max_size
integer
>= 1

Only files of at most this many bytes.

fields

The workspace’s own asset fields of select or yes/no type to narrow by, by field code: fields[setting]=studio, fields[setting][]=studio&fields[setting][]=outdoor (any of them), fields[retouched]=1 (or 0, true, false). Several fields must all match (at most 10, with at most 20 answers each). An unknown field, a field of another type or an answer the field can’t have is refused with 422.

object
key
additional properties
One of:
string

A page of assets.

Media typeapplication/json
object
data
required
Array<object>
object
id
string
code
string
kind
string
Allowed values: image pdf document spreadsheet presentation video audio archive other
alt_text

Alt text per locale code.

object
key
additional properties
string
title

Title per locale code.

object
key
additional properties
string
caption

Caption per locale code.

object
key
additional properties
string
values

The workspace’s asset metadata fields (Settings → Metadata fields) in the product value structure: field code → “” → locale code or “” → value.

object
key
additional properties
object
tags
Array<string>
focal_point

The point cover renditions crop around, in 0–1 from the top left; null is the centre.

object
x
number
y
number
metadata

What the picture said about itself when it arrived (EXIF, IPTC, XMP): camera, lens, exposure, aperture, iso, focal_length, software, orientation, gps, title, caption, keywords, byline, credit, copyright, source, taken_at. Renditions carry none of it.

object
taken_at

When the picture was taken, from its metadata.

string | null format: date-time
rights

Usage rights: feeds leave out files that are expired or not yet usable.

object
license
string | null
holder
string | null
usable_from
string | null format: date
usable_until
string | null format: date
state
string
Allowed values: ok not_yet expiring expired
status

Draft, approved or archived: only approved files leave the PIM.

string
Allowed values: draft approved archived
deliverable

Whether the file may leave the PIM today: approved, and usable by its usage rights. Feeds, shops and share links leave out the others; product values keep naming them.

boolean
categories

Asset category codes.

Array<string>
supplier

The code of the supplier the file came from, when known.

string | null
source
string
Allowed values: library upload import url adopted edited
source_url
string | null
checksum

SHA-256 of the file.

string | null
file_names

Every name the file arrived under.

Array<string>
file
One of:
object
id
integer
reference

media:<id>, what product values and writes use.

string
name
string
file_name
string
mime_type
string
size

Bytes.

integer
width

Pixels across a picture as it is shown: one its camera turned a quarter (EXIF orientation 5 to 8) is measured turned. Null for other files and for pictures whose size can’t be read.

integer | null
height

Pixels down, likewise.

integer | null
orientation

How a picture lies, from its width and height.

string | null
Allowed values: landscape portrait square
url

Serves the file without a session for as long as it exists.

string
thumb_url

A 240 px JPEG, images only.

string | null
preview_url

A 1200 px JPEG, images only.

string | null
renditions

Lasting URLs of the file in every rendition of the workspace (Settings → Renditions), by rendition code: files/{tenant}/{media}/{rendition}/{version}.{ext}, immutable and cacheable for a year; the version changes with the file, its focal point and the rendition’s settings. Empty for files that can’t have renditions (documents without a preview).

object
key
additional properties
string
created_at
string | null format: date-time
updated_at
string | null format: date-time
meta
required
object
limit
required
integer
next_cursor
required

Pass back as cursor for the next page; null on the last page.

string | null
links
required
object
next
required

The URL of the next page, or null.

string | null

Example

{
"data": [
{
"kind": "image",
"rights": {
"state": "ok"
},
"status": "draft",
"source": "library",
"file": {
"orientation": "landscape"
}
}
]
}

No valid token (missing, revoked, expired, or the account is deactivated).

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

The token lacks the ability or the account the permission.

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

An invalid cursor, limit, kind or category.

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

More than the allowed requests a minute for this token; Retry-After says when to try again.

Media typeapplication/json
object
message
required
string
errors

Problems by field, e.g. values.price._._ or items.0.identifier (422 only).

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}