Skip to content

One asset

GET
/assets/{code}
curl --request GET \
--url https://app.currentpim.se/api/v1/assets/example \
--header 'Authorization: Bearer <token>'
code
required
string

The asset code.

The asset and its file.

Media typeapplication/json
object
data
required
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

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"
]
}
}

No asset with this code.

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"
]
}
}