API version: unstable
API version: 2021-07 Release candidate
API version: 2021-04 Latest
API version: 2021-01
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

productCreateMedia mutation

Version unstable

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2021-07 (Release candidate)

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2021-04 (Latest)

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2021-01

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-10

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-07

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-04

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2020-01 (Unsupported)

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2019-10 (Unsupported)

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2019-07 (Unsupported)

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead

Version 2019-04 (Unsupported)

Creates media for a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
media ( [CreateMediaInput!]! ) required

List of new media to be added to a product.

productId ( ID! ) required

Specifies the product associated to the media.

CreateMediaInput fields

  • alt (String)

    The alt text associated to the media.

  • mediaContentType (MediaContentType!) Required

    The media content type.

  • originalSource (String!) Required

    The original source of the media object. May be an external URL or signed upload URL.

Return fields

  • media ([Media!])

    The newly created media.

  • mediaUserErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

  • product (Product)

    The product associated with the media.

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use mediaUserErrors instead