---
title: /pricing/modeling/price-modeling
slug: amberflo-api/pricingmodelingprice-modeling
docTags: 
createdAt: 2024-11-07T15:10:16.968Z
---

{
  "id": "oRNxGQ3k3o1hBfDay60d9",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/pricing/modeling/price-modeling",
    "servers": [
      {
        "url": "https://app.amberflo.io/pricing/modeling/price-modeling"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingRequest.in",
          "schema": [
            {
              "name": "segments",
              "kind": "optional",
              "type": "array",
              "description": "The list of the segments for the customers.",
              "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.AccountUsageClusterSegment.in",
              "customType": "com.amberflo.analysis.segmentation.AccountUsageClusterSegment.in[]",
              "schema": [
                {
                  "name": "meterUsageClusterSegments",
                  "kind": "optional",
                  "type": "array",
                  "description": "A list of usage statics for each meter requested.",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.MeterUsageClusterSegment.in",
                  "customType": "com.amberflo.analysis.segmentation.MeterUsageClusterSegment.in[]",
                  "schema": [
                    {
                      "name": "meterApiName",
                      "kind": "optional",
                      "type": "string",
                      "description": "The meter-api-name.",
                      "example": ""
                    },
                    {
                      "name": "groupInfo",
                      "kind": "optional",
                      "type": "object",
                      "description": "The dimension of the meter Api Name.",
                      "modelRef": "#/components/schemas/payment.meters.GroupInfo.in",
                      "customType": "payment.meters.GroupInfo.in",
                      "schema": [
                        {
                          "name": "gi",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, string>",
                          "schema": []
                        }
                      ]
                    },
                    {
                      "name": "usageBucketList",
                      "kind": "optional",
                      "type": "array",
                      "description": "The list of the usage buckets in the customer cluster segment.",
                      "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.MeterUsageSegmentBucket.in",
                      "customType": "com.amberflo.analysis.segmentation.MeterUsageSegmentBucket.in[]",
                      "schema": [
                        {
                          "name": "usage",
                          "kind": "optional",
                          "type": "number",
                          "description": "The average usage for the customers in the bucket.",
                          "example": ""
                        },
                        {
                          "name": "amountOfCustomers",
                          "kind": "optional",
                          "type": "number",
                          "description": "The number of customers in the bucket.",
                          "example": ""
                        },
                        {
                          "name": "monthlyCustomerTrend",
                          "kind": "optional",
                          "type": "number",
                          "description": "How many customers on average to join or leave this bucket every month",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "averageUsage",
                      "kind": "optional",
                      "type": "number",
                      "description": "Avg usage over all customers.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "customersInSegment",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "description": "Number of customers in the segment.",
                  "example": 0
                }
              ]
            },
            {
              "name": "productItemConstraints",
              "kind": "optional",
              "type": "map",
              "description": "The constraints for product item or meter, ordered by meter api name.",
              "example": "",
              "customType": "map<string, com.amberflo.analysis.modeling.price_modeling.constraint.PricingPlansModelingProductItemConstraint.in>",
              "schema": []
            },
            {
              "name": "segmentConstraints",
              "kind": "optional",
              "type": "array",
              "description": "The list of segment requests for pricing plans. They are in the same order with the segments.",
              "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.PricingPlansModelingSegmentConstraint.in",
              "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.PricingPlansModelingSegmentConstraint.in[]",
              "schema": [
                {
                  "name": "flatRatePrice",
                  "kind": "optional",
                  "type": "object",
                  "description": "The constraint for the flat rate for the segmentation.",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "revenue",
                  "kind": "optional",
                  "type": "object",
                  "description": "The constraint for the revenue from the segmentation.",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                }
              ]
            },
            {
              "name": "constraint",
              "kind": "optional",
              "type": "object",
              "description": "The overall constraints for the pricing plan.",
              "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.PricingPlansModelingConstraint.in",
              "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.PricingPlansModelingConstraint.in",
              "schema": [
                {
                  "name": "amountOfTiers",
                  "kind": "optional",
                  "type": "object",
                  "description": "The constraint on how many tiers for tiered pricing plan. Default from 1 - 3.",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "itemUsageRevenueWeight",
                  "kind": "optional",
                  "type": "object",
                  "description": "The weight of usage revenue over total revenue. From 0.0 to 1.0",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "itemUsageRevenue",
                  "kind": "optional",
                  "type": "object",
                  "description": "The constraint on usage revenue.",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "flatRateRevenueWeight",
                  "kind": "optional",
                  "type": "object",
                  "description": "The weight of fixed rate revenue over total revenue. From 0.0 to 1.0",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "flatRateRevenue",
                  "kind": "optional",
                  "type": "object",
                  "description": "The constraint on fixed rate revenue.",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "revenue",
                  "kind": "optional",
                  "type": "object",
                  "description": "The constraint on total revenue.",
                  "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "customType": "com.amberflo.analysis.modeling.price_modeling.constraint.MinMaxConstraint.in",
                  "schema": [
                    {
                      "name": "min",
                      "kind": "optional",
                      "type": "number",
                      "description": "The minimum value for the required value.",
                      "example": ""
                    },
                    {
                      "name": "max",
                      "kind": "optional",
                      "type": "number",
                      "description": "The maximum value for the required value. Zero means not allowed.",
                      "example": ""
                    }
                  ]
                }
              ]
            },
            {
              "name": "trendTimeRange",
              "kind": "optional",
              "type": "object",
              "description": "The time range for the trends with the pricing models.",
              "modelRef": "#/components/schemas/payment.common.TimeRange.in",
              "customType": "payment.common.TimeRange.in",
              "schema": [
                {
                  "name": "startTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "endTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingRequest.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingResponse.out",
            "schema": [
              {
                "name": "recommendations",
                "kind": "optional",
                "type": "array",
                "description": "The list of recommendations for the giving segmentations.",
                "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingRecommendation.out",
                "customType": "com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingRecommendation.out[]",
                "schema": [
                  {
                    "name": "segmentPricingPlans",
                    "kind": "optional",
                    "type": "array",
                    "description": "The list of pricing plan for customers segmentations.",
                    "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingSegmentResponse.out",
                    "customType": "com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingSegmentResponse.out[]",
                    "schema": [
                      {
                        "name": "segment",
                        "kind": "optional",
                        "type": "object",
                        "description": "The customer segmentation.",
                        "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.AccountUsageClusterSegment.out",
                        "customType": "com.amberflo.analysis.segmentation.AccountUsageClusterSegment.out",
                        "schema": [
                          {
                            "name": "meterUsageClusterSegments",
                            "kind": "optional",
                            "type": "array",
                            "description": "A list of usage statics for each meter requested.",
                            "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.MeterUsageClusterSegment.out",
                            "customType": "com.amberflo.analysis.segmentation.MeterUsageClusterSegment.out[]",
                            "schema": [
                              {
                                "name": "meterApiName",
                                "kind": "optional",
                                "type": "string",
                                "description": "The meter-api-name.",
                                "example": ""
                              },
                              {
                                "name": "groupInfo",
                                "kind": "optional",
                                "type": "object",
                                "description": "The dimension of the meter Api Name.",
                                "modelRef": "#/components/schemas/payment.meters.GroupInfo.out",
                                "customType": "payment.meters.GroupInfo.out",
                                "schema": [
                                  {
                                    "name": "gi",
                                    "kind": "optional",
                                    "type": "map",
                                    "example": "",
                                    "customType": "map<string, string>",
                                    "schema": []
                                  }
                                ]
                              },
                              {
                                "name": "usageBucketList",
                                "kind": "optional",
                                "type": "array",
                                "description": "The list of the usage buckets in the customer cluster segment.",
                                "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.MeterUsageSegmentBucket.out",
                                "customType": "com.amberflo.analysis.segmentation.MeterUsageSegmentBucket.out[]",
                                "schema": [
                                  {
                                    "name": "usage",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "The average usage for the customers in the bucket.",
                                    "example": ""
                                  },
                                  {
                                    "name": "amountOfCustomers",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "The number of customers in the bucket.",
                                    "example": ""
                                  },
                                  {
                                    "name": "monthlyCustomerTrend",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "How many customers on average to join or leave this bucket every month",
                                    "example": ""
                                  }
                                ]
                              },
                              {
                                "name": "averageUsage",
                                "kind": "optional",
                                "type": "number",
                                "description": "Avg usage over all customers.",
                                "example": ""
                              }
                            ]
                          },
                          {
                            "name": "customersInSegment",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "description": "Number of customers in the segment.",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "flatRatePrice",
                        "kind": "optional",
                        "type": "number",
                        "description": "The flat rate price for this segmentation.",
                        "example": ""
                      },
                      {
                        "name": "meterTierPrices",
                        "kind": "optional",
                        "type": "map",
                        "description": "The tiered prices for meters without dimensions, ordered by meter api names.",
                        "example": "",
                        "customType": "map<string, object>",
                        "schema": []
                      },
                      {
                        "name": "meterDimensionTierPrices",
                        "kind": "optional",
                        "type": "array",
                        "description": "The tiered prices for meters with dimensions.",
                        "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.MeterUsageDimensionTieredPrice.out",
                        "customType": "com.amberflo.analysis.modeling.price_modeling.MeterUsageDimensionTieredPrice.out[]",
                        "schema": [
                          {
                            "name": "meterApiName",
                            "kind": "optional",
                            "type": "string",
                            "description": "The meter-api-name.",
                            "example": ""
                          },
                          {
                            "name": "groupInfo",
                            "kind": "optional",
                            "type": "object",
                            "description": "The dimension of the meter Api Name.",
                            "modelRef": "#/components/schemas/payment.meters.GroupInfo.out",
                            "customType": "payment.meters.GroupInfo.out",
                            "schema": [
                              {
                                "name": "gi",
                                "kind": "optional",
                                "type": "map",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "tierPrices",
                            "kind": "optional",
                            "type": "map",
                            "description": "The list of the usage buckets in the customer cluster segment.",
                            "example": "",
                            "customType": "map<string, number>",
                            "schema": []
                          }
                        ]
                      },
                      {
                        "name": "revenue",
                        "kind": "optional",
                        "type": "number",
                        "description": "The revenue from this segmentation.",
                        "example": ""
                      },
                      {
                        "name": "averageRevenuePerCustomer",
                        "kind": "optional",
                        "type": "number",
                        "description": "The average charge per customer in the segmentation.",
                        "example": ""
                      },
                      {
                        "name": "flatRateRevenue",
                        "kind": "optional",
                        "type": "number",
                        "description": "The revenue from flat rate.",
                        "example": ""
                      },
                      {
                        "name": "flatRateRevenueWeight",
                        "kind": "optional",
                        "type": "number",
                        "description": "The weight of the revenue from flat rate.",
                        "example": ""
                      },
                      {
                        "name": "itemUsageRevenue",
                        "kind": "optional",
                        "type": "number",
                        "description": "The revenue from item usage.",
                        "example": ""
                      },
                      {
                        "name": "itemUsageRevenueWeight",
                        "kind": "optional",
                        "type": "number",
                        "description": "The weight of the revenue from item usage.",
                        "example": ""
                      },
                      {
                        "name": "trends",
                        "kind": "optional",
                        "type": "array",
                        "description": "The list of trends for this segmentation.",
                        "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingSegmentTrend.out",
                        "customType": "com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingSegmentTrend.out[]",
                        "schema": [
                          {
                            "name": "startTimeInSeconds",
                            "kind": "optional",
                            "type": "integer<int64>",
                            "description": "The start time of the invoice.",
                            "example": 0
                          },
                          {
                            "name": "segment",
                            "kind": "optional",
                            "type": "object",
                            "description": "The customer segmentation.",
                            "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.AccountUsageClusterSegment.out",
                            "customType": "com.amberflo.analysis.segmentation.AccountUsageClusterSegment.out",
                            "schema": [
                              {
                                "name": "meterUsageClusterSegments",
                                "kind": "optional",
                                "type": "array",
                                "description": "A list of usage statics for each meter requested.",
                                "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.MeterUsageClusterSegment.out",
                                "customType": "com.amberflo.analysis.segmentation.MeterUsageClusterSegment.out[]",
                                "schema": [
                                  {
                                    "name": "meterApiName",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "The meter-api-name.",
                                    "example": ""
                                  },
                                  {
                                    "name": "groupInfo",
                                    "kind": "optional",
                                    "type": "object",
                                    "description": "The dimension of the meter Api Name.",
                                    "modelRef": "#/components/schemas/payment.meters.GroupInfo.out",
                                    "customType": "payment.meters.GroupInfo.out",
                                    "schema": [
                                      {
                                        "name": "",
                                        "description": "",
                                        "customType": "Max depth limit reached"
                                      }
                                    ]
                                  },
                                  {
                                    "name": "usageBucketList",
                                    "kind": "optional",
                                    "type": "array",
                                    "description": "The list of the usage buckets in the customer cluster segment.",
                                    "modelRef": "#/components/schemas/com.amberflo.analysis.segmentation.MeterUsageSegmentBucket.out",
                                    "customType": "com.amberflo.analysis.segmentation.MeterUsageSegmentBucket.out[]",
                                    "schema": [
                                      {
                                        "name": "",
                                        "description": "",
                                        "customType": "Max depth limit reached"
                                      }
                                    ]
                                  },
                                  {
                                    "name": "averageUsage",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "Avg usage over all customers.",
                                    "example": ""
                                  }
                                ]
                              },
                              {
                                "name": "customersInSegment",
                                "kind": "optional",
                                "type": "integer<int32>",
                                "description": "Number of customers in the segment.",
                                "example": 0
                              }
                            ]
                          },
                          {
                            "name": "revenue",
                            "kind": "optional",
                            "type": "number",
                            "description": "The predicated revenue for the invoice.",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "revenue",
                    "kind": "optional",
                    "type": "number",
                    "description": "The total revenue.",
                    "example": ""
                  },
                  {
                    "name": "averageRevenuePerCustomer",
                    "kind": "optional",
                    "type": "number",
                    "description": "The average charge per customer.",
                    "example": ""
                  },
                  {
                    "name": "flatRateRevenue",
                    "kind": "optional",
                    "type": "number",
                    "description": "The revenue from flat rate.",
                    "example": ""
                  },
                  {
                    "name": "flatRateRevenueWeight",
                    "kind": "optional",
                    "type": "number",
                    "description": "The weight of the revenue from flat rate.",
                    "example": ""
                  },
                  {
                    "name": "itemUsageRevenue",
                    "kind": "optional",
                    "type": "number",
                    "description": "The revenue from item usage.",
                    "example": ""
                  },
                  {
                    "name": "itemUsageRevenueWeight",
                    "kind": "optional",
                    "type": "number",
                    "description": "The weight of the revenue from item usage.",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/com.amberflo.analysis.modeling.price_modeling.PricingPlansModelingResponse.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "vdbyA11_yHICSkQ7IIJdF",
          "language": "curl",
          "label": "cURL",
          "code": "curl --location 'https://app.amberflo.io/pricing/modeling/price-modeling' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"segments\": [\n    {\n      \"meterUsageClusterSegments\": [\n        {\n          \"meterApiName\": \"\",\n          \"groupInfo\": {\n            \"gi\": \"\"\n          },\n          \"usageBucketList\": [\n            {\n              \"usage\": 0,\n              \"amountOfCustomers\": 0,\n              \"monthlyCustomerTrend\": 0\n            }\n          ],\n          \"averageUsage\": 0\n        }\n      ],\n      \"customersInSegment\": 0\n    }\n  ],\n  \"productItemConstraints\": \"\",\n  \"segmentConstraints\": [\n    {\n      \"flatRatePrice\": {\n        \"min\": 0,\n        \"max\": 0\n      },\n      \"revenue\": {\n        \"min\": 0,\n        \"max\": 0\n      }\n    }\n  ],\n  \"constraint\": {\n    \"amountOfTiers\": {\n      \"min\": 0,\n      \"max\": 0\n    },\n    \"itemUsageRevenueWeight\": {\n      \"min\": 0,\n      \"max\": 0\n    },\n    \"itemUsageRevenue\": {\n      \"min\": 0,\n      \"max\": 0\n    },\n    \"flatRateRevenueWeight\": {\n      \"min\": 0,\n      \"max\": 0\n    },\n    \"flatRateRevenue\": {\n      \"min\": 0,\n      \"max\": 0\n    },\n    \"revenue\": {\n      \"min\": 0,\n      \"max\": 0\n    }\n  },\n  \"trendTimeRange\": {\n    \"startTimeInSeconds\": 0,\n    \"endTimeInSeconds\": 0\n  }\n}'"
        },
        {
          "id": "9CUN_vWAe49zk1ll2n6Sg",
          "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   \"segments\": [\n      {\n         \"meterUsageClusterSegments\": [\n            {\n               \"meterApiName\": \"\",\n               \"groupInfo\": {\n                  \"gi\": \"\"\n               },\n               \"usageBucketList\": [\n                  {\n                     \"usage\": 0,\n                     \"amountOfCustomers\": 0,\n                     \"monthlyCustomerTrend\": 0\n                  }\n               ],\n               \"averageUsage\": 0\n            }\n         ],\n         \"customersInSegment\": 0\n      }\n   ],\n   \"productItemConstraints\": \"\",\n   \"segmentConstraints\": [\n      {\n         \"flatRatePrice\": {\n            \"min\": 0,\n            \"max\": 0\n         },\n         \"revenue\": {\n            \"min\": 0,\n            \"max\": 0\n         }\n      }\n   ],\n   \"constraint\": {\n      \"amountOfTiers\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"itemUsageRevenueWeight\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"itemUsageRevenue\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"flatRateRevenueWeight\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"flatRateRevenue\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"revenue\": {\n         \"min\": 0,\n         \"max\": 0\n      }\n   },\n   \"trendTimeRange\": {\n      \"startTimeInSeconds\": 0,\n      \"endTimeInSeconds\": 0\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/pricing/modeling/price-modeling\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "YJ0Dn5OAEe-jFSY9AEmZa",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/pricing/modeling/price-modeling\")\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   \"segments\": [\n      {\n         \"meterUsageClusterSegments\": [\n            {\n               \"meterApiName\": \"\",\n               \"groupInfo\": {\n                  \"gi\": \"\"\n               },\n               \"usageBucketList\": [\n                  {\n                     \"usage\": 0,\n                     \"amountOfCustomers\": 0,\n                     \"monthlyCustomerTrend\": 0\n                  }\n               ],\n               \"averageUsage\": 0\n            }\n         ],\n         \"customersInSegment\": 0\n      }\n   ],\n   \"productItemConstraints\": \"\",\n   \"segmentConstraints\": [\n      {\n         \"flatRatePrice\": {\n            \"min\": 0,\n            \"max\": 0\n         },\n         \"revenue\": {\n            \"min\": 0,\n            \"max\": 0\n         }\n      }\n   ],\n   \"constraint\": {\n      \"amountOfTiers\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"itemUsageRevenueWeight\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"itemUsageRevenue\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"flatRateRevenueWeight\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"flatRateRevenue\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"revenue\": {\n         \"min\": 0,\n         \"max\": 0\n      }\n   },\n   \"trendTimeRange\": {\n      \"startTimeInSeconds\": 0,\n      \"endTimeInSeconds\": 0\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "_2dSJYRQ5H9W8UJSmBRl7",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/pricing/modeling/price-modeling\"\n\npayload = json.dumps({\n   \"segments\": [\n      {\n         \"meterUsageClusterSegments\": [\n            {\n               \"meterApiName\": \"\",\n               \"groupInfo\": {\n                  \"gi\": \"\"\n               },\n               \"usageBucketList\": [\n                  {\n                     \"usage\": 0,\n                     \"amountOfCustomers\": 0,\n                     \"monthlyCustomerTrend\": 0\n                  }\n               ],\n               \"averageUsage\": 0\n            }\n         ],\n         \"customersInSegment\": 0\n      }\n   ],\n   \"productItemConstraints\": \"\",\n   \"segmentConstraints\": [\n      {\n         \"flatRatePrice\": {\n            \"min\": 0,\n            \"max\": 0\n         },\n         \"revenue\": {\n            \"min\": 0,\n            \"max\": 0\n         }\n      }\n   ],\n   \"constraint\": {\n      \"amountOfTiers\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"itemUsageRevenueWeight\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"itemUsageRevenue\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"flatRateRevenueWeight\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"flatRateRevenue\": {\n         \"min\": 0,\n         \"max\": 0\n      },\n      \"revenue\": {\n         \"min\": 0,\n         \"max\": 0\n      }\n   },\n   \"trendTimeRange\": {\n      \"startTimeInSeconds\": 0,\n      \"endTimeInSeconds\": 0\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": "vdbyA11_yHICSkQ7IIJdF"
    },
    "results": {
      "languages": [
        {
          "id": "zXLcp-nzjHjRP2aIv5Vth",
          "language": "200",
          "code": "// Successful request\n{\n  \"recommendations\": [\n    {\n      \"segmentPricingPlans\": [\n        {\n          \"segment\": {\n            \"meterUsageClusterSegments\": [\n              {\n                \"meterApiName\": \"\",\n                \"groupInfo\": {\n                  \"gi\": \"\"\n                },\n                \"usageBucketList\": [\n                  {\n                    \"usage\": 0,\n                    \"amountOfCustomers\": 0,\n                    \"monthlyCustomerTrend\": 0\n                  }\n                ],\n                \"averageUsage\": 0\n              }\n            ],\n            \"customersInSegment\": \"\"\n          },\n          \"flatRatePrice\": 0,\n          \"meterTierPrices\": \"\",\n          \"meterDimensionTierPrices\": [\n            {\n              \"meterApiName\": \"\",\n              \"groupInfo\": {\n                \"gi\": \"\"\n              },\n              \"tierPrices\": \"\"\n            }\n          ],\n          \"revenue\": 0,\n          \"averageRevenuePerCustomer\": 0,\n          \"flatRateRevenue\": 0,\n          \"flatRateRevenueWeight\": 0,\n          \"itemUsageRevenue\": 0,\n          \"itemUsageRevenueWeight\": 0,\n          \"trends\": [\n            {\n              \"startTimeInSeconds\": \"\",\n              \"segment\": {\n                \"meterUsageClusterSegments\": [\n                  {\n                    \"meterApiName\": \"\",\n                    \"groupInfo\": {\n                      \"\": \"\"\n                    },\n                    \"usageBucketList\": [\n                      {\n                        \"\": \"\"\n                      }\n                    ],\n                    \"averageUsage\": 0\n                  }\n                ],\n                \"customersInSegment\": \"\"\n              },\n              \"revenue\": 0\n            }\n          ]\n        }\n      ],\n      \"revenue\": 0,\n      \"averageRevenuePerCustomer\": 0,\n      \"flatRateRevenue\": 0,\n      \"flatRateRevenueWeight\": 0,\n      \"itemUsageRevenue\": 0,\n      \"itemUsageRevenueWeight\": 0\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "zXLcp-nzjHjRP2aIv5Vth"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}