Saltar al contenido principal
POST
Create Asset

Autorizaciones

Authorization
string
header
requerido

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.

Parámetros de consulta

vendor_id
string
requerido

Vendor ID.

Cuerpo

application/json
name
string
requerido

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.

Opciones disponibles:
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

Respuesta

Successful Response

id
string
requerido

The id of the asset.

name
string
requerido

The name of the asset.

status
enum<string>
requerido

Approval status of the asset

Opciones disponibles:
pending_upload,
pending_approval,
upload_error,
approved,
rejected
productIds
string[]
requerido

The product ids that the asset is associated with.

brands
string[]
requerido

The brands that the asset is associated with.

metadata
Metadata · object
requerido

The metadata associated with the asset.

isExternal
boolean
requerido

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