Staged Uploads Create Payload
Return type for mutation.
Anchor to FieldsFields
- stagedTargets ([StagedMediaUploadTarget!])
- userErrors ([UserError!]!)
- Anchor to stagedTargetsstaged•[Staged
Targets Media Upload Target!] The staged upload targets that were generated.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Anchor to Mutations with this payloadMutations with this payload
- stagedUploadsCreate (StagedUploadsCreatePayload)
- •mutation
Creates staged upload targets for file uploads such as images, videos, and 3D models.
Use the
mutation instead of direct file creation mutations when:- Uploading large files: Files over a few MB benefit from staged uploads for better reliability
- Uploading media files: Videos, 3D models, and high-resolution images
- Bulk importing: CSV files, product catalogs, or other bulk data
- Using external file sources: When files are stored remotely and need to be transferred to Shopify
The
mutation is the first step in Shopify's secure two-step upload process:Step 1: Create staged upload targets (this mutation)
- Generate secure, temporary upload URLs for your files.
- Receive authentication parameters for the upload.
Step 2: Upload files and create assets
- Upload your files directly to the provided URLs using the authentication parameters.
- Use the returned
as thein subsequent mutations like.
This approach provides better performance for large files, handles network interruptions gracefully, and ensures secure file transfers to Shopify's storage infrastructure.
Note: File size is required when uploading <a href="https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-VIDEO"><code><span class="PreventFireFoxApplyingGapToWBR">V<wbr/>I<wbr/>D<wbr/>E<wbr/>O</span></code></a> or <a href="https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-MODEL_3D"><code><span class="PreventFireFoxApplyingGapToWBR">M<wbr/>O<wbr/>D<wbr/>E<wbr/>L<wbr/>_3<wbr/>D</span></code></a> resources.
After creating staged upload targets, complete the process by:
- Uploading files: Send your files to the returned
urlusing the providedparametersfor authentication - Creating file assets: Use the
as thein mutations such as:
Learn more about uploading media to Shopify.
- Anchor to inputinput•[Staged
Upload Input!]! required The information required to generate staged upload targets.
Arguments