---
title: /payments/analysis/revenue-calculator-template
slug: amberflo-api/HXhw-paymentsanalysisrevenue-calculator-template
docTags: 
createdAt: 2024-11-07T15:10:16.977Z
---

{
  "id": "yMRlZlRhaumCE_eXfrtvE",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/analysis/revenue-calculator-template",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/analysis/revenue-calculator-template"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "payment.analysis.modeling.PriceAnalysisModel.in",
          "schema": [],
          "modelRef": "#/components/schemas/payment.analysis.modeling.PriceAnalysisModel.in",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "key",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.PriceAnalysisModelKey.in",
                  "customType": "payment.analysis.modeling.PriceAnalysisModelKey.in",
                  "schema": [
                    {
                      "name": "accountId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "example": "",
                  "default": "by-rule"
                },
                {
                  "name": "name",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "timeRange",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "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
                    }
                  ]
                },
                {
                  "name": "analysisProductPlans",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.AnalysisProductPlan.in",
                  "customType": "payment.analysis.modeling.AnalysisProductPlan.in[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "referencePlan",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "planBillingPeriod",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.pricing.BillingPeriod.in",
                      "customType": "payment.pricing.BillingPeriod.in",
                      "schema": [
                        {
                          "name": "interval",
                          "kind": "optional",
                          "type": "string",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.BillingPeriodInterval.in",
                          "customType": "payment.pricing.BillingPeriodInterval.in",
                          "schema": []
                        },
                        {
                          "name": "intervalsCount",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "itemToPriceIdsOverrides",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, string>",
                      "schema": []
                    },
                    {
                      "name": "meterNameToPriceOverrides",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, payment.pricing.price.PriceStateMachineNode.in>",
                      "schema": []
                    }
                  ]
                },
                {
                  "name": "timeGroupingInterval",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationInterval.in",
                  "customType": "com.amberflo.service.common.aggregation.AggregationInterval.in",
                  "schema": []
                },
                {
                  "name": "updateTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "customersBaseQuery",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.CustomersSampleSpaceKey.in",
                  "customType": "payment.analysis.modeling.by_rule.CustomersSampleSpaceKey.in",
                  "schema": [
                    {
                      "name": "filters",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, string[]>",
                      "schema": []
                    },
                    {
                      "name": "take",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.common.Take.in",
                      "customType": "payment.common.Take.in",
                      "schema": [
                        {
                          "name": "limit",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "example": 0
                        },
                        {
                          "name": "isAscending",
                          "kind": "optional",
                          "type": "boolean",
                          "example": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "customerSource",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.CustomersSourceType.in",
                  "customType": "payment.analysis.modeling.by_rule.CustomersSourceType.in",
                  "schema": []
                },
                {
                  "name": "usageSource",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.UsageSourceType.in",
                  "customType": "payment.analysis.modeling.by_rule.UsageSourceType.in",
                  "schema": []
                }
              ],
              "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.ByRulePriceAnalysisModel.in",
              "customType": "payment.analysis.modeling.by_rule.ByRulePriceAnalysisModel.in"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "key",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.PriceAnalysisModelKey.in",
                  "customType": "payment.analysis.modeling.PriceAnalysisModelKey.in",
                  "schema": [
                    {
                      "name": "accountId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "example": "",
                  "default": "raw"
                },
                {
                  "name": "name",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "timeRange",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "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
                    }
                  ]
                },
                {
                  "name": "analysisProductPlans",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.AnalysisProductPlan.in",
                  "customType": "payment.analysis.modeling.AnalysisProductPlan.in[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "referencePlan",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "planBillingPeriod",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.pricing.BillingPeriod.in",
                      "customType": "payment.pricing.BillingPeriod.in",
                      "schema": [
                        {
                          "name": "interval",
                          "kind": "optional",
                          "type": "string",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.pricing.BillingPeriodInterval.in",
                          "customType": "payment.pricing.BillingPeriodInterval.in",
                          "schema": []
                        },
                        {
                          "name": "intervalsCount",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "itemToPriceIdsOverrides",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, string>",
                      "schema": []
                    },
                    {
                      "name": "meterNameToPriceOverrides",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, payment.pricing.price.PriceStateMachineNode.in>",
                      "schema": []
                    }
                  ]
                },
                {
                  "name": "timeGroupingInterval",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationInterval.in",
                  "customType": "com.amberflo.service.common.aggregation.AggregationInterval.in",
                  "schema": []
                },
                {
                  "name": "updateTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "customerGroupsUsageStats",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.analysis.modeling.raw.RawCustomerGroupUsageStats.in",
                  "customType": "payment.analysis.modeling.raw.RawCustomerGroupUsageStats.in[]",
                  "schema": [
                    {
                      "name": "customerGroupId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "customersInGroup",
                      "kind": "optional",
                      "type": "integer<int32>",
                      "example": 0
                    },
                    {
                      "name": "meterToCustomerUsageStatsMap",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, payment.analysis.modeling.raw.RawMeterUsageStats.in>",
                      "schema": []
                    }
                  ]
                }
              ],
              "modelRef": "#/components/schemas/payment.analysis.modeling.raw.RawPriceAnalysisModel.in",
              "customType": "payment.analysis.modeling.raw.RawPriceAnalysisModel.in"
            }
          ],
          "complexType": "oneOf",
          "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": "payment.analysis.modeling.PriceAnalysisModel.out",
            "schema": [],
            "modelRef": "#/components/schemas/payment.analysis.modeling.PriceAnalysisModel.out",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "key",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.PriceAnalysisModelKey.out",
                    "customType": "payment.analysis.modeling.PriceAnalysisModelKey.out",
                    "schema": [
                      {
                        "name": "accountId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "by-rule"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "timeRange",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.common.TimeRange.out",
                    "customType": "payment.common.TimeRange.out",
                    "schema": [
                      {
                        "name": "startTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "endTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "analysisProductPlans",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.AnalysisProductPlan.out",
                    "customType": "payment.analysis.modeling.AnalysisProductPlan.out[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "referencePlan",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "planBillingPeriod",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/payment.pricing.BillingPeriod.out",
                        "customType": "payment.pricing.BillingPeriod.out",
                        "schema": [
                          {
                            "name": "interval",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.BillingPeriodInterval.out",
                            "customType": "payment.pricing.BillingPeriodInterval.out",
                            "schema": []
                          },
                          {
                            "name": "intervalsCount",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "itemToPriceIdsOverrides",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, string>",
                        "schema": []
                      },
                      {
                        "name": "meterNameToPriceOverrides",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, payment.pricing.price.PriceStateMachineNode.out>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "timeGroupingInterval",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationInterval.out",
                    "customType": "com.amberflo.service.common.aggregation.AggregationInterval.out",
                    "schema": []
                  },
                  {
                    "name": "updateTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "customersBaseQuery",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.CustomersSampleSpaceKey.out",
                    "customType": "payment.analysis.modeling.by_rule.CustomersSampleSpaceKey.out",
                    "schema": [
                      {
                        "name": "filters",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, string[]>",
                        "schema": []
                      },
                      {
                        "name": "take",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/payment.common.Take.out",
                        "customType": "payment.common.Take.out",
                        "schema": [
                          {
                            "name": "limit",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "example": 0
                          },
                          {
                            "name": "isAscending",
                            "kind": "optional",
                            "type": "boolean",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "customerSource",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.CustomersSourceType.out",
                    "customType": "payment.analysis.modeling.by_rule.CustomersSourceType.out",
                    "schema": []
                  },
                  {
                    "name": "usageSource",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.UsageSourceType.out",
                    "customType": "payment.analysis.modeling.by_rule.UsageSourceType.out",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/payment.analysis.modeling.by_rule.ByRulePriceAnalysisModel.out",
                "customType": "payment.analysis.modeling.by_rule.ByRulePriceAnalysisModel.out"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "key",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.PriceAnalysisModelKey.out",
                    "customType": "payment.analysis.modeling.PriceAnalysisModelKey.out",
                    "schema": [
                      {
                        "name": "accountId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "raw"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "timeRange",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.common.TimeRange.out",
                    "customType": "payment.common.TimeRange.out",
                    "schema": [
                      {
                        "name": "startTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "endTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "analysisProductPlans",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.AnalysisProductPlan.out",
                    "customType": "payment.analysis.modeling.AnalysisProductPlan.out[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "referencePlan",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "planBillingPeriod",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/payment.pricing.BillingPeriod.out",
                        "customType": "payment.pricing.BillingPeriod.out",
                        "schema": [
                          {
                            "name": "interval",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.BillingPeriodInterval.out",
                            "customType": "payment.pricing.BillingPeriodInterval.out",
                            "schema": []
                          },
                          {
                            "name": "intervalsCount",
                            "kind": "optional",
                            "type": "integer<int32>",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "itemToPriceIdsOverrides",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, string>",
                        "schema": []
                      },
                      {
                        "name": "meterNameToPriceOverrides",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, payment.pricing.price.PriceStateMachineNode.out>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "timeGroupingInterval",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationInterval.out",
                    "customType": "com.amberflo.service.common.aggregation.AggregationInterval.out",
                    "schema": []
                  },
                  {
                    "name": "updateTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "customerGroupsUsageStats",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.analysis.modeling.raw.RawCustomerGroupUsageStats.out",
                    "customType": "payment.analysis.modeling.raw.RawCustomerGroupUsageStats.out[]",
                    "schema": [
                      {
                        "name": "customerGroupId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "customersInGroup",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "example": 0
                      },
                      {
                        "name": "meterToCustomerUsageStatsMap",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, payment.analysis.modeling.raw.RawMeterUsageStats.out>",
                        "schema": []
                      }
                    ]
                  }
                ],
                "modelRef": "#/components/schemas/payment.analysis.modeling.raw.RawPriceAnalysisModel.out",
                "customType": "payment.analysis.modeling.raw.RawPriceAnalysisModel.out"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "BcgFGmQtHs61QNNTMXKK6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/analysis/revenue-calculator-template \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"type\": \"by-rule\"\n     }'"
        },
        {
          "id": "AwSRuRnb4HBx3YCTl1UPg",
          "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   \"type\": \"by-rule\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/analysis/revenue-calculator-template\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Umm4bv4FpWuCjZ6DH8kSC",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/analysis/revenue-calculator-template\")\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   \"type\": \"by-rule\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "mwUTaRFBz497ZeJjgw_o8",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/analysis/revenue-calculator-template\"\n\npayload = json.dumps({\n   \"type\": \"by-rule\"\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": "BcgFGmQtHs61QNNTMXKK6"
    },
    "results": {
      "languages": [
        {
          "id": "_4dgie2lJU4RuuryHWBLc",
          "language": "200",
          "code": "// Successful request\n{}"
        }
      ],
      "selectedLanguageId": "_4dgie2lJU4RuuryHWBLc"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}