Assets API

Create Asset

Creates an asset.

post/public/v1/assets/asset

Request

  • Base URL: https://api.topsort.com
  • URL: https://api.topsort.com/public/v1/assets/asset
  • Auth: HTTP bearer

Query parameters

vendor_idstring required

Vendor ID.

Request body

namestring required

The name of the asset.

productIdsstring[] nullable

The product ids that the asset is associated with.

brandsstring[] nullable

The brands that the asset is associated with.

mimetype'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'text/html' | 'video/mp4' | 'video/quicktime' | 'application/json' | 'text/vtt'
metadataobject nullable

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

externalUrlstring uri nullable

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

Response

Successful Response

idstring required

The id of the asset.

namestring required

The name of the asset.

mimetypestring nullable

The mimetype of the asset.

status'pending_upload' | 'pending_approval' | 'upload_error' | 'approved' | 'rejected' required
urlstring uri nullable

The url of the asset.

productIdsstring[] required

The product ids that the asset is associated with.

brandsstring[] required

The brands that the asset is associated with.

metadataobject required

The metadata associated with the asset.

isExternalboolean required

Indicates if the asset is externally hosted.

fieldsobject nullable

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

uploadUrlstring uri nullable

The upload url the asset needs to be uploaded to.

Changes

No recorded changes to this operation across all 1 revision of this API.