HTTP API errors

Common HTTP error codes returned by the commercetools Composable Commerce APIs and their meaning.

Error responses have the same overall structure across the different Composable Commerce APIs. General errors, such as InvalidJsonInput or ConcurrentModification are returned across all APIs. API-specific errors, such as ExtensionPredicateEvaluationFailed are only returned for a specific set of endpoints and update actions.

Representations

ErrorResponse

Base representation of an error response containing common fields to all errors.

statusCode​
Int​

HTTP status code corresponding to the error.

message​
String​

First error message in the errors array.

errors​
Array of ErrorObject​

Errors returned for a request.

A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

Example: json
{
"statusCode": 400,
"message": "First error message.",
"errors": [
{
"code": "SyntaxError",
"message": "First error message."
},
{
"code": "SemanticError",
"message": "Second error message."
}
]
}

AuthErrorResponse

Represents errors related to authentication and authorization in a format conforming to the OAuth 2.0 specification.

statusCode​
Int​

HTTP status code corresponding to the error.

message​
String​

First error message in the errors array.

errors​
Array of ErrorObject​

Authentication and authorization-related errors returned for a request.

error​
String​

Error code as per the OAuth 2.0 specification. For example: "access_denied".

error_description​
String​

Plain text description of the first error.

Example: json
{
"statusCode": 401,
"message": "invalid_token",
"errors": [
{
"code": "invalid_token",
"message": "invalid_token"
}
],
"error": "invalid_token"
}

ErrorObject

Represents a single error. Multiple errors may be included in an ErrorResponse.

code​
String​

Error identifier.

message​
String​

Plain text description of the cause of the error.

//​
Any string parameter matching this regular expression​

Error-specific additional fields.

General errors

400 Bad Request

The following general error codes can appear in responses with the HTTP status code 400:

AnonymousIdAlreadyInUse

Returned when the anonymous ID is being used by another resource.

The client application should choose another anonymous ID or retrieve an automatically generated one.

code​
String​
"AnonymousIdAlreadyInUse"
message​
String​

"The given anonymous ID is already in use."

DuplicateField

Returned when a field value conflicts with an existing value causing a duplicate.

code​
String​
"DuplicateField"
message​
String​

"A duplicate value $duplicateValue exists for field $field."

field​
String​

Name of the conflicting field.

duplicateValue​
Any​

Conflicting duplicate value.

DuplicateFieldWithConflictingResource

Returned when a field value conflicts with an existing value stored in a particular resource causing a duplicate.

code​
String​
"DuplicateFieldWithConflictingResource"
message​
String​

"A duplicate value $duplicateValue exists for field $field on $conflictingResource."

field​
String​

Name of the conflicting field.

duplicateValue​
Any​

Conflicting duplicate value.

conflictingResource​

Reference to the resource that has the conflicting value.

FeatureRemoved

Returned when the requested feature was removed.

code​
String​
"FeatureRemoved"
message​
String​

Description of the feature that is removed.

InvalidInput

Returned when an invalid input has been sent.

code​
String​
"InvalidInput"
message​
String​

Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

InvalidJsonInput

Returned when an invalid JSON input has been sent. Either the JSON is syntactically incorrect or does not conform to the expected shape (for example is missing a required field).

The client application should validate the input according to the constraints described in the error message before sending the request.

code​
String​
"InvalidJsonInput"
message​
String​

"Request body does not contain valid JSON."

detailedErrorMessage​
String​

Further explanation about why the JSON is invalid.

InvalidOperation

Returned when the resources involved in the request are not in a valid state for the operation.

The client application should validate the constraints described in the error message before sending the request.

code​
String​
"InvalidOperation"
message​
String​

Plain text description of the error.

InvalidField

Returned when a field has an invalid value.

code​
String​
"InvalidField"
message​
String​

"The value $invalidValue is not valid for field $field."

field​
String​

Name of the field with the invalid value.

invalidValue​
Any​

Value invalid for the field.

allowedValues​
Array of Any​

Fixed set of allowed values for the field, if any.

InternalConstraintViolated

Returned when certain API-specific constraints were not met. For example, the specified Discount Code was never applied and cannot be updated.

code​
String​
"InternalConstraintViolated"
message​
String​

Plain text description of the constraints that were violated.

MaxResourceLimitExceeded

Returned when a resource type cannot be created as it has reached its limits.

The limits must be adjusted for this resource before sending the request again.

code​
String​
"MaxResourceLimitExceeded"
message​
String​

"You have exceeded the limit of $limit resources of type $resourceTypeId."

exceededResource​

Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).

MoneyOverflow

Returned when a Money operation overflows the 64-bit integer range. See Money usage for more information.

code​
String​
"MoneyOverflow"
message​
String​

"A Money operation resulted in an overflow."

ObjectNotFound

Returned if the requested resource was not found or the Product Search index is inactive.

code​
String​
"ObjectNotFound"
message​
String​

"A $resourceType with identifier $id was unexpectedly not found." or

"No index found for project"

ReferenceExists

Returned when a resource cannot be deleted because it is being referenced by another resource.

code​
String​
"ReferenceExists"
message​
String​

"Can not delete a $resource while it is referenced by at least one $referencedBy."

referencedBy​

Type of referenced resource.

ReferencedResourceNotFound

Returned when a resource referenced by a Reference or a ResourceIdentifier could not be found.

id​
String​

Unique identifier of the referenced resource, if known.

key​
String​

User-defined unique identifier of the referenced resource, if known.

code​
String​
"ReferencedResourceNotFound"
message​
String​

"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

typeId​

Type of referenced resource.

RequiredField

Returned when a value is not defined for a required field.

code​
String​
"RequiredField"
message​
String​

"A value is required for field $field."

field​
String​

Name of the field missing the value.

ResourceSizeLimitExceeded

Returned when the resource exceeds the maximum allowed size of 16 MB.

code​
String​
"ResourceSizeLimitExceeded"
message​
String​

"The resource size exceeds the maximal allowed size of 16 MB."

SemanticError

Returned when a Discount predicate or API Extension predicate is not semantically correct.

code​
String​
"SemanticError"
message​
String​

Plain text description of the error concerning the predicate. For example, "Invalid country code $countryCode provided for the field $fieldDefinition.".

SyntaxError

Returned when a Discount predicate, API Extension predicate, or search query does not have the correct syntax.

code​
String​
"SyntaxError"
message​
String​

"Syntax error while parsing $fieldDefinition."

QueryTimedOut

Returned when the query times out.

If a query constantly times out, please check if it follows the performance best practices.

code​
String​
"QueryTimedOut"
message​
String​

"The query timed out. If your query constantly times out, please check that it follows the performance best practices (see https://docs.commercetools.com/api/predicates/query#performance-considerations)."

404 Not Found

The following general error codes can appear in responses with the HTTP status code 404:

ResourceNotFound

Returned when the resource addressed by the request URL does not exist.

code​
String​
"ResourceNotFound"
message​
String​

"The Resource with ID $resourceId was not found."

409 Conflict

The following general error codes can appear in responses with the HTTP status code 409:

ConcurrentModification

Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved). The client application should resolve the conflict (with or without involving the end user) before retrying the request.

code​
String​
"ConcurrentModification"
message​
String​

"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

currentVersion​
Int​

Current version of the resource.

SearchNotReady

Returned if the requested search service is not ready. The search might be deactivated or indexing is in progress.

code​
String​
"SearchNotReady"
message​
String​

$Search is not ready. Check the indexing-status endpoint and that the feature has been activated in the project settings.

413 Content Too Large

The following general error codes can appear in responses with the HTTP status code 413:

ContentTooLarge

Returned when the request results in too much data being returned from the API. Adjust the request query to reduce the size of the data returned.

code​
String​
"ContentTooLarge"
message​
String​

"Content too large."

500 Internal Server Error

The following general error codes can appear in responses with the HTTP status code 500:

General

Returned when a server-side problem occurs before or after data persistence. In some cases, the requested action may successfully complete after the error is returned. Therefore, it is recommended to verify the status of the requested resource after receiving a 500 error.

If you encounter this error, report it to the Composable Commerce support team.

code​
String​
"General"
message​
String​

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

502 Bad Gateway

The following general error codes can appear in responses with the HTTP status code 502:

BadGateway

Returned when a server-side problem is caused by scaling infrastructure resources.

The client application should retry the request with exponential backoff up to a point where further delay is unacceptable.

code​
String​
"BadGateway"
message​
String​

Plain text description of the error.

503 Service Unavailable

The following general error codes can appear in responses with the HTTP status code 503:

OverCapacity

Returned when the service is having trouble handling the load.

The client application should retry the request with exponential backoff up to a point where further delay is unacceptable.

code​
String​
"OverCapacity"
message​
String​

Plain text description of the error.

PendingOperation

Returned when a previous conflicting operation is still pending and needs to finish before the request can succeed.

The client application should retry the request with exponential backoff up to a point where further delay is unacceptable. If the error persists, report it to the Composable Commerce support team.

code​
String​
"PendingOperation"
message​
String​

Plain text description of the error.

API-specific errors

Extensions

ErrorByExtension

id​
String​

Unique identifier of the Extension.

key​
String​

User-defined unique identifier of the Extension.

ExtensionError

code​
String​

Error code caused by the Extension. For example, InvalidField.

message​
String​

Plain text description of the error.

extensionId​
String​

Unique identifier of the Extension.

extensionKey​
String​

User-defined unique identifier of the Extension.

//​
Any string parameter matching this regular expression​

Error-specific additional fields.

400 Bad Request

The following error codes specific to API Extensions can appear in responses with the HTTP status code 400:

ExtensionPredicateEvaluationFailed

Returned when the predicate defined in the ExtensionTrigger could not be evaluated due to a missing field.

code​
String​
"ExtensionPredicateEvaluationFailed"
message​
String​

"The compared field $fieldName is not present."

errorByExtension​

Details about the API Extension that was involved in the error.

Example: json
{
"code": "ExtensionPredicateEvaluationFailed",
"message": "The compared field 'cart' is not present",
"errorByExtension": {
"id": "{{extension-id}}",
"key": "{{extension-key}}"
}
}

502 Bad Gateway

The following error codes specific to API Extensions can appear in responses with the HTTP status code 502:

ExtensionBadResponse

Returned when the response from the API Extension could not be parsed successfully (such as a 500 HTTP status code, or an invalid JSON response).

code​
String​
"ExtensionBadResponse"
message​
String​

Description of the invalid Extension response. For example, "The extension did not return the expected JSON.".

localizedMessage​

User-defined localized description of the error.

extensionExtraInfo​
Object​

Any information that should be returned to the API caller.

extensionErrors​
Array of ExtensionError​

Additional errors related to the API Extension.

extensionBody​
String​

The response body returned by the Extension.

extensionStatusCode​
Int​

Http status code returned by the Extension.

extensionId​
String​

Unique identifier of the Extension.

extensionKey​
String​

User-defined unique identifier of the Extension.

Example: json
{
"code": "ExtensionBadResponse",
"message": "'404' is not an expected status code.",
"extensionErrors": [],
"extensionBody": "{\r\n \"message\": \"No HTTP resource was found that matches the request URI 'https://example.azurewebsites.net/api/extension'.\",\r\n \"messageDetail\": \"No type was found that matches the controller named 'extension'.\"\r\n}",
"extensionStatusCode": 404,
"extensionId": "{{extension-id}}",
"extensionKey": "{{extension-key}}"
}

ExtensionUpdateActionsFailed

Returned when update actions could not be applied to the resource (for example, because a referenced resource does not exist). This would result in a 400 Bad Request response if the same update action was sent from a regular client.

code​
String​
"ExtensionUpdateActionsFailed"
message​
String​

"The extension returned update actions that could not be executed."

localizedMessage​

User-defined localized description of the error.

extensionExtraInfo​
Object​

Any information that should be returned to the API caller.

extensionErrors​
Array of ExtensionError​

Additional errors related to the API Extension.

Example: json
{
"code": "ExtensionUpdateActionsFailed",
"message": "The extension returned update actions that could not be executed.",
"extensionErrors": [
{
"code": "InvalidField",
"message": "The value '{\"message\":\"timeout of 2000ms exceeded\",\"name\":\"Error\",\"stack\"} is not valid for field 'response'.",
"extensionId": "{{extension-id}}",
"extensionKey": "{{extension-key}}",
"field": "response"
}
]
}

504 Gateway Timeout

The following error codes specific to API Extensions can appear in responses with the HTTP status code 504:

ExtensionNoResponse

Returned when the API Extension does not respond within the time limit, or could not be reached.

code​
String​
"ExtensionNoResponse"
message​
String​

"Extension did not respond in time."

extensionId​
String​

Unique identifier of the API Extension.

extensionKey​
String​

User-defined unique identifier of the API Extension, if available.

Example: json
{
"code": "ExtensionNoResponse",
"message": "Extension did not respond in time.",
"extensionId": "{{extension-id}}",
"extensionKey": "{{extension-key}}"
}

External OAuth

502 Bad Gateway or 504 Gateway Timeout

The following error codes specific to external OAuth can appear in responses with the HTTP status code 502 or 504:

ExternalOAuthFailed

Returned when an external OAuth Introspection endpoint does not return a response within the time limit, or the response isn't compliant with RFC 7662 (for example, an HTTP status code like 500).

code​
String​
"ExternalOAuthFailed"
message​
String​

Plain text description detailing the external OAuth error. For example, "External OAuth did not respond in time.".

Products

400 Bad Request

The following error codes specific to Products can appear in responses with the HTTP status code 400:

DuplicatePriceKey

Returned when a Price key conflicts with an existing key.

Keys of Embedded Prices must be unique per ProductVariant.

code​
String​
"DuplicatePriceKey"
message​
String​

"Duplicate price key: $priceKey. The price key must be unique per variant."

conflictingPrice​

Conflicting Embedded Price.

DuplicatePriceScope

Returned when a Price scope conflicts with an existing one during an Update Product request.

Every Price of a Product Variant must have a distinct combination of currency, Customer Group, country, and Channel that constitute the scope of a Price.

code​
String​
"DuplicatePriceScope"
message​
String​

"Duplicate price scope: $priceScope. The combination of currency, country, customerGroup and channel must be unique for each price of a product variant."

conflictingPrice​

Conflicting Embedded Price.

DuplicateVariantValues

Returned when a Product Variant value conflicts with an existing one during an Update Product request.

code​
String​
"DuplicateVariantValues"
message​
String​

"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."

variantValues​

Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.

VariantValues

sku​
String​

SKU of the ProductVariant.

prices​
Array of PriceDraft​

Embedded Prices of the ProductVariant.

attributes​
Array of Attribute​

Attributes of the ProductVariant.

DuplicateAttributeValue

Returned when the Unique AttributeConstraint criteria are not met during an Update Product request.

code​
String​
"DuplicateAttributeValue"
message​
String​

"Attribute can't have the same value in a different variant."

attribute​

Conflicting Attributes.

DuplicateAttributeValues

Returned when the CombinationUnique AttributeConstraint criteria are not met during an Update Product request.

code​
String​
"DuplicateAttributeValues"
message​
String​

"The set of attributes must be unique across all variants."

attributes​
Array of Attribute​

Conflicting Attributes.

Product Types

400 Bad Request

The following error codes specific to Product Types can appear in responses with the HTTP status code 400:

AttributeDefinitionAlreadyExists

Returned when the name of the AttributeDefinition conflicts with an existing Attribute.

The error is returned as a failed response to the Create ProductType request or Change AttributeDefinition Name update action.

code​
String​
"AttributeDefinitionAlreadyExists"
message​
String​

"An attribute definition with name $attributeName already exists on product type $productTypeName."

conflictingProductTypeId​
String​

Unique identifier of the Product Type containing the conflicting name.

conflictingProductTypeName​
String​

Name of the Product Type containing the conflicting name.

conflictingAttributeName​
String​

Name of the conflicting Attribute.

AttributeDefinitionTypeConflict

Returned when the type is different for an AttributeDefinition using the same name in multiple Product Types.

The error is returned as a failed response to the Create ProductType request.

code​
String​
"AttributeDefinitionTypeConflict"
message​
String​

"The attribute with name $attributeName has a different type on product type $productTypeName."

conflictingProductTypeId​
String​

Unique identifier of the Product Type containing the conflicting name.

conflictingProductTypeName​
String​

Name of the Product Type containing the conflicting name.

conflictingAttributeName​
String​

Name of the conflicting Attribute.

AttributeNameDoesNotExist

Returned when an AttributeDefinition does not exist for an Attribute name.

The error is returned as a failed response to the Change AttributeDefinition Name update action.

code​
String​
"AttributeNameDoesNotExist"
message​
String​

"Attribute definition for $attributeName does not exist on type $typeName."

invalidAttributeName​
String​

Non-existent Attribute name.

DuplicateEnumValues

Returned when an AttributeEnumType or AttributeLocalizedEnumType contains duplicate keys.

code​
String​
"DuplicateEnumValues"
message​
String​

"The enum values contain duplicate keys: $listOfDuplicateKeys."

duplicates​
Array of String​

Duplicate keys.

EnumKeyAlreadyExists

Returned when an AttributeEnumType or AttributeLocalizedEnumType contains a key that already exists.

code​
String​
"EnumKeyAlreadyExists"
message​
String​

"The $attributeName attribute definition already contains an enum value with the key $enumKey."

conflictingEnumKey​
String​

Conflicting enum key.

conflictingAttributeName​
String​

Name of the conflicting Attribute.

EnumKeyDoesNotExist

Returned when an AttributeEnumType or AttributeLocalizedEnumType already contains a value with the given key.

The error is returned as a failed response to the Change the key of an EnumValue update action.

code​
String​
"EnumKeyDoesNotExist"
message​
String​

"The $fieldName field definition does not contain an enum value with the key $enumKey."

conflictingEnumKey​
String​

Conflicting enum key.

conflictingAttributeName​
String​

Name of the conflicting Attribute.

EnumValuesMustMatch

Returned when during an order update of AttributeEnumType or AttributeLocalizedEnumType the new enum values do not match the existing ones.

The error is returned as a failed response to the Change the order of EnumValues and Change the order of LocalizedEnumValues update actions.

code​
String​
"EnumValuesMustMatch"
message​
String​

"The given values must be equal to the existing enum values."

EnumValueIsUsed

Returned when an enum value cannot be removed from an Attribute as it is being used by a Product.

The error is returned as a failed response to the Remove EnumValues from AttributeDefinition update action.

code​
String​
"EnumValueIsUsed"
message​
String​

"$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

Carts and Orders

400 Bad Request

The following error codes specific to Orders can appear in responses to Create Order from Cart requests with the HTTP status code 400:

OutOfStock

Returned when some of the Line Items are out of stock at the time of placing an Order.

The error is returned as a failed response to:

code​
String​
"OutOfStock"
message​
String​

"Some line items are out of stock at the time of placing the order: $itemSku."

lineItems​
Array of String​

Unique identifiers of the Line Items that are out of stock.

skus​
Array of String​

SKUs of the Line Items that are out of stock.

PriceChanged

Returned when the Price or Tax Rate of some Line Items or Shipping Rate of some Shipping Methods changed since they were last added to the Cart.

When a Cart is frozen, the error can be returned as a failed response to all update actions on Carts and My Carts.

The error is also returned as a failed response to:

code​
String​
"PriceChanged"
message​
String​

Plain text description of the reason for the Price change. For example, "The price or tax of some line items changed at the time of placing the order: $lineItems.".

lineItems​
Array of String​

Unique identifiers of the Line Items for which the Price or TaxRate has changed.

shipping​
Boolean​

true if the ShippingRate has changed.

DiscountCodeNonApplicable

Returned when the Cart contains a Discount Code with a DiscountCodeState other than MatchesCart.

The error is returned as a failed response to:

code​
String​
"DiscountCodeNonApplicable"
message​
String​

"The discountCode $discountCodeId cannot be applied to the cart."

discountCode​
String​

Discount Code passed to the Cart.

reason​
String​

"DoesNotExist" or "TimeRangeNonApplicable"

discountCodeId​
String​

Unique identifier of the Discount Code.

validFrom​

Date and time (UTC) from which the Discount Code is valid.

validUntil​

Date and time (UTC) until which the Discount Code is valid.

validityCheckTime​

Date and time (UTC) the Discount Code validity check was last performed.

ShippingMethodDoesNotMatchCart

Returned when the Cart contains a ShippingMethod that is not allowed for the Cart. In this case, the ShippingMethodState value is DoesNotMatchCart.

When a Cart is frozen, the error can be returned as a failed response to all update actions on Carts and My Carts.

The error is also returned as a failed response to:

code​
String​
"ShippingMethodDoesNotMatchCart"
message​
String​

"The predicate does not match the cart."

InvalidItemShippingDetails

Returned when Line Item or Custom Line Item quantities set under ItemShippingDetails do not match the sum of the quantities in their respective shipping details.

When a Cart is frozen, the error can be returned as a failed response to all update actions on Carts and My Carts.

The error is also returned as a failed response to:

code​
String​
"InvalidItemShippingDetails"
message​
String​

"Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."

subject​
String​

"LineItem" or "CustomLineItem"

itemId​
String​

Unique identifier of the Line Item or Custom Line Item.

MatchingPriceNotFound

Returned when the Product Variant does not have a Price according to the Product priceMode value for a selected currency, country, Customer Group, or Channel.

The error can be returned as a failed response to all update actions on Carts and Staged Orders.

The error is also returned as a failed response to:

code​
String​
"MatchingPriceNotFound"
message​
String​

"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."

productId​
String​

Unique identifier of a Product.

variantId​
Int​

Unique identifier of a ProductVariant in the Product.

currency​

Currency code of the country.

Pattern: ^[A-Z]{3}$​
country​

Country code of the geographic location.

Pattern: ^[A-Z]{2}$​
customerGroup​

Customer Group associated with the Price.

channel​

Channel associated with the Price.

MissingTaxRateForCountry

Returned when the Tax Category of at least one of the lineItems, customLineItems, or shippingInfo in the Cart is missing the TaxRate matching country and state given in the shippingAddress of that Cart.

The error can be returned as a failed response to all update actions on Carts and Staged Orders.

The error is also returned as a failed response to:

code​
String​
"MissingTaxRateForCountry"
message​
String​

"Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."

taxCategoryId​
String​

Unique identifier of the TaxCategory.

country​

Country code of the geographic location.

Pattern: ^[A-Z]{2}$​
state​
String​

State within the country, such as Texas in the United States.

CountryNotConfiguredInStore

Returned when a Cart or an Order in a Store references a country that is not included in the countries configured for the Store.

The error is returned as a failed response to:

code​
String​
"CountryNotConfiguredInStore"
message​
String​

"The country $country is not configured for the store $store."

storeCountries​
Array of CountryCode​

Countries configured for the Store.

country​

The country that is not configured for the Store but referenced on the Cart or Order.

Pattern: ^[A-Z]{2}$​

Customers

400 Bad Request

The following error codes specific to Customers can appear in responses with the HTTP status code 400:

InvalidCredentials

Returned when a Customer with the given credentials (matching the given email/password pair) is not found and authentication fails.

The error is returned as a failed response to:

code​
String​
"InvalidCredentials"
message​
String​

"Account with the given credentials not found."

InvalidCurrentPassword

Returned when the current password of the Customer does not match.

The error is returned as a failed response to:

code​
String​
"InvalidCurrentPassword"
message​
String​

"The given current password does not match."

409 Conflict

The following general error codes can appear in responses with the HTTP status code 409:

LockedField

Returned when two Customers are simultaneously created or updated with the same email address.

To confirm if the operation was successful, repeat the request.

code​
String​
"LockedField"
message​
String​

"'$field' is locked by another request. Please try again later."

field​
String​

Field that is currently locked.

Cart Discounts

400 Bad Request

The following error codes specific to Cart Discounts can appear in responses with the HTTP status code 400:

MaxCartDiscountsReached

Returned when a Cart Discount cannot be created or activated as the limit for active Cart Discounts has been reached.

The error is returned as a failed response to:

code​
String​
"MaxCartDiscountsReached"
message​
String​

"Maximum number of active cart discounts reached ($max)."

StoreCartDiscountsLimitReached

Returned when a Cart Discount cannot be created or assigned to a Store as the limit for active Cart Discounts in a Store has been reached for one or more Stores in the request.

The error is returned as a failed response to:

code​
String​
"StoreCartDiscountsLimitReached"
message​
String​

"Maximum number of active cart discounts reached for $stores."

stores​
Array of StoreKeyReference​

Stores for which the limit for active Cart Discounts that can exist has been reached.

MaxStoreReferencesReached

Returned when a Store cannot be added to a Cart Discount as the limit for Stores configured for a Cart Discount has been reached.

The error is returned as a failed response to:

code​
String​
"MaxStoreReferencesReached"
message​
String​

"Maximum number of store discounts on a single cart discount reached $max".

Product Discounts

404 Not Found

The following error codes specific to Product Discounts can appear in responses with the HTTP status code 404:

NoMatchingProductDiscountFound

Returned when a Product Discount could not be found that could be applied to the Price of a Product Variant.

The error is returned as a failed response to the Get Matching ProductDiscount request.

code​
String​
"NoMatchingProductDiscountFound"
message​
String​

"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."

Shipping Methods

400 Bad Request

The following error code specific to Shipping Methods can appear in responses with the HTTP status code 400:

EditPreviewFailed

Returned when a preview to find an appropriate Shipping Method for an OrderEdit could not be generated.

The error is returned as a failed response to the Get Shipping Methods for an OrderEdit request.

code​
String​
"EditPreviewFailed"
message​
String​

"Error while applying staged actions. ShippingMethods could not be determined."

State of the OrderEdit where the stagedActions cannot be applied to the Order.

400 Bad Request

The following error code specific to Product Projection Search can appear in responses with the HTTP status code 400:

SearchFacetPathNotFound

Returned when a search facet path could not be found.

code​
String​
"SearchFacetPathNotFound"
message​
String​

"Facet path $path not found."

SearchExecutionFailure

Returned when a search query could not be completed due to an unexpected failure.

code​
String​
"SearchExecutionFailure"
message​
String​

"Something went wrong during the search query execution. In most case this happens due to usage of non-existing fields and custom product attributes. Please verify all filters and facets in your search query and make sure that all paths are correct."

SearchDeactivated

Returned when the indexing of Product information is deactivated in a Project.

To activate indexing, call Change Product Search Indexing Enabled and set enabled to true.

code​
String​
"SearchDeactivated"
message​
String​

"The endpoint is deactivated for this project. Please enable it via the Project endpoint, via the Merchant Center in the Project settings, or reach out to Support to enable it."

SearchIndexingInProgress

Returned when the indexing of Product information is still in progress for Projects that have indexing activated.

code​
String​
"SearchIndexingInProgress"
message​
String​

"The indexing is currently in progress. Please wait until the status is "Activated" to execute search requests."

Projects

400 Bad Request

The following error code specific to Projects can appear in responses with the HTTP status code 400:

LanguageUsedInStores

Returned when a language cannot be removed from a Project as it is being used by a Store.

The error is returned as a failed response to the Change Languages update action.

code​
String​
"LanguageUsedInStores"
message​
String​

"Language(s) in use by a store cannot be deleted. Remove them in all the stores of this project first."

Stores

400 Bad Request

The following error codes specific to Stores can appear in responses with the HTTP status code 400:

ProjectNotConfiguredForLanguages

Returned when the languages set for a Store are not supported by the Project.

The error is returned as a failed response to the Set Languages update action.

code​
String​
"ProjectNotConfiguredForLanguages"
message​
String​

"The project is not configured for given languages."

languages​
Array of Locale​

Languages configured for the Store.

MissingRoleOnChannel

Returned when one of the following states occur:

  • Channel is added or set on a Store with missing Channel roles.
  • Standalone Price references a Channel that does not contain the ProductDistribution role.

The error is returned as a failed response to:

code​
String​
"MissingRoleOnChannel"
message​
String​

"Given channel with $idOrKeyOfChannel does not have the required role $role."

missingRole​
  • ProductDistribution for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.
  • InventorySupply for Inventory Supply Channels allowed for the Store.

Product Selections

400 Bad Request

ProductAssignmentMissing

Returned when a Product is not assigned to the Product Selection. The error is returned as a failed response either to the Set Variant Selection or to the Set Variant Exclusion update action.

code​
String​
"ProductAssignmentMissing"
message​
String​

For Product Selection of mode Individual, the message is: "A Product Variant Selection can only be set for a Product that has previously been added to the Product Selection." For Product Selection of mode IndividualExclusion, the message is: "A Variant Exclusion can only be set for a Product that has previously been added to the Product Selection of type Individual Exclusion."

product​

Reference to the Product for which the error was returned.

ProductPresentWithDifferentVariantSelection

Returned when a Product is already assigned to a Product Selection, but the Product Selection has either a different Product Variant Selection or a different Product Variant Exclusion.

The error is returned as a failed response either to the Add Product or to the Exclude Product update action.

code​
String​
"ProductPresentWithDifferentVariantSelection"
message​
String​

"Product is already present with the following different $variantSelections."

product​

Reference to the Product for which the error was returned.

existingVariantSelection​

Existing Product Variant Selection or Exclusion for the Product in the Product Selection.

Standalone Prices

400 Bad Request

The following error codes specific to Standalone Prices can appear in responses with the HTTP status code 400:

DuplicateStandalonePriceScope

Returned when the given Price scope conflicts with the Price scope of an existing Standalone Price. Every Standalone Price associated with the same SKU must have a distinct combination of currency, country, Customer Group, Channel, and validity periods (validFrom and validUntil).

The error is returned as a failed response to the Create StandalonePrice request.

code​
String​
"DuplicateStandalonePriceScope"
message​
String​

"Duplicate standalone price scope for SKU: $sku. The combination of SKU, currency, country, customerGroup, channel, validFrom and validUntil must be unique for each standalone price."

conflictingStandalonePrice​

Reference to the conflicting Standalone Price.

sku​
String​

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

currency​

Currency code of the country.

Pattern: ^[A-Z]{3}$​
country​

Country code of the geographic location.

Pattern: ^[A-Z]{2}$​

CustomerGroup for which the Standalone Price is valid.

Channel for which the Standalone Price is valid.

validFrom​

Date and time (UTC) from which the Standalone Price is valid.

validUntil​

Date and time (UTC) until which the Standalone Price is valid.

OverlappingStandalonePriceValidity

Returned when a given Price validity period conflicts with an existing one. Every Standalone Price associated with the same SKU and with the same combination of currency, country, Customer Group, and Channel, must have non-overlapping validity periods (validFrom and validUntil).

The error is returned as a failed response to the Create StandalonePrice request.

code​
String​
"OverlappingStandalonePriceValidity"
message​
String​

Two standalone prices have overlapping validity periods."

conflictingStandalonePrice​

Reference to the conflicting Standalone Price.

sku​
String​

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

currency​

Currency code of the country.

Pattern: ^[A-Z]{3}$​
country​

Country code of the geographic location.

Pattern: ^[A-Z]{2}$​

CustomerGroup for which the Standalone Price is valid.

Channel for which the Standalone Price is valid.

validFrom​

Date and time (UTC) from which the Standalone Price is valid.

validUntil​

Date and time (UTC) until which the Standalone Price is valid.

conflictingValidFrom​

Date and time (UTC) from which the conflicting Standalone Price is valid.

conflictingValidUntil​

Date and time (UTC) until which the conflicting Standalone Price is valid.

MissingRoleOnChannel

Returned when one of the following states occur:

  • Channel is added or set on a Store with missing Channel roles.
  • Standalone Price references a Channel that does not contain the ProductDistribution role.

The error is returned as a failed response to:

code​
String​
"MissingRoleOnChannel"
message​
String​

"Given channel with $idOrKeyOfChannel does not have the required role $role."

missingRole​
  • ProductDistribution for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.
  • InventorySupply for Inventory Supply Channels allowed for the Store.

Associate Roles

400 Bad Request

The following error codes specific to Associate Roles can appear in responses with the HTTP status code 400:

AssociateMissingPermission

Returned when an Associate is missing a Permission on a B2B resource.

code​
String​
"AssociateMissingPermission"
message​
String​
  • When an action is performed by an Associate: "Associate '$idOfAssociate' has no rights to $action in business-unit '$idOrKeyOfBusinessUnit'. Needs '$requiredPermission'."
  • When an action is performed for another Associate, like viewing their Cart: "Associate '$idOfAssociate' has no rights to $action for customer '$idOfCustomer' in business-unit '$idOrKeyOfBusinessUnit'. Needs '$requiredPermission'."
  • When viewing an entity: "Associate '$idOfAssociate' has no rights to $action in business-unit '$idOrKeyOfBusinessUnit'. Needs '$requiredViewMyPermission' or '$requiredViewOthersPermission'."

ResourceIdentifier to the Associate that tried to perform the action.

associateOnBehalf​

ResourceIdentifier of the Associate on whose behalf the action is performed.

permissions​
Array of Permission​

The Permissions that the Associate performing the action lacks. At least one of these Permissions is needed.