POST
/
public
/
v1
/
assets
/
asset

Query Parameters

vendor_id
string
required

Vendor ID.

Body

application/json
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.

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
name
string
required

The name of the asset.

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.

fields
object

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

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.

mimetype
string

The mimetype of 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
uploadUrl
string

The upload url the asset needs to be uploaded to.

url
string

The url of the asset.