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

# DynamicRangeDiscountSettings

> A unique-code percentage range. Readable, but cannot be created here.

<ResponseField name="appliesOncePerCustomer" type="Boolean">
  Whether each customer may use the code only once.
</ResponseField>

<ResponseField name="codePrefix" type="String">
  Prefix applied to minted unique codes.
</ResponseField>

<ResponseField name="collectionIds" type="[String!]!" required>
  Platform collection ids this code applies to. Empty means not restricted by collection.
</ResponseField>

<ResponseField name="combinesWith" type={<a href="/docs/api-reference/v3/reference/marketing/discount-combines-with">DiscountCombinesWith!</a>} required>
  Which other discounts this code may stack with.

  <Expandable title="fields" lazyRender>
    <ResponseField name="orderDiscounts" type="Boolean!" required>
      Whether this code stacks with order discounts.
    </ResponseField>

    <ResponseField name="productDiscounts" type="Boolean!" required>
      Whether this code stacks with product discounts.
    </ResponseField>

    <ResponseField name="shippingDiscounts" type="Boolean!" required>
      Whether this code stacks with shipping discounts.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="customerEligibility" type={<a href="/docs/api-reference/v3/reference/marketing/discount-customer-eligibility">DiscountCustomerEligibility</a>}>
  Which customers may use the code.
</ResponseField>

<ResponseField name="customerIds" type="[String!]!" required>
  Platform customer ids when eligibility is SPECIFIC.
</ResponseField>

<ResponseField name="endsAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
  When the code stops being valid.
</ResponseField>

<ResponseField name="excludeItemsOnSale" type="Boolean">
  Whether items already on sale are excluded.
</ResponseField>

<ResponseField name="maxPercentage" type="Float!" required>
  The highest percent off a minted code may use.
</ResponseField>

<ResponseField name="minPercentage" type="Float!" required>
  The lowest percent off a minted code may use.
</ResponseField>

<ResponseField name="minimumRequirement" type={<a href="/docs/api-reference/v3/reference/marketing/discount-min-requirement">DiscountMinRequirement</a>}>
  A minimum purchase required to use the code.

  <Expandable title="fields" lazyRender>
    <ResponseField name="minimum" type="Float!" required>
      The required quantity or subtotal.
    </ResponseField>

    <ResponseField name="type" type={<a href="/docs/api-reference/v3/reference/marketing/discount-min-requirement-type">DiscountMinRequirementType!</a>} required>
      Whether `minimum` is a quantity or a subtotal.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="productIds" type="[String!]!" required>
  Platform product ids this code applies to. Empty means not restricted by product.
</ResponseField>

<ResponseField name="purchaseType" type={<a href="/docs/api-reference/v3/reference/marketing/discount-purchase-type">DiscountPurchaseType</a>}>
  Whether the code applies to one-time, subscription, or both.
</ResponseField>

<ResponseField name="recurringCycleLimit" type="Float">
  How many subscription cycles the code applies to.
</ResponseField>

<ResponseField name="relativeExpiration" type={<a href="/docs/api-reference/v3/reference/marketing/dynamic-range-relative-expiration">DynamicRangeRelativeExpiration!</a>} required>
  How long a minted unique code stays valid after it is generated.

  <Expandable title="fields" lazyRender>
    <ResponseField name="units" type={<a href="/docs/api-reference/v3/reference/marketing/discount-dynamic-range-expiration-unit">DiscountDynamicRangeExpirationUnit!</a>} required>
      The unit for `value`.
    </ResponseField>

    <ResponseField name="value" type="Float!" required>
      How many `units` after generation the code expires.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="segmentIds" type="[String!]!" required>
  Platform segment ids when eligibility is SEGMENTS.
</ResponseField>

<ResponseField name="startsAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
  When the code becomes valid.
</ResponseField>

<ResponseField name="totalUsageLimit" type="Float">
  Maximum times this code may be used in total.
</ResponseField>


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