Skip to main content

Cart mutations now return error for invalid merchandise configuration

We have enhanced error handling for cart mutations to provide clearer feedback when merchandise cannot be added to or maintained in a cart. The cart API now returns a MERCHANDISE_NOT_APPLICABLE error code for specific merchandise-related issues.

When This Error Occurs

The MERCHANDISE_NOT_APPLICABLE error is triggered in the following scenarios:

Inventory & Availability Issues:

  • The item is out of stock or insufficient stock is available for the requested quantity.
  • The product is not published or is unavailable in the buyer's location.
  • The inventory record is missing.
  • The product variant does not exist.

Pricing & Configuration Issues:

  • There is a discrepancy between expected and actual prices.
  • Gift cards have zero or invalid amounts.
  • Bundle products lack required components.
  • The cart line item limit is exceeded.

What This Means for Your Integration

If you receive a MERCHANDISE_NOT_APPLICABLE error:

  • The specified merchandise cannot be added to the cart in its current configuration.
  • Notify customers about the availability issue.
  • Refresh product data or adjust quantities as needed.
  • For bundles, ensure all required components are present.
Was this section helpful?