productReorderMedia mutation
Asynchronously Reoders the media attached to a product.
Required access
write_products access scope.
On this page
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.
mutation productReorderMedia($id: ID!, $moves: [MoveInput!]!) { productReorderMedia(id: $id, moves: $moves) {} } { “id”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=”, “moves”: [
<font style="color:#1F61A0;">job</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">id</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">mediaUserErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">code</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font>
] }
<font style="color:#555555;">{</font><font style="color:#8B2BB9;">"id"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE="</font><font style="color:#555555;">,</font><font style="color:#8B2BB9;">"newPosition"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"placeholder"</font><font style="color:#555555;">}</font>
Arguments
MoveInput fields
- id (
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)) REQUIRED
The ID of the object to be moved. - newPosition (
[UnsignedInt64!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#unsignedint64-2021-01)) REQUIRED
The new position of the object in the set, using a 0 based index. 
Return fields
- job (
[Job](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/job))
The asynchronous job reordering the media. - mediaUserErrors (
[[MediaUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/mediausererror))
List of errors that occurred executing the mutation. 
Deprecated return fields
Show/Hide
- userErrors (
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror)) DEPRECATED
List of errors that occurred executing the mutation.
Deprecation warning
UsemediaUserErrorsinstead 
