Mirrors Admin GraphQL stagedUploadsCreate. Step 1 of 3 for putting a local file on a product without base64 — the bytes go directly into Shopify's own storage.
Body: { input: StagedUploadInput[] }, each entry { filename, mimeType, resource, httpMethod?, fileSize? }. resource is IMAGE, VIDEO, FILE or MODEL_3D; fileSize is REQUIRED for VIDEO and MODEL_3D and Shopify rejects the call without it. httpMethod defaults to PUT.
Step 2 — PUT the bytes to stagedTargets[].url (curl -T ./cover.png "<url>"). Ask for POST instead and Shopify returns a parameters array you must replay as multipart form fields, which is strictly more work.
Step 3 — pass stagedTargets[].resourceUrl as originalSource to /products/{productId}/media. Pass resourceUrl, not url: url is where bytes go, resourceUrl is Shopify's handle for the stored file.
- Write — needs a write-scoped token.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
200OK — stagedUploadsCreate.stagedTargets[] with url, resourceUrl and parameters.
