product Create Media
Requires access scope. Also: The user must have a permission to create media for a product.
Adds media files to a Product, such as images, videos, or 3D models. Media files enhance product listings by providing visual representations that help customers understand the product.
The mutation accepts an array of objects, each specifying the source URL, content type, and optional alt text.
You can add multiple media files in a single request. The mutation adds all valid files and returns errors for any invalid ones.
Arguments
- Anchor to mediamedia•[Create
Media Input!]! required List of new media to be added to a product.
- Anchor to productIdproduct•ID!
Id required Specifies the product associated with the media.
- Anchor to mediamedia•[Media!]
The newly created media.
- Anchor to mediaUserErrorsmedia•[Media
User Errors User Error!]! non-null The list of errors that occurred from executing the mutation.
- Anchor to productproduct•Product
The product associated with the media.
- Anchor to userErrorsuser•[User
Errors Error!]! non-nullDeprecated The list of errors that occurred from executing the mutation.