Skip to main content
Version: 8.8.x

Structured Messages Returned by Cortex

Cortex returns the following types of Structured Messages:

  • NeedInfo Messages
  • Field Validation Errors
  • Business State Errors

NeedInfo Messages​

NeedInfo messages are returned on GET operations with Status Code 200 OK, or on POST operations with Status Code 409 Conflict. Messages optionally contain a link to an advised resource type for resolution of the message.

Message IDMessage FieldsAdvised resourcesDefault debug message
bundle.does.not.contain.min.constituentsitem-code, min-quantity, current-quantityBundle does not contain the minimum number of required bundle constituents.
cart.emptyShopping cart is empty.
need.billing.addressorders.billingaddress-infoBilling address must be specified.
need.datapolicy.consentdata-policyNeed user consent for data policy data-policy.
need.emailorders.email-infoCustomer email address must be specified.
need.payment.methodpaymentmethods.paymentmethod-infoPayment method must be specified.
need.shipment.detailsshipmentdetailsShipment details must be specified.
need.shipping.addressshipmentdetails.destination-infoShipping address must be specified.
need.shipping.optionshipmentdetails.shipping-option-infoShipping option must be chosen.

Field Validation Errors​

Field validation errors can occur on POST and PUT operations. Errors are returned as Structured Messages with Status 400 Invalid Request.

Message IDMessage FieldsExample Message Template
field.requiredfield-name{field-name} value is required.
field.invalid.sizefield-name, min-size, max-size{field-name} value must contain between {min-size} and {max-size} characters.
field.invalid.formatfield-name, invalid-value, reg-exp{field-name} value '{invalid-value}' must match the following regular expression: {reg-exp}.
field.invalid.email.formatfield-name, invalid-value{field-name} value {invalid-value} must be a valid email format.
field.invalid.boolean.formatfield-name, invalid-value{field-name} value {invalid-value} must be a boolean (true or false).
field.invalid.decimal.formatfield-name, invalid-value{field-name} value {invalid-value} must be a decimal.
field.invalid.integer.formatfield-name, invalid-value{field-name} value {invalid-value} must be an integer.
field.invalid.datetime.formatfield-name, invalid-value{field-name} value {invalid-value} must be in ISO8601 date time format (YYYY-MM-DDThh:mm:ssTZD).
field.invalid.date.formatfield-name, invalid-value{field-name} value {invalid-value} must be in ISO8601 date format (YYYY-MM-DD).
field.invalid.option.valuefield-name, invalid-value{field-name} value {invalid-value} must match a valid option.
field.invalid.minimum.valuefield-name, min-value, invalid-value{field-name} value {invalid-value} must be greater than or equal to {min-value}.
field.invalid.minimum.valuefield-nameQuantity field is missing or has invalid value.
field.invalid.minimum.valuefield-namequantity value must be greater than or equal to 1.
field.invalid.integer.formatfield-namequantity value must be an integer.

Request Entity Too Large Errors​

Request entity too large errors can occur on POST and PUT operations. Errors are returned as Structured Messages with Status 413 Request Entity Too Large.

Message IDMessage FieldsExample Message Template
cart.request.too.largemaximum-number-of-itemsThe request is too large. The maximum number of items that can be added to a cart in a single request is {maximum-number-of-items}. To add more items, create another request.

Business State Errors​

Business state errors can occur on POST, PUT and DELETE operations. Errors are returned as Structured Messages with the HTTP status code 409 Conflict.

Account and Profile Errors​

Message IDMessage FieldsDefault debug message
account.suspendedaccount-shared-id, account-business-nameThe account you are transacting for is currently suspended.
account.update.missing.keysfieldsRequired account fields are missing.
account.update.noneditable.keysfieldsAccount fields are not available for edit.
email.conflictemailThere is more than one user with the given email.
profile.sharedId.already.existsshared-idUser account with this shared id already exists.
profile.update.missing.keysfieldsRequired profile fields are missing.
profile.update.noneditable.keysfieldsProfile fields are not available for edit.
profile.userid.already.existsuser-idUser account with the user id already exists.
purchase.user.account.not.activeshared-idUser account is not active.
role.not.foundroleThe specified role is not configured in the system.
user.not.foundemailThe user with the specified email does not exist.
username.not.uniquefield-name, updateA user with this username already exists.

Cart Errors​

Message IDMessage FieldsDefault debug message
cart.delete.not.permittedCart cannot be deleted.
cart.descriptor.not-uniqueCart descriptor values are already in use by another shopping cart.
cart.item.auto.selected.in.bundleitem-codeItem is a bundle constituent that was automatically selected.
cart.item.not.availableitem-codeItem is not available for purchase.
cart.missing.datafield-nameCart is missing required data.
purchase.cart.not.purchasableCart is not purchasable.

Item Errors​

Message IDMessage FieldsDefault debug message
item.insufficient.inventoryitem-codeItem does not have sufficient inventory.
item.insufficient.inventoryitem-code, inventory-available, quantity-requestedItem only has limited availability.
item.invalid.bundle.structureitem-codeRequested item configuration does not have a valid bundle structure.
item.is.configurablefield-name, field-valueItem has one or more required modifier fields. Please add it individually using additemtocart form.
item.is.duplicatefield-name, field-valueItem has multiple entries. Please combine duplicate items into one entry.
item.missing.priceitem-codeItem does not have a price.
item.no.longer.availableitem-code, expiry-dateItem is no longer available for purchase.
item.not.availablefield-nameMissing required request body.
item.not.availablefield-name, field-valueItem with code does not exist.
item.not.in.store.catalogitem-codeItem is not part of the current store's catalog.
item.not.in.store.catalogfield-name, field-valueItem is not part of the current store's catalog.
item.not.sold.separatelyitem-codeItem is not sold separately.
item.not.visibleitem-codeItem is not visible.
item.not.yet.availableitem-code, available-dateItem is not yet available for purchase.

Bundle Errors​

Message IDMessage FieldsDefault debug message
bundle.exceeds.max.constituentsitem-code, max-quantity, current-quantityBundle contains more than the maximum number of allowed bundle constituents.
bundle.lineitem.constituent.quantity.mismatchitem-code, specified-quantity, permitted-quantityConstituent of bundle has invalid quantity.
bundle.lineitem.exceeds.max.constituentsitem-code, max-quantity, current-quantityAdding constituent to cart will cause it to go beyond its maximum constituents.

Coupon Errors​

Message IDMessage FieldsDefault debug message
coupon.email.requiredcoupon-code, validation-failure-code, validation-failure-messageEmail address is required for the coupon.
coupon.no.longer.availablecoupon-code, validation-failure-code, validation-failure-messageCoupon is no longer available.
coupon.not.validcoupon-code, validation-failure-code, validation-failure-messageCoupon is not valid.

Payment Errors​

Message IDMessage FieldsDefault debug message
invalid.paymentInstrument.configurationPayment configurationDuplicate payment instruments are not permitted.
invalid.paymentInstrument.configurationExactly one payment instrument must be configured as unlimited.
payment.capability.unsupportedCapability is not supported by payment provider.
payment.declinedPayment was declined.
payment.failedError occurred when processing payment.
payment.instrument.creation.failedPayment instrument creation failed.
payment.instrument.name.requiredName must not be blank.
payment.insufficient.fundsInsufficient funds to process payment.
payment.method.missingPayment method must be present.

Shipping Errors​

Message IDMessage FieldsDefault debug message
invalid.shipping.optionshipping-optionSelected shipping option is not valid.
shipping.options.unavailableThere was a problem retrieving shipping options from the shipping service.

Order Errors​

Message IDMessage FieldsDefault debug message
order.already.submittedOrder has already been submitted and can't be resubmitted.

Authentication Errors​

Message IDMessage FieldsDefault debug message
auth.oidc.user.disabledOpenID Connect user is disabled.
authentication.account.disabledThe selected account is disabled.
authentication.account.not.associatedYou are not authorized to shop on behalf of the selected account.
authentication.account.not.foundNo account found for the provided shared ID.
authentication.customer.not.foundCustomer not found.
authentication.missing.headerMissing role headers.
authentication.missing.scopesMissing scope headers.
authentication.too.many.rolesToo many roles in request header.
authentication.too.many.scopesToo many scopes in request header.
authentication.wrong.roleCurrent role is invalid.
oauth.token.exchange.failureerrorOAuth token exchange failure.
oauth.token.exchange.failure.codechallenge.creationOAuth token exchange failure during code challenge creation.
oauth.token.exchange.failure.malformed.urlOAuth token exchange failure due to malformed URL.
trusted.traits.not.enabledtrait-nameTrusted Traits are not enabled.

Store Errors​

Message IDMessage FieldsDefault debug message
store.disabledstore-codeThe selected store is disabled or not in an OPEN state.
store.not.foundstore-codeThe selected store was not found.

Catalog Errors​

Message IDMessage FieldsDefault debug message
category-code.not.foundcategory-codeCategory with the specified code was not found.