Queries and mutations for managing Products in the platform.
Queries
Query Products
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
projectExpandedProductsBoolean | Default: false |
localeProjectionArray of Locale | |
skusArray of String | Queries for products with specified SKUs |
Get Product
Mutations
Create Product
Update Product
| Arguments | |
|---|---|
versionLong | |
actionsArray of ProductUpdateAction | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Delete Product
Output types
Product
idString | Unique identifier of the Product. |
keyString | User-defined unique identifier of the Product. This is different from the key of a ProductVariant. |
versionLong | Current version of the Product. |
productTypeRef | The Product Type defining the Attributes of the Product. Cannot be changed. |
productType | The Product Type defining the Attributes of the Product. Cannot be changed. |
masterData | Contains the current and the staged representation of the product information. |
skusArray of String | |
createdAt | Date and time (UTC) the Product was initially created. |
lastModifiedAt | Date and time (UTC) the Product was last updated. |
stateRef | State of the Product. |
state | State of the Product. |
priceMode | Type of Price to be used when looking up a price for the Product. Can beEmbedded, or Standalone |
taxCategoryRef | The TaxCategory of the Product. |
taxCategory | The TaxCategory of the Product. |
reviewRatingStatistics | Review statistics of the Product. |
productSelectionRefs | |
createdBy | IDs and references that created the Product. |
lastModifiedBy | IDs and references that last modified the Product. |
ProductCatalogData
current | Current (published) data of the Product. |
staged | Staged (unpublished) data of the Product. |
publishedBoolean | Whether the current representation of the Product is retrievable in the Product Projection endpoints and indexed for Product Search. |
hasStagedChangesBoolean | Whether the staged data is different from the current data. |
ProductData
nameString | |
descriptionString | |
nameAllLocalesArray of LocalizedString | |
descriptionAllLocalesArray of LocalizedString | |
slugString | |
slugAllLocalesArray of LocalizedString | |
categoryOrderHintString | |
categoryOrderHintsArray of CategoryOrderHint | |
categoriesRefArray of Reference | |
categoriesArray of Category | |
searchKeywordArray of SearchKeyword | |
searchKeywordsArray of SearchKeywords | |
metaTitleString | |
metaTitleAllLocalesArray of LocalizedString | |
metaKeywordsString | |
metaKeywordsAllLocalesArray of LocalizedString | |
metaDescriptionString | |
metaDescriptionAllLocalesArray of LocalizedString | |
masterVariant | |
variantsArray of ProductVariant | |
allVariantsArray of ProductVariant | Fetch all variants, including the master variant in first position. |
variant | |
skusArray of String | |
attributesRawArray of RawProductAttribute | |
defaultVariantRef | |
defaultVariant |
CategoryOrderHint
categoryIdString | |
orderHintString |
SearchKeyword
textString | Text to return in the SuggestionResult. |
suggestTokenizer | If no tokenizer is defined, the text is used as a single token. |
SuggestTokenizer
typeString |
SearchKeywords
locale | |
searchKeywordsArray of SearchKeyword |
ProductVariant
Classic.
When the Project has the Modular catalog model, use the Variants API instead.idInt | A unique, sequential identifier of the Product Variant within the Product. |
keyString | User-defined identifier of the ProductVariant. Unique among ProductVariants in the same Product. This is different from Product key. |
skuString | User-defined SKU of the Product Variant. Unique across all ProductVariants in a Project. |
pricesArray of ProductPrice | If the Product is projected by Store, this field only contains Embedded Prices that are valid for that Store.
Cannot contain two Embedded Prices with the same scopes (currency, country, Customer Group, Channel, validFrom and validUntil). |
price | Returns a single price based on the price selection rules. |
allRecurrencePricesArray of ProductPrice | Returns all recurrence prices based on the price selection rules. |
imagesArray of Image | Images of the Product Variant. |
assetsArray of Asset | Media assets of the Product Variant. |
availability | Set if the Product Variant is tracked by Inventory.
Can be used as an optimization to reduce calls to the Inventory service.
May not contain the latest Inventory State (it is eventually consistent). |
attributesRawArray of RawProductAttribute | This field contains raw attributes data |
ProductPrice
idString | |
value | |
keyString | |
country | |
customerGroup | |
customerGroupRef | |
channel | |
channelRef | |
validFrom | |
validUntil | |
discounted | |
tiersArray of ProductPriceTier | |
custom | |
recurrencePolicy | |
recurrencePolicyRef |
DiscountedProductPriceValue
value | |
discountRef | |
discount |
ProductPriceTier
minimumQuantityInt | |
value |
ProductVariantAvailabilityWithChannels
noChannel | |
channels |
ProductVariantAvailability
Product variant availability
isOnStockBoolean | Whether the Product Variant is in stock, based on an InventoryEntry that has no assigned supply Channel.
This value reflects global or default availability; it does not aggregate the channel-specific availabilities found in the channels field. |
restockableInDaysInt | Number of days to restock a Product Variant once it is out of stock. |
availableQuantityLong | Number of items of the Product Variant that are in stock. |
versionLong | Current version of the InventoryEntry. |
idString | Unique identifier of the InventoryEntry. |
ProductVariantAvailabilitiesResult
Product variant availabilities
limitInt | |
offsetInt | |
totalInt | |
resultsArray of ProductVariantAvailabilityWithChannel |
ProductVariantAvailabilityWithChannel
channelRef | |
channel | |
availability |
RawProductAttribute
attributeDefinition | |
nameString | |
valueJson | |
attributesRawArray of RawProductAttribute | BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta |
referencedResource | |
referencedResourceSetArray of ReferenceExpandable |
AttributeDefinition
type | Describes the Type of the Attribute. |
nameString | User-defined name of the Attribute that is unique within the Project. |
labelString | Human-readable label for the Attribute. |
isRequiredBoolean | Whether the Attribute must have a value on a ProductVariant. |
attributeConstraint | Specifies how Attributes are validated across all variants of a Product. Can beNone, Unique, CombinationUnique, or SameForAll |
level | Specifies whether the Attribute is defined at the Product or Variant level. Can beVariant, or Product |
inputTipString | Provides additional Attribute information to aid content managers configure Product details. |
inputHint | Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType). Can be SingleLine, or MultiLine |
isSearchableBoolean | Whether the Attribute's values are available in the Product Search or the Product Projection Search API for use in full-text search queries, filters, and facets.
However, if an Attribute's
level is set as Product, then Product Projection Search does not support the Attribute.
To use the Attribute in search, filters, or facets, set isSearchable to true for all AttributeDefinitions with the same name across different ProductTypes.
If the isSearchable values are different, the Attribute isn't available for search, filters, or facets.The exact features that are available with this flag depend on the specific AttributeType.
The maximum size of a searchable field is restricted by the Field content size limit.
This constraint is enforced at both Product creation and Product update.
If the length of the input exceeds the maximum size, an InvalidField error is returned. |
savedToLineItemBoolean | Whether the Attribute value is copied onto the LineItem when the Product is added to a Cart.
When
false, the Attribute value is excluded from the Line Item variant. Line Items already in a Cart are not immediately affected by a change to this value. Existing Line Items are updated the next time their Product data is refreshed, such as when a Recalculate update action is performed with updateProductData set to true, or on a Cart update that triggers an API Extension. Replicating a Cart creates a new Cart that contains the current Product data; it does not update the original Cart.When savedToLineItem is false, LineItem predicates that reference this Attribute, such as those in Cart Discounts and Shipping Methods, evaluate as if the Attribute is not set. |
labelAllLocalesArray of LocalizedString | Human-readable label for the Attribute. |
inputTipAllLocalesArray of LocalizedString | Provides additional Attribute information to aid content managers configure Product details. |
AttributeDefinitionType
AttributeConstraint
None- No constraints are applied to the attribute
Unique- Attribute value should be different in each variant
CombinationUnique- A set of attributes, that have this constraint, should have different combinations in each variant
SameForAll- Attribute value should be the same in all variants
Level
Variant- The attribute can be used on the variant level
Product- The attribute can be used on the product level
PriceMode
Embedded- The system looks up prices from the `prices` field of the ProductVariant inside a Product.
Standalone- The system looks up prices from Standalone Prices, stored separately from Products.
ReviewRatingStatistics
averageRatingFloat | Average rating of one target This number is rounded with 5 decimals. |
highestRatingInt | Highest rating of one target |
lowestRatingInt | Lowest rating of one target |
countLong | Number of ratings taken into account |
ratingsDistributionJson | Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object. |
SelectionOfProductQueryResult
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of SelectionOfProduct |
SelectionOfProduct
productSelectionRef | |
productSelection | |
variantSelection | |
variantExclusion | |
createdAt | |
lastModifiedAt |
ProductVariantSelection
typeString | |
skusArray of String |
ProductVariantExclusion
IndividualExclusion ProductSelectionMode. Product Variants not listed remain available in the Product Selection.skusArray of String | Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection with IndividualExclusion ProductSelectionMode. |
ProductQueryResult
Input types
ProductDraft
nameArray of LocalizedStringItemInputType | Name of the Product. |
productType | The Product Type defining the Attributes for the Product. Cannot be changed later. |
slugArray of LocalizedStringItemInputType | User-defined identifier used in a deep-link URL for the Product.
It must be unique across a Project, but a Product can have the same slug in different Locales.
It must match the pattern [a-zA-Z0-9_-]{2,256}. |
keyString | User-defined unique identifier for the Product. This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the Import API and the Merchant Center. |
descriptionArray of LocalizedStringItemInputType | Description of the Product. |
categoriesArray of ResourceIdentifierInput | Categories assigned to the Product. |
categoryOrderHintsArray of CategoryOrderHintInput | Numerical values to allow ordering of Products within specified Categories. If the referenced Categories are not also assigned in the categories field, an InvalidOperation error is returned. |
metaTitleArray of LocalizedStringItemInputType | Title of the Product as used by search engines. |
metaDescriptionArray of LocalizedStringItemInputType | Description of the Product as used by search engines. |
metaKeywordsArray of LocalizedStringItemInputType | Keywords that give additional information about the Product to search engines. |
masterVariant | The Product Variant to be the Master Variant for the Product. Required if
variants are provided or if the referenced Product Type contains any Variant-level AttributeDefinition with isRequired set to true.Must not be provided when the Project has the ProductCatalogModel Modular. Use the Variants API to create Variants instead. |
attributesArray of ProductAttributeInput | Product Attributes according to the respective AttributeDefinition.
Not supported by Product Projection Search. Default: [] |
variantsArray of ProductVariantInput | The additional Product Variants for the Product. Must not be provided when the Project has the ProductCatalogModel Default: Modular. Use the Variants API to create Variants instead.[] |
taxCategory | The Tax Category to be assigned to the Product. |
state | State to be assigned to the Product. |
priceMode | Specifies the type of prices used when looking up a price for the Product. Can beEmbedded, or Standalone |
searchKeywordsArray of SearchKeywordInput | Used by Search Term Suggestions, but is also considered for a full text search in the Product Projection Search API. |
publishBoolean | Whether the platform sets the published flag on the resulting ProductCatalogData to true.
This makes the current representation retrievable in Product Projection endpoints and indexes it for Product Search.
You can also set this flag later using the Publish update action. |
CategoryOrderHintInput
uuidString | |
orderHintString |
ProductVariantInput
skuString | |
keyString | |
pricesArray of ProductPriceDataInput | Default: [] |
imagesArray of ImageInput | Default: [] |
attributesArray of ProductAttributeInput | Default: [] |
assetsArray of AssetDraftInput | Default: [] |
ProductPriceDataInput
value | |
keyString | |
country | |
customerGroup | |
channel | |
validFrom | |
validUntil | |
tiersArray of ProductPriceTierInput | Default: [] |
custom | |
discounted | |
recurrencePolicy |
BaseMoneyInput
centPrecision | |
highPrecision |
ProductPriceTierInput
minimumQuantityInt | |
value |
DiscountedProductPriceValueInput
value | |
discount |
ImageInput
urlString | |
labelString | |
dimensions |
DimensionsInput
widthInt | |
heightInt |
ProductAttributeInput
An input object used to define a ProductAttribute.
The value should be passed in a form of escaped JSON.
value:- FieldType
String:"\"This is a string\"" - FieldType
DateTimeType:"\"2018-10-12T14:00:00.000Z\"" - FieldType
Number:"4" - FieldType
Setwith an elementType ofString:"[\"This is a string\", \"This is another string\"]" - FieldType
Reference:"{\"id\": \"b911b62d-353a-4388-93ee-8d488d9af962\", \"typeId\": \"product\"}"
nameString | |
valueString | The value should be passed in a form of escaped JSON. Examples for
value:
|
AssetDraftInput
keyString | |
nameArray of LocalizedStringItemInputType | |
descriptionArray of LocalizedStringItemInputType | |
custom | |
sourcesArray of AssetSourceInput | |
tagsArray of String | |
type |
AssetSourceInput
uriString | |
keyString | |
dimensions | |
contentTypeString |
AssetDimensionsInput
widthInt | |
heightInt |
PriceMode
Embedded- The system looks up prices from the `prices` field of the ProductVariant inside a Product.
Standalone- The system looks up prices from Standalone Prices, stored separately from Products.
SearchKeywordInput
locale | |
keywordsArray of SearchKeywordItemInput |
SearchKeywordItemInput
textString | |
suggestTokenizer |
BaseSearchKeywordInput
whitespace | |
custom |
WhitespaceSuggestTokenizerInput
dummyString |
CustomSuggestTokenizerInput
inputsArray of String |
SearchKeywordArgument
searchKeywordString | |
locale |
ProductUpdateAction
moveImageToPosition | |
setSearchKeywords | |
revertStagedChanges | |
revertStagedVariantChanges | |
publish | |
setProductAttribute | |
unpublish | |
transitionState | |
removePrice | |
addAsset | |
addExternalImage | |
addPrice | |
addToCategory | |
addVariant | |
changeAssetName | |
changeAssetOrder | |
changeMasterVariant | |
changeImageLabel | |
changeName | |
changePrice | |
changeSlug | |
removeAsset | |
removeFromCategory | |
removeImage | |
removeVariant | |
setAssetCustomField | |
setAssetCustomType | |
setAssetDescription | |
setAssetKey | |
setAssetSources | |
setAssetTags | |
setCategoryOrderHint | |
setDefaultVariant | |
setDiscountedPrice | |
setAttribute | |
setAttributeInAllVariants | |
setDescription | |
setImageLabel | |
setKey | |
setMetaAttributes | |
setMetaDescription | |
setMetaKeywords | |
setMetaTitle | |
setProductPriceCustomField | |
setProductPriceCustomType | |
setPriceKey | |
setPriceMode | |
setPrices | |
setSku | |
setTaxCategory | |
setProductVariantKey |
Update actions
Move Image To Position
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
imageUrlString | The URL of the image to update. |
positionInt | Position in images where the image should be moved. Must be between 0 and the total number of images minus 1. |
stagedBoolean | Whether only staged images are updated. If false, both current and staged images are updated. |
Set Search Keywords
searchKeywordsArray of SearchKeywordInput | |
stagedBoolean |
SearchKeywordInput
locale | |
keywordsArray of SearchKeywordItemInput |
SearchKeywordItemInput
textString | |
suggestTokenizer |
BaseSearchKeywordInput
whitespace | |
custom |
WhitespaceSuggestTokenizerInput
dummyString |
CustomSuggestTokenizerInput
inputsArray of String |
Revert Staged Changes
dummyString |
Revert Staged Variant Changes
variantIdInt |
Publish
published flag on the resulting ProductCatalogData to true.
This makes the current representation retrievable in Product Projection endpoints and indexes it for Product Search.scope | All or PricesAll, or Prices |
PublishScope
All- Publishes the complete staged projection
Prices- Publishes only prices on the staged projection
Set Product Attribute
An input object used to define a ProductAttribute.
The value should be passed in a form of escaped JSON.
value:- FieldType
String:"\"This is a string\"" - FieldType
DateTimeType:"\"2018-10-12T14:00:00.000Z\"" - FieldType
Number:"4" - FieldType
Setwith an elementType ofString:"[\"This is a string\", \"This is another string\"]" - FieldType
Reference:"{\"id\": \"b911b62d-353a-4388-93ee-8d488d9af962\", \"typeId\": \"product\"}"
nameString | |
valueString | The value should be passed in a form of escaped JSON. Examples for
value:
|
stagedBoolean | Default: true |
Unpublish
dummyString |
Transition State
transitions, there must be a direct transition to the new State. If transitions is not set, no validation is performed. Produces the ProductStateTransition Message.state | The State to transition to. If there is no existing State, this must be an initial State. |
forceBoolean | Whether validations are disabled. |
Remove Price
priceIdString | The id of the Embedded Price to remove. |
stagedBoolean | Whether only the staged Embedded Price is removed. If Default: false, both the current and staged Embedded Price are removed.true |
Add Asset
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only staged Default: assets are updated. If false, both current and staged assets are updated.true |
positionInt | Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1. |
asset | Value to append. |
AssetDraftInput
keyString | |
nameArray of LocalizedStringItemInputType | |
descriptionArray of LocalizedStringItemInputType | |
custom | |
sourcesArray of AssetSourceInput | |
tagsArray of String | |
type |
AssetSourceInput
uriString | |
keyString | |
dimensions | |
contentTypeString |
AssetDimensionsInput
widthInt | |
heightInt |
Add External Image
variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
image | Value to add to images. |
stagedBoolean | Whether only staged Default: images are updated. If false, both current and staged images are updated.true |
ImageInput
urlString | |
labelString | |
dimensions |
DimensionsInput
widthInt | |
heightInt |
Add Price
prices array of the ProductVariant.
Either variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
price | Embedded Price to add to the Product Variant. If the key of the Price is used by another Embedded Price on the ProductVariant, a DuplicatePriceKey error is returned.
If this Embedded Price has the same price scope as an existing Embedded Price on the ProductVariant, a DuplicatePriceScope error is returned.
If this Embedded Price has overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period. |
stagedBoolean | Whether only staged Default: prices are updated. If false, both current and staged prices are updated.true |
ProductPriceDataInput
value | |
keyString | |
country | |
customerGroup | |
channel | |
validFrom | |
validUntil | |
tiersArray of ProductPriceTierInput | Default: [] |
custom | |
discounted | |
recurrencePolicy |
BaseMoneyInput
centPrecision | |
highPrecision |
ProductPriceTierInput
minimumQuantityInt | |
value |
DiscountedProductPriceValueInput
value | |
discount |
Add To Category
category | The Category to add. |
orderHintString | A string representing a number between 0 and 1. Must start with 0. and cannot end with 0. If omitted, any existing value is removed. |
stagedBoolean | Whether only staged Default: categories and categoryOrderHints are updated. If false, both current and staged categories and categoryOrderHints are updated.true |
Add Variant
assetsArray of AssetDraftInput | Media assets for the Product Variant. Default:[] |
attributesArray of ProductAttributeInput | Attributes for the Product Variant. Default:[] |
imagesArray of ImageInput | Images for the Product Variant. Default:[] |
pricesArray of ProductPriceDataInput | Embedded Prices for the Product Variant. Default:[] |
keyString | Value to set. Must be unique among ProductVariants in the same Product. |
skuString | Value to set. Must be unique across all ProductVariants in a Project. |
stagedBoolean | Whether the new Product Variant is only staged. If Default: false the new Product Variant is both current and staged.true |
AssetDraftInput
keyString | |
nameArray of LocalizedStringItemInputType | |
descriptionArray of LocalizedStringItemInputType | |
custom | |
sourcesArray of AssetSourceInput | |
tagsArray of String | |
type |
AssetSourceInput
uriString | |
keyString | |
dimensions | |
contentTypeString |
AssetDimensionsInput
widthInt | |
heightInt |
ProductAttributeInput
An input object used to define a ProductAttribute.
The value should be passed in a form of escaped JSON.
value:- FieldType
String:"\"This is a string\"" - FieldType
DateTimeType:"\"2018-10-12T14:00:00.000Z\"" - FieldType
Number:"4" - FieldType
Setwith an elementType ofString:"[\"This is a string\", \"This is another string\"]" - FieldType
Reference:"{\"id\": \"b911b62d-353a-4388-93ee-8d488d9af962\", \"typeId\": \"product\"}"
nameString | |
valueString | The value should be passed in a form of escaped JSON. Examples for
value:
|
ImageInput
urlString | |
labelString | |
dimensions |
DimensionsInput
widthInt | |
heightInt |
ProductPriceDataInput
value | |
keyString | |
country | |
customerGroup | |
channel | |
validFrom | |
validUntil | |
tiersArray of ProductPriceTierInput | Default: [] |
custom | |
discounted | |
recurrencePolicy |
BaseMoneyInput
centPrecision | |
highPrecision |
ProductPriceTierInput
minimumQuantityInt | |
value |
DiscountedProductPriceValueInput
value | |
discount |
Change Asset Name
variantId or sku is required. The Asset to update must be specified using either assetId or assetKey.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only the staged Asset is updated. If Default: false, both the current and staged Asset are updated.true |
nameArray of LocalizedStringItemInputType | New value to set. Must not be empty. |
assetKeyString | The key of the Asset to update. |
assetIdString | The id of the Asset to update. |
Change Asset Order
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only staged Default: assets are updated. If false, both current and staged assets are updated.true |
assetOrderArray of String | All existing Asset ids of the ProductVariant in the desired new order. |
Change Master Variant
masterVariant and removes the same from variants at the same time. The current Master Variant becomes part of the variants array.
Either variantId or sku is required.variantIdInt | The id of the ProductVariant to become the Master Variant. |
skuString | The sku of the ProductVariant to become the Master Variant. |
stagedBoolean | Whether only the staged Master Variant is changed. If Default: false, both the current and staged Master Variant are changed.true |
Change Image Label
variantIdInt | |
skuString | |
imageUrlString | |
labelString | |
stagedBoolean | Default: true |
Change Name
nameArray of LocalizedStringItemInputType | Value to set. Must not be empty. |
stagedBoolean | Whether only the staged Default: name is updated. If false, both the current and staged name are updated.true |
Change Price
priceIdString | |
variantIdInt | |
skuString | |
price | |
stagedBoolean | Default: true |
ProductPriceDataInput
value | |
keyString | |
country | |
customerGroup | |
channel | |
validFrom | |
validUntil | |
tiersArray of ProductPriceTierInput | Default: [] |
custom | |
discounted | |
recurrencePolicy |
BaseMoneyInput
centPrecision | |
highPrecision |
ProductPriceTierInput
minimumQuantityInt | |
value |
DiscountedProductPriceValueInput
value | |
discount |
Change Slug
slugArray of LocalizedStringItemInputType | |
stagedBoolean | Whether only the staged Default: slug is updated. If false, both the current and staged slug are updated.true |
Remove Asset
variantId or sku is required. The Asset to remove must be specified using either assetId or assetKey.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only the staged Asset is removed. If Default: false, both the current and staged Asset is removed.true |
assetKeyString | The key of the Asset to remove. |
assetIdString | The id of the Asset to remove. |
Remove From Category
category | The Category to remove. |
stagedBoolean | Whether only the staged Default: categories and categoryOrderHints are removed. If false, both the current and staged categories and categoryOrderHints are removed.true |
Remove Image
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
imageUrlString | The URL of the image to remove. |
stagedBoolean | Whether only the staged image is removed. If Default: false, both the current image and staged image are removed.true |
Remove Variant
id or sku is required.
Produces the ProductVariantDeleted Message.
If the Product Variant to remove is part of a ProductSelectionAssignment
its SKU will be automatically removed from the respective ProductVariantSelection.idInt | The id of the ProductVariant to remove. |
skuString | The sku of the ProductVariant to remove. |
stagedBoolean | Whether only the staged ProductVariant is removed. If Default: false, both the current and staged ProductVariant is removed.true |
Set Asset Custom Field
variantId or sku is required. The Asset to update must be specified using either assetId or assetKey.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only the staged Asset is updated. If Default: false, both the current and staged Asset is updated.true |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
nameString | Name of the Custom Field. |
assetKeyString | The key of the Asset to update. |
assetIdString | The id of the Asset to update. |
Set Asset Custom Type
variantIdInt | |
skuString | |
stagedBoolean | Default: true |
typeIdString | |
typeKeyString | |
type | |
fieldsArray of CustomFieldInput | |
assetKeyString | |
assetIdString |
Set Asset Description
variantId or sku is required. The Asset to update must be specified using either assetId or assetKey.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only the staged Asset is updated. If Default: false, both the current and staged Asset is updated.true |
descriptionArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
assetKeyString | The key of the Asset to update. |
assetIdString | The id of the Asset to update. |
Set Asset Key
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only the staged Asset is updated. If Default: false, both the current and staged Asset is updated.true |
assetKeyString | Value to set. If omitted, any existing value is removed. |
assetIdString | The id of the Asset to update. |
Set Asset Sources
variantId or sku is required. The Asset to update must be specified using either assetId or assetKey.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
stagedBoolean | Whether only the staged Asset is updated. If Default: false, both the current and staged Asset is updated.true |
sourcesArray of AssetSourceInput | Value to set. Default:[] |
assetKeyString | The key of the Asset to update. |
assetIdString | The id of the Asset to update. |
AssetSourceInput
uriString | |
keyString | |
dimensions | |
contentTypeString |
AssetDimensionsInput
widthInt | |
heightInt |
Set Category Order Hint
categoryIdString | The id of the Category to add the orderHint. If this Category is not assigned to the Product, an InvalidOperation error is returned. |
orderHintString | A string representing a number between 0 and 1. Must start with 0. and cannot end with 0. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged Default: categoryOrderHints is updated. If false, both the current and staged categoryOrderHints are updated.true |
Set Default Variant
Modular. The Variant must belong to the Product. If variant is omitted, any existing default Variant is cleared.variant | The Variant to set as default. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged Default: defaultVariant is updated. If false, both the current and staged defaultVariant are updated.true |
Set Discounted Price
priceIdString | The id of the Price to set the Discount. |
discounted | Value to set. If omitted, any existing value is removed.
The referenced ProductDiscount must have the Type external, be active, and its predicate must match the referenced Price. |
stagedBoolean | Whether only the staged Embedded Price is updated. If Default: false, both the current and staged Embedded Price are updated.true |
DiscountedProductPriceValueInput
value | |
discount |
BaseMoneyInput
centPrecision | |
highPrecision |
Set Attribute
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
nameString | Name of the Attribute to set. |
valueString | Value to set for the Attribute. If omitted, any existing value is removed. The AttributeType determines the format of the Attribute
value to be provided:
|
stagedBoolean | Whether only the staged Attribute is set. If Default: false, both the current and staged Attributes are set.true |
Set Attribute In All Variants
SameForAll.nameString | Name of the Attribute to set. |
valueString | Value to set for the Attributes. If omitted, any existing value is removed. The AttributeType determines the format of the Attribute
value to be provided:
|
stagedBoolean | Whether only the staged Attributes are set. If Default: false, both the current and staged Attributes are set.true |
Set Description
descriptionArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged Default: description is updated. If false, both the current and staged description are updated.true |
Set Image Label
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
imageUrlString | The URL of the image to set the label. |
labelString | Value to set. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged image is updated. If Default: false, both the current and staged image is updated.true |
Set Key
keyString | Value to set. If omitted, any existing value is removed. To update a Product using the Import API and the Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$. |
Set Meta Attributes
metaDescriptionArray of LocalizedStringItemInputType | |
metaKeywordsArray of LocalizedStringItemInputType | |
metaTitleArray of LocalizedStringItemInputType | |
stagedBoolean | Default: true |
Set Meta Description
metaDescriptionArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged Default: metaDescription is updated. If false, both the current and staged metaDescription are updated.true |
Set Meta Keywords
metaKeywordsArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged Default: metaKeywords is updated. If false, both the current and staged metaKeywords are updated.true |
Set Meta Title
metaTitleArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged Default: metaTitle is updated. If false, both the current and staged metaTitle are updated.true |
Set Product Price Custom Field
priceIdString | |
stagedBoolean | Default: true |
nameString | |
valueString |
Set Product Price Custom Type
priceIdString | |
stagedBoolean | Default: true |
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Price Key
priceIdString | The id of the Price to set the key. |
keyString | Value to set. If omitted, any existing value is removed. If the value is used by another Embedded Price on the same ProductVariant, a DuplicatePriceKey error is returned. |
stagedBoolean | Whether only the staged Embedded Price is updated. If Default: false, both the current and staged Embedded Price are updated.true |
Set Price Mode
Controls whether the Prices of a Product Variant are embedded into the Product or standalone.
priceMode | Specifies which type of Prices should be used when looking up a price for the Product. Can beEmbedded, or Standalone |
PriceMode
Embedded- The system looks up prices from the `prices` field of the ProductVariant inside a Product.
Standalone- The system looks up prices from Standalone Prices, stored separately from Products.
Set Prices
variantId or sku is required.variantIdInt | The id of the ProductVariant to update. |
skuString | The sku of the ProductVariant to update. |
pricesArray of ProductPriceDataInput | The Embedded Prices to set. If any two Embedded Prices in this array have the same key, a DuplicatePriceKey error is returned.
If any two Embedded Prices in this array have the same price scope, a DuplicatePriceScope error is returned.
If any two Embedded Prices in this array have overlapping validity periods within the same price scope, an OverlappingPriceValidity error is returned. An Embedded Price without validity period does not conflict with an Embedded Price defined for a time period. |
stagedBoolean | Whether only the staged ProductVariant is updated. If Default: false, both the current and staged ProductVariant are updated.true |
ProductPriceDataInput
value | |
keyString | |
country | |
customerGroup | |
channel | |
validFrom | |
validUntil | |
tiersArray of ProductPriceTierInput | Default: [] |
custom | |
discounted | |
recurrencePolicy |
BaseMoneyInput
centPrecision | |
highPrecision |
ProductPriceTierInput
minimumQuantityInt | |
value |
DiscountedProductPriceValueInput
value | |
discount |
Set SKU
variantIdInt | The id of the ProductVariant to update. |
skuString | Value to set. Must be unique across all ProductVariants in a Project. If omitted, any existing value is removed. |
stagedBoolean | Whether only the staged Default: sku is updated. If false, both the current and staged sku are updated.true |
Set Tax Category
Cannot be staged. Published Products are immediately updated.
taxCategory | The Tax Category to set. If omitted, any existing value is removed. |
Set Product Variant Key
variantIdInt | |
skuString | |
keyString | |
stagedBoolean | Default: true |