quickUpdateProductField
Requires permission products:product:update.
Quick update a single product field - optimized for spreadsheet editing
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation QuickUpdateProductField($field: String!, $productId: String!) {
quickUpdateProductField(field: $field, productId: $productId)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation QuickUpdateProductField($field: String!, $productId: String!) {\n quickUpdateProductField(field: $field, productId: $productId)\n}",
"variables": {
"field": "string",
"productId": "string"
}
}
EOF
Variables:
{
"field": "string",
"productId": "string"
}
Response:
{
"data": {
"quickUpdateProductField": true
}
}
quickUpdateProductField(
field: String!
productId: String!
value: String
): Boolean!
Arguments
quickUpdateProductField.field ● String! non-null scalar
The name of the product field to change.
quickUpdateProductField.productId ● String! non-null scalar
The ID of the product.
quickUpdateProductField.value ● String scalar
The new value. Send null to clear the field.
Type
Boolean scalar
The Boolean scalar type represents true or false.