Skip to main content
PATCH
Spree Admin SDK

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Path Parameters

product_id
string
required

Product ID

id
string
required

Digital asset ID

Body

application/json
signed_id
string

A signed_id from files.upload() with visibility: 'private'. On update it replaces the file for everyone who already bought it. A seller's file must be of a content type the marketplace accepts, checked against the file's own signature where it has one.

variant_id
string

On create, defaults to the product's default variant when omitted. On update, omitting it keeps the current variant.

authorized_clicks
integer | null

Null means the store's download settings apply.

authorized_days
integer | null

Null means the store's download settings apply.

provider_type
string

A provider shorthand from the providers endpoint. Omit for an uploaded file; a provider-backed asset sends no signed_id.

provider_settings
object

Values for the provider's settings schema, keyed by field name.

Response

200 - application/json

digital asset updated

id
string
required
variant_id
string | null
required
filename
string | null
required
content_type
string | null
required
authorized_clicks
number | null
required
authorized_days
number | null
required
byte_size
number | null
required
created_at
string
required
updated_at
string
required
provider_type
string | null
required

Digital asset provider; null is an uploaded file. Built-in: file. Extensions may register more.

provider_name
string
required

Digital asset provider name. Built-in: File. Extensions may register more.

download_url
string | null
required
effective_authorized_clicks
number
required
effective_authorized_days
number
required
provider_settings
object
required