Skip to main content
PATCH
/
v1
/
product_medias
/
{id}
Update
curl --request PATCH \
  --url https://{defaultHost}/v1/product_medias/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_media": {
    "position": 1
  }
}
'
{
  "id": "fcf292a9-1f9e-4502-8802-c4cd4a03d480",
  "object": "product_media",
  "alt": null,
  "position": 1,
  "title": null,
  "url": null,
  "media": "c1a7c060-a508-40a5-94f9-360d2f14f63d",
  "product": "e89afcf1-d912-46d2-9387-a0218aa491e4",
  "created_at": 1778010903,
  "updated_at": 1778010903
}

Documentation Index

Fetch the complete documentation index at: https://developer.surecart.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
product_media
object

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

alt
string | null

The HTML alt attribute for the product media.

position
integer | null

The ordering position of this product media when displayed to customers.

title
string | null

The HTML title attribute for the product media.

url
string | null

Instead of attaching a Media record, a public URL can be set. If set, this URL will be used to serve the product media asset.

media

Expandable – The associated media ID.

product

Expandable – The associated product ID.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.