Skip to main content
PATCH
/
public
/
v1
/
assets
/
asset
/
{asset-id}
Update Asset
curl --request PATCH \
  --url https://api.topsort.com/public/v1/assets/asset/{asset-id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "productIds": [
    "<string>"
  ],
  "brands": [
    "<string>"
  ],
  "collectionIds": [
    "<string>"
  ],
  "metadata": {}
}'
{
  "id": "<string>",
  "name": "<string>",
  "mimetype": "<string>",
  "status": "pending_upload",
  "url": "<string>",
  "productIds": [
    "<string>"
  ],
  "brands": [
    "<string>"
  ],
  "metadata": {},
  "isExternal": true,
  "collections": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Path Parameters

asset-id
string
required

Asset ID.

Body

application/json
name
string | null

The name of the asset.

Maximum length: 64
productIds
string[] | null

The product ids that the asset is associated with.

Maximum length: 10
brands
string[] | null

The brands that the asset is associated with.

Maximum length: 10
collectionIds
string[] | null

The collections that the asset is associated with.

Maximum length: 10
metadata
object | null

The metadata associated with the asset.

Response

Successful Response

id
string
required

The id of the asset.

name
string
required

The name of the asset.

status
enum<string>
required

Approval status of the asset

Available options:
pending_upload,
pending_approval,
upload_error,
approved,
rejected
productIds
string[]
required

The product ids that the asset is associated with.

brands
string[]
required

The brands that the asset is associated with.

metadata
object
required

The metadata associated with the asset.

isExternal
boolean
required

Indicates if the asset is externally hosted.

collections
string[]
required

The collections that the asset is associated with.

mimetype
string | null

The mimetype of the asset.

url
string<uri> | null

The url of the asset.

Required string length: 1 - 2083