POST
/
public
/
v1
/
assets
/
asset

Query Parameters

vendor_id
string
required

Vendor ID.

Body

application/json
name
string
required

The name of the asset.

Maximum length: 64
brands
string[]

The brands that the asset is associated with.

collectionIds
string[]

The collections that the asset is associated with.

externalUrl
string

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
metadata
object

The metadata associated with the asset.

mimetype
enum<string>

The mimetype of the asset.

Available options:
image/jpeg,
image/png,
image/gif,
image/webp,
text/html,
video/mp4,
video/quicktime,
application/json
productIds
string[]

The product ids that the asset is associated with.

Response

201 - application/json
brands
string[]
required

The brands that the asset is associated with.

id
string
required

The id of the asset.

isExternal
boolean
required

Indicates if the asset is externally hosted.

metadata
object
required

The metadata associated with the asset.

name
string
required

The name of the asset.

productIds
string[]
required

The product ids that the asset is associated with.

status
enum<string>
required

Approval status of the asset

Available options:
pending_upload,
pending_approval,
upload_error,
approved,
rejected
fields
object

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

mimetype
string

The mimetype of the asset.

uploadUrl
string

The upload url the asset needs to be uploaded to.

Minimum length: 1
url
string

The url of the asset.

Minimum length: 1