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

# Update Bundle

<Snippet file="bundles-create-request.mdx" />

## Request

<ParamField body="name" type="string" required>
  The name of the bundle.
</ParamField>

<ParamField body="description" type="string" required>
  A brief description of the bundle.
</ParamField>

<ParamField body="prices" type="[]object" required>
  An array of pricing objects defining the available pricing models in the bundle.

  <Expandable title="Pricing Object Properties">
    <ParamField body="type" type="string" required>
      The pricing model type.
    </ParamField>

    <ParamField body="productId" type="object" required>
      The product identifier associated with the pricing model.

      <Expandable title="Product ID Properties">
        <ParamField body="Type" type="string" required>
          The type of the product.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="billingInterval" type="string" required>
      The billing interval for the pricing model.
    </ParamField>

    <ParamField body="unitPricingModel" type="object">
      Details for the unit pricing model.

      <Expandable title="Unit Pricing Model Properties">
        <ParamField body="pricePerUnit" type="object" required>
          The unit price details.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="tieredPricingModel" type="object">
      Details for the tiered pricing model.

      <Expandable title="Tiered Pricing Model Properties">
        <ParamField body="tiers" type="[]object" required>
          An array of tier definitions.

          <Expandable title="Tier Properties">
            <ParamField body="minUnits" type="number" required>
              The minimum number of units for the tier.
            </ParamField>

            <ParamField body="maxUnits" type="number" required>
              The maximum number of units for the tier.
            </ParamField>

            <ParamField body="pricePerUnit" type="object" required>
              The unit price for this tier.
            </ParamField>

            <ParamField body="fixedFee" type="object">
              The fixed fee applied in this tier.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="fixedPricingModel" type="object">
      Details for the fixed pricing model.

      <Expandable title="Fixed Pricing Model Properties">
        <ParamField body="pricePerUnit" type="object" required>
          The unit price for the fixed pricing model.
        </ParamField>

        <ParamField body="units" type="number" required>
          The number of units for the fixed pricing model.
        </ParamField>

        <ParamField body="total" type="object" required>
          The total fixed price.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="graduatedPercentagePricingModel" type="object">
      Details for the graduated percentage pricing model.

      <Expandable title="Graduated Percentage Pricing Model Properties">
        <ParamField body="tiers" type="[]object" required>
          An array of tier definitions.

          <Expandable title="Tier Properties">
            <ParamField body="minUnits" type="number" required>
              The minimum number of units for the tier.
            </ParamField>

            <ParamField body="maxUnits" type="number" required>
              The maximum number of units for the tier.
            </ParamField>

            <ParamField body="fixedFee" type="object" required>
              The fixed fee for this tier.
            </ParamField>

            <ParamField body="percentage" type="object" required>
              The percentage applied in this tier.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="prepaidFixedTieredPricingModel" type="object">
      Details for the prepaid fixed tiered pricing model.

      <Expandable title="Prepaid Fixed Tiered Pricing Model Properties">
        <ParamField body="tiers" type="[]object" required>
          An array of tier definitions.

          <Expandable title="Tier Properties">
            <ParamField body="minUnits" type="number" required>
              The minimum number of units for the tier.
            </ParamField>

            <ParamField body="maxUnits" type="number" required>
              The maximum number of units for the tier.
            </ParamField>

            <ParamField body="pricePerUnit" type="object" required>
              The unit price for this tier.
            </ParamField>

            <ParamField body="fixedFee" type="object" required>
              The fixed fee for this tier.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="units" type="number" required>
          The number of prepaid units.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="prepaidTieredPricingModel" type="object">
      Details for the prepaid tiered pricing model.

      <Expandable title="Prepaid Tiered Pricing Model Properties">
        <ParamField body="tiers" type="[]object" required>
          An array of tier definitions.

          <Expandable title="Tier Properties">
            <ParamField body="minUnits" type="number" required>
              The minimum number of units for the tier.
            </ParamField>

            <ParamField body="maxUnits" type="number" required>
              The maximum number of units for the tier.
            </ParamField>

            <ParamField body="pricePerUnit" type="object" required>
              The unit price for this tier.
            </ParamField>

            <ParamField body="fixedFee" type="object" required>
              The fixed fee for this tier.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="units" type="number" required>
          The number of prepaid units.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="volumePercentagePricingModel" type="object">
      Details for the volume percentage pricing model.

      <Expandable title="Volume Percentage Pricing Model Properties">
        <ParamField body="pricePerUnit" type="object" required>
          The unit price used in the volume calculation.
        </ParamField>

        <ParamField body="percentage" type="object" required>
          The percentage applied to the volume.
        </ParamField>

        <ParamField body="fixedFee" type="object">
          A fixed fee applied in addition to the percentage.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="discount" type="object">
      Details for any discount applied to the pricing item.

      <Expandable title="Discount Properties">
        <ParamField body="discountType" type="string" required>
          The type of discount.
        </ParamField>

        <ParamField body="amount" type="object" required>
          The discount amount.
        </ParamField>

        <ParamField body="periodLength" type="number" required>
          The duration of the discount in number of periods.
        </ParamField>

        <ParamField body="periodType" type="string" required>
          The type of period over which the discount applies.
        </ParamField>

        <ParamField body="endDate" type="datetime" required>
          The end date of the discount's validity in ISO 8601 format.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="trialPeriodDays" type="number" required>
      The number of trial days before the pricing model takes effect.
    </ParamField>

    <ParamField body="minimumSpend" type="object">
      The minimum spend requirement for the pricing item.

      <Expandable title="Minimum Spend Properties">
        <ParamField body="amount" type="object" required>
          The minimum spend amount.
        </ParamField>

        <ParamField body="period" type="string" required>
          The period over which the minimum spend applies.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="maximumSpend" type="object">
      The maximum spend allowed for the pricing item.

      <Expandable title="Maximum Spend Properties">
        <ParamField body="amount" type="object" required>
          The maximum spend amount.
        </ParamField>

        <ParamField body="period" type="string" required>
          The period over which the maximum spend applies.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Response

<Snippet file="bundles-create-response.mdx" />
