Shopping List Messages

GraphQL output types for Messages that represent a change or an action performed on a Shopping List.

Each type on this page implements MessagePayload and is returned in the payload field of a Message. For when each Message is generated, see Shopping List Messages.

Shopping List Messages

ShoppingListLineItemAdded

Generated after a successful Add ShoppingListLineItem update action.
lineItem​
Line Item that was added to the ShoppingList.
type​
String​

ShoppingListLineItem

ShoppingListLineItems are Line Items that contain references to ProductVariants in a Product.
In addition to standard Reference Expansion, a ShoppingListLineItem offers expansion on productSlug and variant, defined with the query parameter expand.
id​
String​

Unique identifier of the ShoppingListLineItem.

key​
String​
User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.
productId​
String​
Unique identifier of a Product.
published​
Boolean​
Whether the related Product is published or not.
This data is updated in an eventual consistent manner when the Product's published status changes.
variantId​
Int​
id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.
For a Project with ProductCatalogModel set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.
productTypeRef​
The Product Type defining the Attributes of the Product.
productType​
The Product Type defining the Attributes of the Product.
quantity​
Int​

Number of Products in the ShoppingListLineItem.

addedAt​

Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

name​
String​

Name of the Product.

This data is updated in an eventual consistent manner when the Product's name changes.
nameAllLocales​
Array of LocalizedString​

Name of the Product.

This data is updated in an eventual consistent manner when the Product's name changes.
deactivatedAt​
If the Product or Product Variant is deleted or unpublished, deactivatedAt is the date and time (UTC) this occurred.
This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.
custom​

Custom Fields of the ShoppingListLineItem.

productSlug​
String​
Slug of the current ProductData.
Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.
productSlugAllLocales​
Array of LocalizedString​
Slug of the current ProductData.
Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.
variant​
Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.
Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

ProductVariant

Represents a Product Variant embedded in a Product.
Only available for Projects with the ProductCatalogModel Classic. When the Project has the Modular catalog model, use the Variants API instead.
id​
Int​

A unique, sequential identifier of the Product Variant within the Product.

key​
String​

User-defined identifier of the ProductVariant. Unique among ProductVariants in the same Product.

This is different from Product key.
sku​
String​

User-defined SKU of the Product Variant. Unique across all ProductVariants in a Project.

prices​
Array 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.

allRecurrencePrices​
Array of ProductPrice​

Returns all recurrence prices based on the price selection rules.

images​
Array of Image​

Images of the Product Variant.

assets​
Array 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).
attributesRaw​

This field contains raw attributes data

ProductPrice

id​
String​
value​
key​
String​
country​
customerGroup​
customerGroupRef​
channel​
channelRef​
validFrom​
validUntil​
discounted​
tiers​
Array of ProductPriceTier​
custom​
recurrencePolicy​
recurrencePolicyRef​

DiscountedProductPriceValue

value​
discountRef​
discount​

ProductPriceTier

minimumQuantity​
Int​
value​

ProductVariantAvailabilityWithChannels

noChannel​
channels​

ProductVariantAvailability

Product variant availability

isOnStock​
Boolean​
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.
restockableInDays​
Int​

Number of days to restock a Product Variant once it is out of stock.

availableQuantity​
Long​

Number of items of the Product Variant that are in stock.

version​
Long​
Current version of the InventoryEntry.
id​
String​
Unique identifier of the InventoryEntry.

ProductVariantAvailabilitiesResult

Product variant availabilities

limit​
Int​
offset​
Int​
total​
Int​
results​

ProductVariantAvailabilityWithChannel

channelRef​
channel​
availability​

RawProductAttribute

attributeDefinition​
name​
String​
value​
Json​
attributesRaw​
BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta
referencedResource​
referencedResourceSet​

AttributeDefinition

type​

Describes the Type of the Attribute.

name​
String​
User-defined name of the Attribute that is unique within the Project.
label​
String​

Human-readable label for the Attribute.

isRequired​
Boolean​
Whether the Attribute must have a value on a ProductVariant.
attributeConstraint​

Specifies how Attributes are validated across all variants of a Product.

Can be None, Unique, CombinationUnique, or SameForAll​
level​

Specifies whether the Attribute is defined at the Product or Variant level.

Can be Variant, or Product​
inputTip​
String​

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​
isSearchable​
Boolean​
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.
savedToLineItem​
Boolean​
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.
labelAllLocales​
Array of LocalizedString​

Human-readable label for the Attribute.

inputTipAllLocales​
Array 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

ShoppingListLineItemRemoved

Generated after a successful Remove ShoppingListLineItem update action.
lineItem​
Line Item that was removed from the ShoppingList.
type​
String​

ShoppingListLineItem

ShoppingListLineItems are Line Items that contain references to ProductVariants in a Product.
In addition to standard Reference Expansion, a ShoppingListLineItem offers expansion on productSlug and variant, defined with the query parameter expand.
id​
String​

Unique identifier of the ShoppingListLineItem.

key​
String​
User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.
productId​
String​
Unique identifier of a Product.
published​
Boolean​
Whether the related Product is published or not.
This data is updated in an eventual consistent manner when the Product's published status changes.
variantId​
Int​
id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.
For a Project with ProductCatalogModel set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.
productTypeRef​
The Product Type defining the Attributes of the Product.
productType​
The Product Type defining the Attributes of the Product.
quantity​
Int​

Number of Products in the ShoppingListLineItem.

addedAt​

Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

name​
String​

Name of the Product.

This data is updated in an eventual consistent manner when the Product's name changes.
nameAllLocales​
Array of LocalizedString​

Name of the Product.

This data is updated in an eventual consistent manner when the Product's name changes.
deactivatedAt​
If the Product or Product Variant is deleted or unpublished, deactivatedAt is the date and time (UTC) this occurred.
This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.
custom​

Custom Fields of the ShoppingListLineItem.

productSlug​
String​
Slug of the current ProductData.
Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.
productSlugAllLocales​
Array of LocalizedString​
Slug of the current ProductData.
Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.
variant​
Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.
Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

ProductVariant

Represents a Product Variant embedded in a Product.
Only available for Projects with the ProductCatalogModel Classic. When the Project has the Modular catalog model, use the Variants API instead.
id​
Int​

A unique, sequential identifier of the Product Variant within the Product.

key​
String​

User-defined identifier of the ProductVariant. Unique among ProductVariants in the same Product.

This is different from Product key.
sku​
String​

User-defined SKU of the Product Variant. Unique across all ProductVariants in a Project.

prices​
Array 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.

allRecurrencePrices​
Array of ProductPrice​

Returns all recurrence prices based on the price selection rules.

images​
Array of Image​

Images of the Product Variant.

assets​
Array 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).
attributesRaw​

This field contains raw attributes data

ProductPrice

id​
String​
value​
key​
String​
country​
customerGroup​
customerGroupRef​
channel​
channelRef​
validFrom​
validUntil​
discounted​
tiers​
Array of ProductPriceTier​
custom​
recurrencePolicy​
recurrencePolicyRef​

DiscountedProductPriceValue

value​
discountRef​
discount​

ProductPriceTier

minimumQuantity​
Int​
value​

ProductVariantAvailabilityWithChannels

noChannel​
channels​

ProductVariantAvailability

Product variant availability

isOnStock​
Boolean​
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.
restockableInDays​
Int​

Number of days to restock a Product Variant once it is out of stock.

availableQuantity​
Long​

Number of items of the Product Variant that are in stock.

version​
Long​
Current version of the InventoryEntry.
id​
String​
Unique identifier of the InventoryEntry.

ProductVariantAvailabilitiesResult

Product variant availabilities

limit​
Int​
offset​
Int​
total​
Int​
results​

ProductVariantAvailabilityWithChannel

channelRef​
channel​
availability​

RawProductAttribute

attributeDefinition​
name​
String​
value​
Json​
attributesRaw​
BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta
referencedResource​
referencedResourceSet​

AttributeDefinition

type​

Describes the Type of the Attribute.

name​
String​
User-defined name of the Attribute that is unique within the Project.
label​
String​

Human-readable label for the Attribute.

isRequired​
Boolean​
Whether the Attribute must have a value on a ProductVariant.
attributeConstraint​

Specifies how Attributes are validated across all variants of a Product.

Can be None, Unique, CombinationUnique, or SameForAll​
level​

Specifies whether the Attribute is defined at the Product or Variant level.

Can be Variant, or Product​
inputTip​
String​

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​
isSearchable​
Boolean​
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.
savedToLineItem​
Boolean​
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.
labelAllLocales​
Array of LocalizedString​

Human-readable label for the Attribute.

inputTipAllLocales​
Array 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