Skip to main content
POST
/
products
/
media
Upload Product Media
curl --request POST \
  --url https://staging-api.puppetvendors.com/products/media \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "filename": "<string>",
  "mimeType": "<string>",
  "resource": "<string>",
  "fileSize": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://dev.puppetvendors.com/llms.txt

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

V2 Preview — This endpoint is part of the V2 API preview. Breaking changes may occur.

Overview

Upload media to Shopify staging for later use in product creation. Returns a staged upload URL, HTTP parameters to POST the binary to, and a resourceUrl that can be passed into subsequent productSet calls.

Request Body

See ProductMediaUploadRequest in the OpenAPI spec. Typical fields:
filename
string
required
mimeType
string
required
E.g. image/png, image/jpeg, video/mp4.
resource
string
required
Shopify resource type — usually IMAGE or VIDEO.
fileSize
string
Size in bytes (some MIME types require this).

Response

200
{
  "success": true,
  "data": {
    "url": "https://shopify-staged-uploads.storage.googleapis.com/...",
    "resourceUrl": "gid://shopify/StagedUploadTarget/...",
    "parameters": {
      "Content-Type": "image/png",
      "acl": "private"
    }
  }
}

Example

curl -X POST "https://staging-api.puppetvendors.com/products/media" \
  -H "x-access-token: YOUR_VENDOR_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "hero.png",
    "mimeType": "image/png",
    "resource": "IMAGE"
  }'