---
title: Create flexible promotion for specific product items
slug: reference/create-flexible-promotion-for-specific-product-items
docTags: 
createdAt: 2025-03-18T18:28:02.919Z
---

{
  "id": "WTaRIdcv_JHgQOC0sPzo6",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/generic_item_promotion",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/generic_item_promotion"
      }
    ],
    "name": "Create flexible promotion for specific product items",
    "description": "<p>Creates a flexible promotion for specific product items with customizable discount rules.\nUse this when standard promotion types don't match your campaign requirements.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Apply unique discount logic to individual product items</li>\n<li>Create custom promotional campaigns with specific conditions</li>\n<li>Configure time-based or usage-based promotion triggers</li>\n</ul>\n<p><strong>Important Note:</strong> Allows full customization of discount rules and activation conditions.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Input for creating flexible custom promotions with configurable conditions and discount models for specific product items.",
          "customType": "payment.pricing.promotions.pre_created.GenericItemPromotion.in",
          "schema": [
            {
              "name": "id",
              "kind": "required",
              "type": "string",
              "description": "Unique identifier for the generic promotion within account scope.",
              "example": ""
            },
            {
              "name": "type",
              "kind": "optional",
              "type": "string",
              "description": "Fixed promotion type identifier for generic product item promotions.",
              "example": "",
              "default": "generic_item_promotion"
            },
            {
              "name": "promotionName",
              "kind": "required",
              "type": "string",
              "description": "Human-readable name for promotion display and management within admin interfaces.",
              "example": ""
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "Optional detailed description explaining promotion purpose, terms, and usage guidelines.",
              "example": ""
            },
            {
              "name": "lockingStatus",
              "kind": "optional",
              "type": "string",
              "description": "Modification permissions controlling promotion lifecycle and editing capabilities.",
              "modelRef": "#/components/schemas/common.LockingStatus.in",
              "customType": "common.LockingStatus.in",
              "schema": []
            },
            {
              "name": "targetItemId",
              "kind": "optional",
              "type": "string",
              "description": "Required identifier of the specific product item receiving promotion benefits.",
              "example": ""
            },
            {
              "name": "promotionType",
              "kind": "optional",
              "type": "string",
              "description": "Classification determining promotion behavior for system processing and reporting.",
              "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.PromotionType.in",
              "customType": "payment.pricing.promotions.attributes.PromotionType.in",
              "schema": []
            },
            {
              "name": "condition",
              "kind": "optional",
              "type": "object",
              "description": "Configurable activation criteria defining when promotion applies to customer usage.",
              "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.PromotionCondition.in",
              "customType": "payment.pricing.promotions.conditions.PromotionCondition.in",
              "schema": [],
              "complexType": "oneOf",
              "complexItems": [
                {
                  "name": "payment.pricing.promotions.conditions.AfterItemPriceThreshold.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterItemPriceThreshold.in",
                  "schema": [
                    {
                      "name": "requiredHistory",
                      "kind": "optional",
                      "type": "object",
                      "description": "Invoice history requirements needed to evaluate the cumulative price threshold condition accurately.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "schema": [
                        {
                          "name": "cycles",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                          "example": 0
                        },
                        {
                          "name": "months",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "minThreshold",
                      "kind": "optional",
                      "type": "number",
                      "description": "Minimum cumulative price threshold that must be exceeded for the promotion condition to activate.",
                      "example": ""
                    },
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Condition type identifier always set to 'after_item_price_threshold' for item price threshold conditions.",
                      "example": "",
                      "default": "after_item_price_threshold"
                    },
                    {
                      "name": "itemId",
                      "kind": "optional",
                      "type": "string",
                      "description": "Unique identifier of the product item whose cumulative price is monitored for threshold evaluation.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.conditions.AfterProductPriceThreshold.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterProductPriceThreshold.in",
                  "schema": [
                    {
                      "name": "requiredHistory",
                      "kind": "optional",
                      "type": "object",
                      "description": "Invoice history requirements needed to evaluate the cumulative product price threshold condition accurately.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "schema": [
                        {
                          "name": "cycles",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                          "example": 0
                        },
                        {
                          "name": "months",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "minThreshold",
                      "kind": "optional",
                      "type": "number",
                      "description": "Minimum cumulative price threshold that must be exceeded for the promotion condition to activate.",
                      "example": ""
                    },
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Condition type identifier always set to 'after_product_price_threshold' for product price threshold conditions.",
                      "example": "",
                      "default": "after_product_price_threshold"
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.conditions.CompositeAndCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CompositeAndCondition.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Condition type identifier always set to 'and_condition' for composite AND condition evaluation.",
                      "example": "",
                      "default": "and_condition"
                    },
                    {
                      "name": "conditions",
                      "kind": "optional",
                      "type": "object",
                      "description": "Array of promotion conditions that must all be satisfied for this composite condition to pass.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.PromotionCondition.in",
                      "customType": "payment.pricing.promotions.conditions.PromotionCondition.in[]",
                      "schema": [],
                      "complexType": "oneOf",
                      "complexItems": [
                        {
                          "name": "payment.pricing.promotions.conditions.AfterItemPriceThreshold.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterItemPriceThreshold.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Circular-Reference"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.conditions.AfterProductPriceThreshold.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterProductPriceThreshold.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Circular-Reference"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.conditions.CompositeAndCondition.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CompositeAndCondition.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Circular-Reference"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.conditions.CustomerTagsCondition.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CustomerTagsCondition.in",
                          "schema": [
                            {
                              "name": "type",
                              "kind": "optional",
                              "type": "string",
                              "description": "Fixed condition identifier for customer tag matching behavior",
                              "example": "",
                              "default": "customer_tag_condition"
                            },
                            {
                              "name": "customerTagsToFind",
                              "kind": "optional",
                              "type": "map",
                              "description": "Required customer tag key-value pairs for condition activation with exact matching requirements",
                              "example": "",
                              "customType": "map<string, string>",
                              "schema": []
                            },
                            {
                              "name": "granularity",
                              "kind": "optional",
                              "type": "object",
                              "description": "Promotion targeting scope determining product or item-level application of customer tag conditions",
                              "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.Granularity.in",
                              "customType": "payment.pricing.promotions.attributes.granularity.Granularity.in",
                              "schema": [],
                              "complexType": "oneOf",
                              "complexItems": [
                                {
                                  "name": "payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                                  "description": "",
                                  "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                                  "schema": [
                                    {
                                      "name": "",
                                      "description": "",
                                      "customType": "Max depth limit reached"
                                    }
                                  ]
                                },
                                {
                                  "name": "payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                                  "description": "",
                                  "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                                  "schema": [
                                    {
                                      "name": "",
                                      "description": "",
                                      "customType": "Max depth limit reached"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.conditions.NextBillingCycle.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NextBillingCycle.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.conditions.NoCondition.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NoCondition.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.conditions.SamePlan.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.SamePlan.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.conditions.TimeLimited.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.TimeLimited.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.conditions.CustomerTagsCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CustomerTagsCondition.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Fixed condition identifier for customer tag matching behavior",
                      "example": "",
                      "default": "customer_tag_condition"
                    },
                    {
                      "name": "customerTagsToFind",
                      "kind": "optional",
                      "type": "map",
                      "description": "Required customer tag key-value pairs for condition activation with exact matching requirements",
                      "example": "",
                      "customType": "map<string, string>",
                      "schema": []
                    },
                    {
                      "name": "granularity",
                      "kind": "optional",
                      "type": "object",
                      "description": "Promotion targeting scope determining product or item-level application of customer tag conditions",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.Granularity.in",
                      "customType": "payment.pricing.promotions.attributes.granularity.Granularity.in",
                      "schema": [],
                      "complexType": "oneOf",
                      "complexItems": [
                        {
                          "name": "payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.conditions.NextBillingCycle.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NextBillingCycle.in",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Max depth limit reached"
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.conditions.NoCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NoCondition.in",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Max depth limit reached"
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.conditions.SamePlan.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.SamePlan.in",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Max depth limit reached"
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.conditions.TimeLimited.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.TimeLimited.in",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Max depth limit reached"
                    }
                  ]
                }
              ]
            },
            {
              "name": "promotionModel",
              "kind": "optional",
              "type": "object",
              "description": "Discount calculation model defining amount type and application rules.",
              "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.PromotionModel.in",
              "customType": "payment.pricing.promotions.promotion_model.PromotionModel.in",
              "schema": [],
              "complexType": "oneOf",
              "complexItems": [
                {
                  "name": "payment.pricing.promotions.promotion_model.Absolute.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.Absolute.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Promotion model type identifier always set to 'absolute' for fixed discount amount calculations.",
                      "example": "",
                      "default": "absolute"
                    },
                    {
                      "name": "measure",
                      "kind": "optional",
                      "type": "object",
                      "description": "Measurement strategy defining how discount units are calculated from invoice pricing information.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.Measure.in",
                      "customType": "payment.pricing.promotions.attributes.measure.Measure.in",
                      "schema": [],
                      "complexType": "oneOf",
                      "complexItems": [
                        {
                          "name": "payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                          "schema": [
                            {
                              "name": "type",
                              "kind": "optional",
                              "type": "string",
                              "description": "Measure type identifier always set to 'per_batch' for batch-based discount calculations.",
                              "example": "",
                              "default": "per_batch"
                            },
                            {
                              "name": "batchSize",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "description": "Number of usage units grouped together to form a single discountable batch for promotion calculations.",
                              "example": 0
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.attributes.measure.PerUnit.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnit.in",
                          "schema": [
                            {
                              "name": "type",
                              "kind": "optional",
                              "type": "string",
                              "description": "Measure type identifier always set to 'per_unit' for per-unit discount calculations.",
                              "example": "",
                              "default": "per_unit"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.attributes.measure.TotalPrice.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.TotalPrice.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name": "requiredHistory",
                      "kind": "optional",
                      "type": "object",
                      "description": "Invoice history requirements needed for accurate discount calculation and application tracking.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "schema": [
                        {
                          "name": "cycles",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                          "example": 0
                        },
                        {
                          "name": "months",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "totalMaxDiscount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Maximum total discount amount that can be applied across all billing cycles for this promotion.",
                      "example": ""
                    },
                    {
                      "name": "cycleMaxDiscount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Maximum discount amount that can be applied in a single billing cycle for this promotion.",
                      "example": ""
                    },
                    {
                      "name": "discount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Fixed discount amount applied per discount unit as determined by the measure configuration.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.promotion_model.PriceTieredRelative.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.PriceTieredRelative.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Fixed promotion model type identifier for price-tiered relative percentage discount calculations.",
                      "example": "",
                      "default": "price_tiered_relative"
                    },
                    {
                      "name": "measure",
                      "kind": "optional",
                      "type": "object",
                      "description": "Measure used for calculating discount thresholds, typically TotalPrice for price-based tier evaluation.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.Measure.in",
                      "customType": "payment.pricing.promotions.attributes.measure.Measure.in",
                      "schema": [],
                      "complexType": "oneOf",
                      "complexItems": [
                        {
                          "name": "payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                          "schema": [
                            {
                              "name": "type",
                              "kind": "optional",
                              "type": "string",
                              "description": "Measure type identifier always set to 'per_batch' for batch-based discount calculations.",
                              "example": "",
                              "default": "per_batch"
                            },
                            {
                              "name": "batchSize",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "description": "Number of usage units grouped together to form a single discountable batch for promotion calculations.",
                              "example": 0
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.attributes.measure.PerUnit.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnit.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.attributes.measure.TotalPrice.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.TotalPrice.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name": "requiredHistory",
                      "kind": "optional",
                      "type": "object",
                      "description": "History requirements defining when the tiered promotion becomes active based on customer usage patterns.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "schema": [
                        {
                          "name": "cycles",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                          "example": 0
                        },
                        {
                          "name": "months",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "totalMaxDiscount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Maximum total discount amount across all billing cycles to prevent excessive promotion costs.",
                      "example": ""
                    },
                    {
                      "name": "cycleMaxDiscount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Maximum discount amount per billing cycle for consistent budget management during promotion periods.",
                      "example": ""
                    },
                    {
                      "name": "discountRatioMap",
                      "kind": "optional",
                      "type": "map",
                      "description": "Price threshold map defining percentage discount ratios for each tier level as decimal values.",
                      "example": "",
                      "customType": "map<string, number>",
                      "schema": []
                    },
                    {
                      "name": "discountCalculationStrategy",
                      "kind": "optional",
                      "type": "string",
                      "description": "Strategy for calculating tiered discounts, either CHOOSE_SINGLE_TIER or STEP_FUNCTION approach.",
                      "modelRef": "#/components/schemas/payment.pricing.prepaid.OfferCalculationStrategy.out",
                      "customType": "payment.pricing.prepaid.OfferCalculationStrategy.out",
                      "schema": []
                    },
                    {
                      "name": "acrossBillingPeriods",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "Controls whether discount tiers accumulate across billing periods or reset per cycle for tier calculations.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "payment.pricing.promotions.promotion_model.Relative.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.Relative.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Fixed promotion model type identifier for relative percentage-based discount calculations.",
                      "example": "",
                      "default": "relative"
                    },
                    {
                      "name": "measure",
                      "kind": "optional",
                      "type": "object",
                      "description": "Measure used to determine which price portion receives the percentage discount application.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.Measure.in",
                      "customType": "payment.pricing.promotions.attributes.measure.Measure.in",
                      "schema": [],
                      "complexType": "oneOf",
                      "complexItems": [
                        {
                          "name": "payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.attributes.measure.PerUnit.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnit.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "payment.pricing.promotions.attributes.measure.TotalPrice.in",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.TotalPrice.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "name": "requiredHistory",
                      "kind": "optional",
                      "type": "object",
                      "description": "History requirements defining when the relative promotion becomes active based on customer usage patterns.",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                      "schema": [
                        {
                          "name": "cycles",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                          "example": 0
                        },
                        {
                          "name": "months",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "totalMaxDiscount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Maximum total discount amount across all billing cycles to prevent excessive promotion costs.",
                      "example": ""
                    },
                    {
                      "name": "cycleMaxDiscount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Maximum discount amount per billing cycle for consistent budget management during promotion periods.",
                      "example": ""
                    },
                    {
                      "name": "discountRatio",
                      "kind": "optional",
                      "type": "number",
                      "description": "Fixed percentage discount ratio applied to measured price portions as decimal value between zero and one.",
                      "example": ""
                    }
                  ]
                }
              ]
            },
            {
              "name": "dimensionConstraintMap",
              "kind": "optional",
              "type": "map",
              "description": "Key-value pairs defining usage dimension filters with optional regex pattern support.",
              "example": "",
              "customType": "map<string, string>",
              "schema": []
            },
            {
              "name": "isRegEx",
              "kind": "optional",
              "type": "boolean",
              "description": "Enables regular expression matching for dimension constraint values and targeting flexibility.",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.promotions.pre_created.GenericItemPromotion.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Promotion created with custom discount configuration and activation details",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Response containing flexible custom promotion details with configurable conditions and discount models for specific product items.",
            "customType": "payment.pricing.promotions.pre_created.GenericItemPromotion.out",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier for the generic promotion within account scope.",
                "example": ""
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "description": "Fixed promotion type identifier for generic product item promotions.",
                "example": "",
                "default": "generic_item_promotion"
              },
              {
                "name": "promotionName",
                "kind": "required",
                "type": "string",
                "description": "Human-readable name for promotion display and management within admin interfaces.",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Optional detailed description explaining promotion purpose, terms, and usage guidelines.",
                "example": ""
              },
              {
                "name": "lockingStatus",
                "kind": "optional",
                "type": "string",
                "description": "Current modification permissions and lifecycle state of the promotion.",
                "modelRef": "#/components/schemas/common.LockingStatus.in",
                "customType": "common.LockingStatus.in",
                "schema": []
              },
              {
                "name": "lastUpdateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Unix timestamp in milliseconds when promotion was last modified or configured.",
                "example": 0
              },
              {
                "name": "targetItemId",
                "kind": "optional",
                "type": "string",
                "description": "Required identifier of the specific product item receiving promotion benefits.",
                "example": ""
              },
              {
                "name": "promotionType",
                "kind": "optional",
                "type": "string",
                "description": "Classification determining promotion behavior for system processing and reporting.",
                "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.PromotionType.in",
                "customType": "payment.pricing.promotions.attributes.PromotionType.in",
                "schema": []
              },
              {
                "name": "condition",
                "kind": "optional",
                "type": "object",
                "description": "Configurable activation criteria defining when promotion applies to customer usage.",
                "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.PromotionCondition.out",
                "customType": "payment.pricing.promotions.conditions.PromotionCondition.out",
                "schema": [],
                "complexType": "oneOf",
                "complexItems": [
                  {
                    "name": "payment.pricing.promotions.conditions.AfterItemPriceThreshold.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterItemPriceThreshold.out",
                    "schema": [
                      {
                        "name": "requiredHistory",
                        "kind": "optional",
                        "type": "object",
                        "description": "Invoice history requirements needed to evaluate the cumulative price threshold condition accurately.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "schema": [
                          {
                            "name": "cycles",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                            "example": 0
                          },
                          {
                            "name": "months",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "minThreshold",
                        "kind": "optional",
                        "type": "number",
                        "description": "Minimum cumulative price threshold that must be exceeded for the promotion condition to activate.",
                        "example": ""
                      },
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Condition type identifier always set to 'after_item_price_threshold' for item price threshold conditions.",
                        "example": "",
                        "default": "after_item_price_threshold"
                      },
                      {
                        "name": "itemId",
                        "kind": "optional",
                        "type": "string",
                        "description": "Unique identifier of the product item whose cumulative price is monitored for threshold evaluation.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.conditions.AfterProductPriceThreshold.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterProductPriceThreshold.out",
                    "schema": [
                      {
                        "name": "requiredHistory",
                        "kind": "optional",
                        "type": "object",
                        "description": "Invoice history requirements needed to evaluate the cumulative product price threshold condition accurately.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "schema": [
                          {
                            "name": "cycles",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                            "example": 0
                          },
                          {
                            "name": "months",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "minThreshold",
                        "kind": "optional",
                        "type": "number",
                        "description": "Minimum cumulative price threshold that must be exceeded for the promotion condition to activate.",
                        "example": ""
                      },
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Condition type identifier always set to 'after_product_price_threshold' for product price threshold conditions.",
                        "example": "",
                        "default": "after_product_price_threshold"
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.conditions.CompositeAndCondition.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CompositeAndCondition.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Condition type identifier always set to 'and_condition' for composite AND condition evaluation.",
                        "example": "",
                        "default": "and_condition"
                      },
                      {
                        "name": "conditions",
                        "kind": "optional",
                        "type": "object",
                        "description": "Array of promotion conditions that must all be satisfied for this composite condition to pass.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.PromotionCondition.out",
                        "customType": "payment.pricing.promotions.conditions.PromotionCondition.out[]",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.pricing.promotions.conditions.AfterItemPriceThreshold.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterItemPriceThreshold.out",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Circular-Reference"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.conditions.AfterProductPriceThreshold.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.AfterProductPriceThreshold.out",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Circular-Reference"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.conditions.CompositeAndCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CompositeAndCondition.out",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Circular-Reference"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.conditions.CustomerTagsCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CustomerTagsCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Fixed condition identifier for customer tag matching behavior",
                                "example": "",
                                "default": "customer_tag_condition"
                              },
                              {
                                "name": "customerTagsToFind",
                                "kind": "optional",
                                "type": "map",
                                "description": "Required customer tag key-value pairs for condition activation with exact matching requirements",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              },
                              {
                                "name": "granularity",
                                "kind": "optional",
                                "type": "object",
                                "description": "Promotion targeting scope determining product or item-level application of customer tag conditions",
                                "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.Granularity.out",
                                "customType": "payment.pricing.promotions.attributes.granularity.Granularity.out",
                                "schema": [],
                                "complexType": "oneOf",
                                "complexItems": [
                                  {
                                    "name": "payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                                    "description": "",
                                    "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                                    "schema": [
                                      {
                                        "name": "",
                                        "description": "",
                                        "customType": "Max depth limit reached"
                                      }
                                    ]
                                  },
                                  {
                                    "name": "payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                                    "description": "",
                                    "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                                    "schema": [
                                      {
                                        "name": "",
                                        "description": "",
                                        "customType": "Max depth limit reached"
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.conditions.NextBillingCycle.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NextBillingCycle.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.conditions.NoCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NoCondition.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.conditions.SamePlan.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.SamePlan.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.conditions.TimeLimited.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.TimeLimited.out",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.conditions.CustomerTagsCondition.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.CustomerTagsCondition.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Fixed condition identifier for customer tag matching behavior",
                        "example": "",
                        "default": "customer_tag_condition"
                      },
                      {
                        "name": "customerTagsToFind",
                        "kind": "optional",
                        "type": "map",
                        "description": "Required customer tag key-value pairs for condition activation with exact matching requirements",
                        "example": "",
                        "customType": "map<string, string>",
                        "schema": []
                      },
                      {
                        "name": "granularity",
                        "kind": "optional",
                        "type": "object",
                        "description": "Promotion targeting scope determining product or item-level application of customer tag conditions",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.Granularity.out",
                        "customType": "payment.pricing.promotions.attributes.granularity.Granularity.out",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ItemVariantGranularity.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.granularity.ProductGranularity.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.conditions.NextBillingCycle.in",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NextBillingCycle.in",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.conditions.NoCondition.in",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.NoCondition.in",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.conditions.SamePlan.in",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.SamePlan.in",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.conditions.TimeLimited.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.conditions.TimeLimited.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "promotionModel",
                "kind": "optional",
                "type": "object",
                "description": "Discount calculation model defining amount type and application rules.",
                "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.PromotionModel.out",
                "customType": "payment.pricing.promotions.promotion_model.PromotionModel.out",
                "schema": [],
                "complexType": "oneOf",
                "complexItems": [
                  {
                    "name": "payment.pricing.promotions.promotion_model.Absolute.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.Absolute.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Promotion model type identifier always set to 'absolute' for fixed discount amount calculations.",
                        "example": "",
                        "default": "absolute"
                      },
                      {
                        "name": "measure",
                        "kind": "optional",
                        "type": "object",
                        "description": "Measurement strategy defining how discount units are calculated from invoice pricing information.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.Measure.out",
                        "customType": "payment.pricing.promotions.attributes.measure.Measure.out",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Measure type identifier always set to 'per_batch' for batch-based discount calculations.",
                                "example": "",
                                "default": "per_batch"
                              },
                              {
                                "name": "batchSize",
                                "kind": "optional",
                                "type": "integer<int64>",
                                "description": "Number of usage units grouped together to form a single discountable batch for promotion calculations.",
                                "example": 0
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.attributes.measure.PerUnit.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnit.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Measure type identifier always set to 'per_unit' for per-unit discount calculations.",
                                "example": "",
                                "default": "per_unit"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.attributes.measure.TotalPrice.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.TotalPrice.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "requiredHistory",
                        "kind": "optional",
                        "type": "object",
                        "description": "Invoice history requirements needed for accurate discount calculation and application tracking.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "schema": [
                          {
                            "name": "cycles",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                            "example": 0
                          },
                          {
                            "name": "months",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "totalMaxDiscount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Maximum total discount amount that can be applied across all billing cycles for this promotion.",
                        "example": ""
                      },
                      {
                        "name": "cycleMaxDiscount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Maximum discount amount that can be applied in a single billing cycle for this promotion.",
                        "example": ""
                      },
                      {
                        "name": "discount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Fixed discount amount applied per discount unit as determined by the measure configuration.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.promotion_model.PriceTieredRelative.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.PriceTieredRelative.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Applied promotion model type identifier confirming price-tiered relative percentage discount calculations.",
                        "example": "",
                        "default": "price_tiered_relative"
                      },
                      {
                        "name": "measure",
                        "kind": "optional",
                        "type": "object",
                        "description": "Applied measure used for calculating discount thresholds, typically TotalPrice for price-based tier evaluation.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.Measure.out",
                        "customType": "payment.pricing.promotions.attributes.measure.Measure.out",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Measure type identifier always set to 'per_batch' for batch-based discount calculations.",
                                "example": "",
                                "default": "per_batch"
                              },
                              {
                                "name": "batchSize",
                                "kind": "optional",
                                "type": "integer<int64>",
                                "description": "Number of usage units grouped together to form a single discountable batch for promotion calculations.",
                                "example": 0
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.attributes.measure.PerUnit.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnit.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.attributes.measure.TotalPrice.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.TotalPrice.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "requiredHistory",
                        "kind": "optional",
                        "type": "object",
                        "description": "Applied history requirements defining when the tiered promotion becomes active based on customer usage patterns.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "schema": [
                          {
                            "name": "cycles",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                            "example": 0
                          },
                          {
                            "name": "months",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "totalMaxDiscount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Configured maximum total discount amount across all billing cycles to prevent excessive promotion costs.",
                        "example": ""
                      },
                      {
                        "name": "cycleMaxDiscount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Configured maximum discount amount per billing cycle for consistent budget management during promotion periods.",
                        "example": ""
                      },
                      {
                        "name": "discountRatioMap",
                        "kind": "optional",
                        "type": "map",
                        "description": "Applied price threshold map defining percentage discount ratios for each tier level as decimal values.",
                        "example": "",
                        "customType": "map<string, number>",
                        "schema": []
                      },
                      {
                        "name": "discountCalculationStrategy",
                        "kind": "optional",
                        "type": "string",
                        "description": "Applied strategy for calculating tiered discounts, either CHOOSE_SINGLE_TIER or STEP_FUNCTION approach.",
                        "modelRef": "#/components/schemas/payment.pricing.prepaid.OfferCalculationStrategy.out",
                        "customType": "payment.pricing.prepaid.OfferCalculationStrategy.out",
                        "schema": []
                      },
                      {
                        "name": "acrossBillingPeriods",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Current setting controlling whether discount tiers accumulate across billing periods or reset per cycle.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "payment.pricing.promotions.promotion_model.Relative.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.promotions.promotion_model.Relative.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Applied promotion model type identifier confirming relative percentage-based discount calculations.",
                        "example": "",
                        "default": "relative"
                      },
                      {
                        "name": "measure",
                        "kind": "optional",
                        "type": "object",
                        "description": "Applied measure used to determine which price portion received the percentage discount application.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.Measure.out",
                        "customType": "payment.pricing.promotions.attributes.measure.Measure.out",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnitBatch.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.attributes.measure.PerUnit.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.PerUnit.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.promotions.attributes.measure.TotalPrice.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.measure.TotalPrice.in",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "requiredHistory",
                        "kind": "optional",
                        "type": "object",
                        "description": "Applied history requirements defining when the relative promotion became active based on customer usage patterns.",
                        "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "customType": "payment.pricing.promotions.attributes.HistoryRequirements.in",
                        "schema": [
                          {
                            "name": "cycles",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of billing cycles of customer invoice history required for promotion calculations.",
                            "example": 0
                          },
                          {
                            "name": "months",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Minimum number of months of customer invoice history required for promotion calculations.",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "totalMaxDiscount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Configured maximum total discount amount across all billing cycles to prevent excessive promotion costs.",
                        "example": ""
                      },
                      {
                        "name": "cycleMaxDiscount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Configured maximum discount amount per billing cycle for consistent budget management during promotion periods.",
                        "example": ""
                      },
                      {
                        "name": "discountRatio",
                        "kind": "optional",
                        "type": "number",
                        "description": "Applied fixed percentage discount ratio used on measured price portions as decimal value between zero and one.",
                        "example": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "dimensionConstraintMap",
                "kind": "optional",
                "type": "map",
                "description": "Key-value pairs defining usage dimension filters with optional regex pattern support.",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "isRegEx",
                "kind": "optional",
                "type": "boolean",
                "description": "Enables regular expression matching for dimension constraint values and targeting flexibility.",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.promotions.pre_created.GenericItemPromotion.out",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid promotion configuration or malformed discount rules",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Authentication required or invalid API key provided",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while creating promotion",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "nFhmSTj9OSD2YVo0NRggi",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/generic_item_promotion \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"id\": \"\",\n     \"type\": \"generic_item_promotion\",\n     \"promotionName\": \"\",\n     \"condition\": {\n     \"type\": \"after_item_price_threshold\"\n     },\n     \"promotionModel\": {\n     \"type\": \"absolute\",\n     \"measure\": {\n     \"type\": \"per_batch\"\n     }\n     }\n     }'"
        },
        {
          "id": "cpbmhf6zYAayLuALxKGlZ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"id\": \"\",\n   \"type\": \"generic_item_promotion\",\n   \"promotionName\": \"\",\n   \"condition\": {\n      \"type\": \"after_item_price_threshold\"\n   },\n   \"promotionModel\": {\n      \"type\": \"absolute\",\n      \"measure\": {\n         \"type\": \"per_batch\"\n      }\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/generic_item_promotion\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "voSqt3UxRQxAAJ_FEUi_W",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/generic_item_promotion\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"id\": \"\",\n   \"type\": \"generic_item_promotion\",\n   \"promotionName\": \"\",\n   \"condition\": {\n      \"type\": \"after_item_price_threshold\"\n   },\n   \"promotionModel\": {\n      \"type\": \"absolute\",\n      \"measure\": {\n         \"type\": \"per_batch\"\n      }\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "yD3bIhreseTHBB9uMYwHc",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/generic_item_promotion\"\n\npayload = json.dumps({\n   \"id\": \"\",\n   \"type\": \"generic_item_promotion\",\n   \"promotionName\": \"\",\n   \"condition\": {\n      \"type\": \"after_item_price_threshold\"\n   },\n   \"promotionModel\": {\n      \"type\": \"absolute\",\n      \"measure\": {\n         \"type\": \"per_batch\"\n      }\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "nFhmSTj9OSD2YVo0NRggi"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Promotion created with custom discount configuration and activation details\n{\n  \"id\": \"\",\n  \"type\": \"\",\n  \"promotionName\": \"\",\n  \"description\": \"\",\n  \"lockingStatus\": \"\",\n  \"lastUpdateTimeInMillis\": \"\",\n  \"targetItemId\": \"\",\n  \"promotionType\": \"\",\n  \"condition\": {},\n  \"promotionModel\": {},\n  \"dimensionConstraintMap\": \"\",\n  \"isRegEx\": false\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid promotion configuration or malformed discount rules\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authentication required or invalid API key provided\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal server error occurred while creating promotion\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}