# MODIFIER_REQUIRED

# MODIFIER_REQUIRED

A line item is missing a choice its menu requires. A modifier group on that item declares a minimum number of selections, and the cart supplied fewer — most often none at all.

## Summary

| Field | Value |
|---|---|
| Appears as | `errors[].code` |
| Response | HTTP `200` — `Order` with `isValid: false` and a populated `errors[]` |
| Retry unchanged | No |

:::note[This is a reason code, not a top-level error code]
`MODIFIER_REQUIRED` is an `errors[].code` value on the order. It is **not** a top-level
`ProblemDetail.errorCode`, so it carries no HTTP status, `errorCategory`, or `retryable` field of its
own. See [Unified OrderError shape](/distribution-partners/marketfront-api/guides/order-lifecycle#unified-ordererror-shape).
:::

:::warning[Not the same as `MINIMUM_NOT_MET`]
These two are easy to confuse and call for opposite actions.

- **`MODIFIER_REQUIRED`** — one *item* is missing a required choice. The fix is to pick an option for
  that item. Adding more items to the cart does nothing.
- **[`MINIMUM_NOT_MET`](/distribution-partners/marketfront-api/guides/order-lifecycle#error-codes)** —
  the *whole order* is below the store's order minimum. The fix is to add more items. Picking
  modifiers does nothing.

`pointer` tells you which one you are looking at without reading the message: `MODIFIER_REQUIRED`
always points at a specific line item.
:::

## When This Fires

- **`POST /v1/marketfront/orders/validate`** — a modifier group on a cart line item has
  `minimumAllowed` greater than the number of selections supplied, or the cart omitted a required
  group entirely.
- **`POST /v1/marketfront/orders/place`** — the same condition at placement time, either because
  validation was skipped or because the commerce partner rejected the cart for a missing selection.

The catalog is the source of truth for which groups are required: read `minimumAllowed` on each
`modifierGroup` of an item in the catalog set. A group with `minimumAllowed: 0` is optional.

## Recommended Action

Send the user back to the item's options — not to the menu, and not to the cart total.

1. Resolve `pointer` against the order body to find the offending line item.
2. Re-read that item's `modifierGroups` from the catalog set and show the groups whose
   `minimumAllowed` is not yet satisfied.
3. Have the user choose, then resubmit.

A blind retry will continue to fail. Validating carts client-side against `minimumAllowed` before you
call `validate` avoids this error entirely, and is the recommended integration.

## Example

```json
{
  "isValid": false,
  "errors": [
    {
      "code": "MODIFIER_REQUIRED",
      "message": "Please choose an option for 'Pick your size' and try again.",
      "pointer": "/cart/lineItems/0"
    }
  ]
}
```
