Use the createProduct mutation to add a new product to the product catalog in Connect.
Before you begin
Before you format the mutation, revise the list of attributes available in the product catalog. 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 (required) | 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 retrieve 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 {
createProduct(
productInput: {
attributes: [
{ name: "productId", value: "SAX-004" }
{ name: "productName", value: "Saxophone" }
{ name: "unitPrice", value: 495.99 }
{ name: "currency", value: "GBP" }
]
}
) {
attributes {
name
value
}
}
}
Mutation arguments
productInput(required): Object - Contains the product data
Product input object
attributes(required): Array of objects - Product attribute data. At least one attribute (Product ID) is required. Each object represents a single attribute (see Attribute input object below).
Attribute input object
name(required): String - The name of the product attribute. To get attribute names, see Query product catalog.value(required): Varies by attribute type - The value for the product attribute
Mutation fields
attributes(required): Array of objects - The product attributes populated for the product (see Attribute response object below)metadata: Object - Tracking information (see Metadata object below)
Attribute response object
name: String - The name of the product attributetype: Enum - The data type. Valid values:TEXT,NUMBER,DATE,BOOLEAN,JSON,ARRAY.value: Varies by attribute type - The value of the product attribute
Metadata object
tracking: Object - Audit information (see Tracking object below)
Tracking object
createdAt: String - ISO 8601 timestamp when the product was added to Connect. Example:2025-06-16T14:14:54.574Z.createdBy: String - The login ID of the user who added the productlastModifiedAt: String - ISO 8601 timestamp when the product was last modified. Example:2025-06-16T14:14:54.574Z.lastModifiedBy: String - The login ID of the user who last modified the product
Response structure
The mutation returns a JSON response with this structure:
data: Object - Root response objectcreateProduct: Object - Contains all fields from the mutation
Example
Add a product with essential attributes.
mutation {
createProduct(
productInput: {
attributes: [
{ name: "productId", value: "DRU-014" }
{ name: "productName", value: "NeuroDrum Nexus" }
{
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."
}
{ name: "unitPrice", value: 4700 }
{ name: "currency", value: "GBP" }
{ name: "availability", value: "In stock" }
{ name: "brandName", value: "Vertex Audio Labs" }
{ name: "dateAdded", value: "2025-08-16T14:20:54.574Z" }
]
}
) {
attributes {
name
value
type
}
metadata {
tracking {
createdBy
createdAt
}
}
}
}
{
"data": {
"createProduct": {
"attributes": [
{
"name": "productId",
"value": "DRU-014",
"type": "TEXT"
},
{
"name": "productName",
"value": "NeuroDrum Nexus",
"type": "TEXT"
},
{
"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.",
"type": "TEXT"
},
{
"name": "unitPrice",
"value": 4700,
"type": "NUMBER"
},
{
"name": "currency",
"value": "GBP",
"type": "TEXT"
},
{
"name": "availability",
"value": "In stock",
"type": "TEXT"
},
{
"name": "brandName",
"value": "Vertex Audio Labs",
"type": "TEXT"
},
{
"name": "dateAdded",
"value": "2025-08-16T14:20:54.574Z",
"type": "DATE"
}
],
"metadata": {
"tracking": {
"createdBy": "[email protected]",
"createdAt": "2026-01-06T13:16:37.414Z"
}
}
}
}
}
