productReorderVariants Mutation
Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook.
Arguments
#
Response
#
Returns ProductReorderVariants .
Example
#
mutation ($moves: [ReorderInput!]!, $productId: ID!) {
productReorderVariants(moves: $moves, productId: $productId) {
product {
id
publicationDate
description
descriptionHtml
externalId
externalSource
mpn
brand
manufacturer
model
seoTitle
seoDescription
name
slug
currency
updatedAt
createdAt
chargeTaxes
availableForPurchase
visibleInListings
overridePrice
overrideCurrency
status
subStatus
isPriceOverrideAllowed
isShippingRequired
isDigital
isAvailable
isAvailableForPurchase
sortOrder
isPublished
actions
sortPriorityWeight
}
productErrors {
field
message
code
attributes
}
}
}
3
{
"moves": [
{
"id": "aWQ6Mjc=",
"sortOrder": 42
}
],
"productId": "cHJvZHVjdElkOjEx"
}
3
{
"productReorderVariants": {
"product": {
"id": "aWQ6NzE=",
"publicationDate": "2022-03-06",
"description": "string",
"descriptionHtml": "string",
"externalId": "string",
"externalSource": "string",
"mpn": "string",
"brand": "string",
"manufacturer": "string",
"model": "string",
"seoTitle": "string",
"seoDescription": "string",
"name": "Acme",
"slug": "sample-slug",
"currency": "string",
"updatedAt": "2022-03-06T08:23:45.000Z",
"createdAt": "2022-03-06T08:23:45.000Z",
"chargeTaxes": true,
"availableForPurchase": "2022-03-06",
"visibleInListings": true,
"overridePrice": true,
"overrideCurrency": true,
"status": "DRAFT",
"subStatus": "IN_REVIEW",
"isPriceOverrideAllowed": true,
"isShippingRequired": true,
"isDigital": true,
"isAvailable": true,
"isAvailableForPurchase": true,
"sortOrder": 42,
"isPublished": true,
"actions": [
"DECLINED"
],
"sortPriorityWeight": 10.23
},
"productErrors": [
{
"field": "string",
"message": "string",
"code": "ALREADY_EXISTS",
"attributes": [
"YXR0cmlidXRlczozNg=="
]
}
]
}
}
3