Use the updateProduct mutation to update an existing product in the product catalog. You can change all attribute values except for Product ID.
Typical usage:
- Update product pricing and availability as inventory changes
- Refresh product descriptions and images for seasonal campaigns
- Correct product information errors
Before you begin
Before you format the mutation, revise the list of attributes available in the product catalog in Connect. If an attribute you need isn't listed, you must add it before running the mutation. For instructions, see Create a custom attribute in the product catalog.
Predefined product attributes
These product attributes are available in all Connect subscriptions.
| Name | Description | Data format |
|---|---|---|
availability | Availability status. Examples: "In stock", "Out of stock", "Back Order", "Pre-order". | Text |
brandName | The product brand or manufacturer | Text |
brandDescription | Brief description of the brand or manufacturer | Text |
category | Product classification. Examples: "Electronics" or "Electronics/Cables". | Text |
currency | The currency in which the price is represented. We recommend using ISO 4217 currency codes. Examples: "USD", "EUR", "GBP". | Text |
dateAdded | Shows when the product was added to the catalog or became available to clients. 💡 There is a related meta attribute in Connect that is populated automatically when you add a product to the catalog - tracking.createdAt. | Date. Required format: ISO 8601 timestamp. Example: 2025-08-16T14:20:54.574Z. |
discount | Discount amount or percentage applied to the price | Number |
imageUrls | Product image URLs | Array of text values. The text values must be full URLs starting with "http". |
inventoryQuantity | Number of units available in stock | Number |
model | Model name or number | Text |
msrp | Manufacturer's Suggested Retail Price / original price before discounts | Number |
productDescription | Product description | Text |
productId | Unique identifier for the product (cannot be updated) | Text |
productName | Product name | Text |
productRating | Average customer rating | Number |
productStatus | The current status of the product. Examples: "Active", "Active Mature", "Inactive", "Discontinued", "Obsolete". | Text |
productUrls | URLs of product pages | Array of text values. The text values must be full URLs starting with "http". |
sku | Stock Keeping Unit (internal tracking ID for inventory) | Text |
tags | Keywords or tags for searchability and custom categorization | Array of text values |
unitPrice | The current price of the product | Number |
Custom product attributes
Your catalog may also include custom attributes specific to your business needs. To get all available attributes with their data types, use the dataSets query. See Query the product catalog in Connect for instructions.
Running the mutation
If you haven't used our API before, see Using the Connect API for instructions. It explains how to authenticate your calls and suggests some tools for testing.
Basic mutation structure
mutation {
updateProduct(
productId: "SAX-004"
updatedProduct: {
attributes: [
{ name: "unitPrice", value: 525.99 }
{ name: "availability", value: "In stock" }
]
}
) {
modifiedCount
}
}
Mutation arguments
productId(required): String - The ID of the product to updateupdatedProduct(required): Object - Contains the product updates
Updated product object
attributes(required): Array of objects - Product attributes to update. Each object represents a single attribute (see Attribute input object below).
Attribute input object
name(required): String - The name of the product attribute to update. To get attribute names, see Query the product catalog in Connect.value(required): Varies by attribute type - The new value for the product attribute
Mutation fields
modifiedCount(required): Integer - The number of products updated (always 1 for successful updates)
Response structure
The mutation returns a JSON response with this structure:
data: Object - Root response objectupdateProduct: Object - Contains all fields from the mutation
Example
Update product pricing, availability and inventory information.
mutation {
updateProduct(
productId: "DRU-014"
updatedProduct: {
attributes: [
{ name: "unitPrice", value: 4500 }
{ name: "availability", value: "Pre-order" }
{ name: "Available Offline", value: true }
{ name: "discount", value: 200 }
{
name: "productDescription"
value: "Experience the future of rhythm with these ultra-advanced electronic drums, blending AI-driven sound modeling with ultra-responsive sensors for an unbelievably lifelike feel. Now available with enhanced bass response."
}
{
name: "productUrls"
value: [
"https://www.vertexaudiolabs.com/neurodrum-nexus"
"https://shop.example.com/drums/neurodrum-nexus"
]
}
]
}
) {
modifiedCount
}
}
{
"data": {
"updateProduct": {
"modifiedCount": 1
}
}
}
