Zum Hauptinhalt springen
POST
Create Asset

Autorisierungen

Authorization
string
header
erforderlich

A valid API key generated in Topsort's UI. Use the TSE API key if calling auctions or events API, otherwise use the TSC API key.

Abfrageparameter

vendor_id
string
erforderlich

Vendor ID.

Body

application/json
name
string
erforderlich

The name of the asset.

Maximum string length: 64
Pattern: ^[^<>/\\]+$
productIds
string[] | null

The product ids that the asset is associated with.

Maximum array length: 10
Maximum string length: 64
brands
string[] | null

The brands that the asset is associated with.

Maximum array length: 10
Maximum string length: 64
collectionIds
string[] | null

The collections that the asset is associated with.

Maximum array length: 10
Maximum string length: 38
mimetype
enum<string> | null

The mimetype of the asset.

Verfügbare Optionen:
image/jpeg,
image/png,
image/gif,
image/webp,
text/html,
video/mp4,
video/quicktime,
application/json,
text/vtt
metadata
Metadata · object | null

The metadata associated with the asset. Max key length is 32 characters and max value length is 64 characters.

externalUrl
string<uri> | null

URL of an externally hosted asset. If this value is provided, then the asset will not be hosted by Topsort.

Required string length: 1 - 2083

Antwort

Successful Response

id
string
erforderlich

The id of the asset.

name
string
erforderlich

The name of the asset.

status
enum<string>
erforderlich

Approval status of the asset

Verfügbare Optionen:
pending_upload,
pending_approval,
upload_error,
approved,
rejected
productIds
string[]
erforderlich

The product ids that the asset is associated with.

brands
string[]
erforderlich

The brands that the asset is associated with.

metadata
Metadata · object
erforderlich

The metadata associated with the asset.

isExternal
boolean
erforderlich

Indicates if the asset is externally hosted.

mimetype
string | null

The mimetype of the asset.

url
string<uri> | null

The url of the asset.

Required string length: 1 - 2083
fields
Fields · object | null

The fields to send with the pre-signed url. Can be empty if this is an external asset.

uploadUrl
string<uri> | null

The upload url the asset needs to be uploaded to.

Minimum string length: 1