younifyd
Menu

productReorderMedia

Reorders media attached to a product, changing their sequence in product displays. The operation processes asynchronously to handle products with large media collections.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the productReorderMedia action (under Product).
  3. Fill in the fields below, then reference the result from later steps as {{productreordermedia.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation ProductReorderMedia($id: ID!, $moves: [MoveInput!]!) {
  productReorderMedia(id: $id, moves: $moves) {
    job {
      done
      id
      query {
        appDiscountTypes
        availableBackupRegions
        availableCarrierServices
        availableLocales
        backupRegion
        businessEntities
        catalogOperations
        collectionConditionMetafieldDefinitions
        collectionRulesConditions
        consentPolicyRegions
        currentAppInstallation
        currentStaffMember
        deliveryPromiseSettings
        financeAppAccessPolicy
        financeKycInformation
        fulfillmentConstraintRules
        giftCardConfiguration
        inventoryProperties
        locationsAvailableForDeliveryProfiles
        metafieldDefinitionTypes
        onlineStore
        pendingOrdersCount
        primaryMarket
        privacySettings
        publicApiVersions
        serverPixel
        shop
        shopBillingPreferences
        shopifyPaymentsAccount
        storeCreditConfiguration
        taxonomy
      }
    }
    mediaUserErrors {
      code
      field
      message
    }
    userErrors {
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

idstringrequired

The ID of the product on which to reorder medias.

movesarray<object>required

A list of moves to perform which will be evaluated in order.

idstringrequired
newPositionstringrequired
json
{
  "id": "string",
  "moves": [
    {
      "id": "string",
      "newPosition": "string"
    }
  ]
}

Response

Read the result with {{productreordermedia.response.data.data.productReorderMedia}}. If the API returns errors, the step fails and they are at {{productreordermedia.response.data.errors}}.

jobobject
doneboolean
idstring
queryobject31 fields
mediaUserErrorsarray<object>
codeobject
fieldobject
messageobject
userErrorsarray<object>
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.