Skip to main content
POST
/
v1
/
downloads
Create
curl --request POST \
  --url https://{defaultHost}/v1/downloads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "download": {
    "media": "3668c771-7538-4adf-ac71-328b81b63222",
    "product": "608aeae7-52c1-4e7c-a902-603f33f589af"
  }
}
'
{
  "id": "cd13e33f-95e4-48fd-838f-28c8c65d4828",
  "object": "download",
  "alt": null,
  "archived": false,
  "archived_at": null,
  "name": null,
  "title": null,
  "url": null,
  "media": "3668c771-7538-4adf-ac71-328b81b63222",
  "product": "608aeae7-52c1-4e7c-a902-603f33f589af",
  "variant": null,
  "created_at": 1778010876,
  "updated_at": 1778010876
}

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.

Body

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

archived
boolean

Whether or not this download is archived.

name
string | null

The name of this download which will be visible to customers. This is required if a url is used instead of attaching a Media record.

title
string | null

The HTML title attribute for the download.

url
string | null

Instead of attaching a Media record a public URL can be set. If set, customers will be directed to this URL.

archived_at
integer | null

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

media

Expandable – The associated media ID.

product

Expandable – The associated product ID.

variant

Expandable – The associated variant 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.