---
title: CartWarningCode - Storefront API
description: The code for the cart warning.
api_version: 2026-10
source_url:
  html: 'https://shopify.dev/docs/api/storefront/latest/enums/CartWarningCode'
  md: 'https://shopify.dev/docs/api/storefront/latest/enums/CartWarningCode.md'
api_name: storefront
api_type: graphql
type: enum
---

# Cart​Warning​Code

enum

The code for the cart warning.

## Valid values

* DISCOUNT\_​CODE\_​NOT\_​HONOURED

  The discount code cannot be honored.

* DISCOUNT\_​CURRENTLY\_​INACTIVE

  The discount is currently inactive.

* DISCOUNT\_​CUSTOMER\_​NOT\_​ELIGIBLE

  The customer is not eligible for this discount.

* DISCOUNT\_​CUSTOMER\_​USAGE\_​LIMIT\_​REACHED

  The customer's discount usage limit has been reached.

* DISCOUNT\_​ELIGIBLE\_​CUSTOMER\_​MISSING

  An eligible customer is missing for this discount.

* DISCOUNT\_​INCOMPATIBLE\_​PURCHASE\_​TYPE

  The purchase type is incompatible with this discount.

* DISCOUNT\_​NO\_​ENTITLED\_​LINE\_​ITEMS

  There are no entitled line items for this discount.

* DISCOUNT\_​NO\_​ENTITLED\_​SHIPPING\_​LINES

  There are no entitled shipping lines for this discount.

* DISCOUNT\_​NOT\_​FOUND

  The discount was not found.

* DISCOUNT\_​PURCHASE\_​NOT\_​IN\_​RANGE

  The purchase is not in range for this discount.

* DISCOUNT\_​QUANTITY\_​NOT\_​IN\_​RANGE

  The quantity is not in range for this discount.

* DISCOUNT\_​USAGE\_​LIMIT\_​REACHED

  The discount usage limit has been reached.

* DUPLICATE\_​DELIVERY\_​ADDRESS

  A delivery address with the same details already exists on this cart.

* MERCHANDISE\_​NOT\_​ENOUGH\_​STOCK

  The merchandise does not have enough stock.

* MERCHANDISE\_​OUT\_​OF\_​STOCK

  The merchandise is out of stock.

* MERCHANDISE\_​SELLING\_​PLAN\_​NOT\_​APPLICABLE\_​ON\_​COMPANY\_​LOCATION

  Only one-time purchase is available for B2B orders.

* PAYMENTS\_​GIFT\_​CARDS\_​UNAVAILABLE

  Gift cards are not available as a payment method.

* PRODUCT\_​UNAVAILABLE\_​IN\_​BUYER\_​LOCATION

  The product is unavailable in the current buyer location.

***

## Fields

* [Cart​Warning.code](https://shopify.dev/docs/api/storefront/latest/objects/CartWarning#field-CartWarning.fields.code)

  OBJECT

  A non-blocking issue that occurred during a cart mutation. Unlike errors, warnings don't prevent the mutation from completing but indicate potential problems that may affect the buyer's experience.

  Each warning includes a code identifying the issue type, a human-readable message, and a target ID pointing to the affected resource.

***

## Map

### Fields with this enum

* [Cart​Warning.code](https://shopify.dev/docs/api/storefront/latest/objects/CartWarning#field-CartWarning.fields.code)
