> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alura.io/llms.txt
> Use this file to discover all available pages before exploring further.

# margin_required

> Margin required. HTTP 422, not retryable.

**HTTP 422: Margin required.** Retrying the same request gives the same error. Errors never cost API credits.

**What to do:** This strategy judges listings against break-even, which needs the shop's margin. Save a margin in the optimizer settings, send `overrides.margin_pct`, or use a strategy without break-even rules (Budget Saver needs none).

```json Response theme={null}
{
  "type": "https://docs.alura.io/errors/margin_required",
  "title": "Margin required",
  "status": 422,
  "code": "margin_required",
  "detail": "Margin required",
  "suggestion": "This strategy judges listings against break-even, which needs the shop's margin. Save a margin in the optimizer settings, send `overrides.margin_pct`, or use a strategy without break-even rules (Budget Saver needs none).",
  "retryable": false,
  "request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}
```

The response is `application/problem+json` (RFC 9457) and has a `Request-Id` header with the same `request_id`. See [all errors](https://docs.alura.io/api-reference/errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.