> ## 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.

# BuyXGetYDiscountSettingsInput

> A buy-X-get-Y discount.

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

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

  <Expandable title="fields" lazyRender>
    <ResponseField name="orderDiscounts" type="Boolean">
      Stack with order discounts. Defaults to false.
    </ResponseField>

    <ResponseField name="productDiscounts" type="Boolean">
      Stack with product discounts. Defaults to false.
    </ResponseField>

    <ResponseField name="shippingDiscounts" type="Boolean">
      Stack with shipping discounts. Defaults to false.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="customerBuys" type={<a href="/docs/api-reference/v3/reference/marketing/discount-bxgy-customer-buys-input">DiscountBxgyCustomerBuysInput!</a>} required>
  What the customer must buy to unlock the Y items.

  <Expandable title="fields" lazyRender>
    <ResponseField name="amount" type="Float">
      Required spend when `triggerType` is MINIMUM\_AMOUNT.
    </ResponseField>

    <ResponseField name="collections" type={<a href="/docs/api-reference/v3/reference/marketing/discount-catalog-item-input">[DiscountCatalogItemInput!]</a>}>
      Collections that count toward X.

      <Expandable title="fields" lazyRender>
        <ResponseField name="id" type="String!" required>
          The platform's id for this product or collection.
        </ResponseField>

        <ResponseField name="title" type="String">
          An optional display name.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="products" type={<a href="/docs/api-reference/v3/reference/marketing/discount-catalog-item-input">[DiscountCatalogItemInput!]</a>}>
      Products that count toward X.

      <Expandable title="fields" lazyRender>
        <ResponseField name="id" type="String!" required>
          The platform's id for this product or collection.
        </ResponseField>

        <ResponseField name="title" type="String">
          An optional display name.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="quantity" type="Float">
      Required quantity when `triggerType` is MINIMUM\_QUANTITY.
    </ResponseField>

    <ResponseField name="triggerType" type={<a href="/docs/api-reference/v3/reference/marketing/discount-bxgy-trigger-type">DiscountBxgyTriggerType!</a>} required>
      Whether the customer must buy a quantity or spend an amount.
    </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="customerGets" type={<a href="/docs/api-reference/v3/reference/marketing/discount-bxgy-customer-gets-input">DiscountBxgyCustomerGetsInput!</a>} required>
  What the customer gets, and at what discount.

  <Expandable title="fields" lazyRender>
    <ResponseField name="amount" type="Float!" required>
      Percent off (0–100) when `valueType` is PERCENTAGE; otherwise a currency amount.
    </ResponseField>

    <ResponseField name="collections" type={<a href="/docs/api-reference/v3/reference/marketing/discount-catalog-item-input">[DiscountCatalogItemInput!]</a>}>
      Collections the customer gets.

      <Expandable title="fields" lazyRender>
        <ResponseField name="id" type="String!" required>
          The platform's id for this product or collection.
        </ResponseField>

        <ResponseField name="title" type="String">
          An optional display name.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="products" type={<a href="/docs/api-reference/v3/reference/marketing/discount-catalog-item-input">[DiscountCatalogItemInput!]</a>}>
      Products the customer gets.

      <Expandable title="fields" lazyRender>
        <ResponseField name="id" type="String!" required>
          The platform's id for this product or collection.
        </ResponseField>

        <ResponseField name="title" type="String">
          An optional display name.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="quantity" type="Float!" required>
      How many Y items the customer gets.
    </ResponseField>

    <ResponseField name="valueType" type={<a href="/docs/api-reference/v3/reference/marketing/discount-value-type">DiscountValueType!</a>} required>
      Whether `amount` is a percent or a currency amount off Y.
    </ResponseField>
  </Expandable>
</ResponseField>

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

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

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

<ResponseField name="usesPerOrderLimit" type="Float">
  How many times the Y items may be claimed on one order.
</ResponseField>


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