---
title: Create or update a cost item price using a cost item price template
slug: amberflo-api/1QDW-create-or-update-a-cost-item-price-using-a-cost-item-price-template
docTags: 
createdAt: 2024-11-07T15:10:16.974Z
---

{
  "id": "zrl9OQ7XhimctZc4pZkIL",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template"
      }
    ],
    "name": "Create or update a cost item price using a cost item price template",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "payment.pricing.cost.CostItemPriceGenerator.in",
          "schema": [],
          "modelRef": "#/components/schemas/payment.pricing.cost.CostItemPriceGenerator.in",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "distinctDimensions",
                  "kind": "required",
                  "type": "array",
                  "description": "Dimensions to evaluate uniqueness.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "id",
                  "kind": "required",
                  "type": "string",
                  "description": "Id associated with the price.",
                  "example": ""
                },
                {
                  "name": "leafNodeType",
                  "kind": "required",
                  "type": "string",
                  "description": "Leaf node the price is using.",
                  "example": ""
                },
                {
                  "name": "priceTiers",
                  "kind": "required",
                  "type": "array",
                  "description": "Price for each tier.",
                  "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.in",
                  "customType": "payment.pricing.price.PriceTier.in[]",
                  "schema": [
                    {
                      "name": "startAfterUnit",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "batchSize",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "pricePerBatch",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "meterApiName",
                  "kind": "required",
                  "type": "string",
                  "description": "Meter Api name associated with the price.",
                  "example": ""
                },
                {
                  "name": "usageGranularity",
                  "kind": "required",
                  "type": "string",
                  "description": "Time-span to evaluate.",
                  "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.in",
                  "customType": "payment.pricing.price.UsageGranularity.in",
                  "schema": []
                },
                {
                  "name": "groupDimensions",
                  "kind": "optional",
                  "type": "array",
                  "description": "Dimensions to group the invoice by.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "costItemPriceName",
                  "kind": "optional",
                  "type": "string",
                  "description": "Name of the price machine. Useful for displaying to users.",
                  "example": ""
                },
                {
                  "name": "scalar",
                  "kind": "optional",
                  "type": "number",
                  "description": "Optional scalar for scaling usage",
                  "example": ""
                },
                {
                  "name": "startDateInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "The date when the cost item takes effective.",
                  "example": 0
                },
                {
                  "name": "expirationDateInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "The date when the cost item expires.",
                  "example": 0
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "description": "Type of template, automatically populated.",
                  "example": "",
                  "default": "cost_item_tiered_seat_based"
                }
              ],
              "modelRef": "#/components/schemas/payment.pricing.cost.TieredSeatBasedCostItemPriceGenerator.in",
              "customType": "payment.pricing.cost.TieredSeatBasedCostItemPriceGenerator.in"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "dimensionKeys",
                  "kind": "required",
                  "type": "array",
                  "description": "Keys associated with dimension values.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "distinctDimensions",
                  "kind": "required",
                  "type": "array",
                  "description": "Dimensions to evaluate uniqueness.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "id",
                  "kind": "required",
                  "type": "string",
                  "description": "Id associated with the price.",
                  "example": ""
                },
                {
                  "name": "priceTiers",
                  "kind": "required",
                  "type": "array",
                  "description": "Price for each tier.",
                  "modelRef": "#/components/schemas/payment.pricing.price.generators.TieredPriceGroupInfo.in",
                  "customType": "payment.pricing.price.generators.TieredPriceGroupInfo.in[]",
                  "schema": [
                    {
                      "name": "dimensionValues",
                      "kind": "optional",
                      "type": "array",
                      "example": "",
                      "itemType": "string",
                      "customType": "string[]",
                      "itemExample": "",
                      "itemDefault": ""
                    },
                    {
                      "name": "priceTiers",
                      "kind": "optional",
                      "type": "array",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.in",
                      "customType": "payment.pricing.price.PriceTier.in[]",
                      "schema": [
                        {
                          "name": "startAfterUnit",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        },
                        {
                          "name": "batchSize",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        },
                        {
                          "name": "pricePerBatch",
                          "kind": "optional",
                          "type": "number",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "leafNodeType",
                      "kind": "required",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "meterApiName",
                  "kind": "required",
                  "type": "string",
                  "description": "Meter Api name associated with the price.",
                  "example": ""
                },
                {
                  "name": "usageGranularity",
                  "kind": "required",
                  "type": "string",
                  "description": "Time-span to evaluate.",
                  "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.in",
                  "customType": "payment.pricing.price.UsageGranularity.in",
                  "schema": []
                },
                {
                  "name": "groupDimensions",
                  "kind": "optional",
                  "type": "array",
                  "description": "Dimensions to group the invoice by.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "costItemPriceName",
                  "kind": "optional",
                  "type": "string",
                  "description": "Name of the price machine. Useful for displaying to users.",
                  "example": ""
                },
                {
                  "name": "scalar",
                  "kind": "optional",
                  "type": "number",
                  "description": "Optional scalar for scaling usage",
                  "example": ""
                },
                {
                  "name": "startDateInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "The date when the cost item takes effective.",
                  "example": 0
                },
                {
                  "name": "expirationDateInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "The date when the cost item expires.",
                  "example": 0
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "description": "Type of template, automatically populated.",
                  "example": "",
                  "default": "cost_item_tiered_seat_based_dimension"
                }
              ],
              "modelRef": "#/components/schemas/payment.pricing.cost.TieredSeatBasedDimensionCostItemPriceGenerator.in",
              "customType": "payment.pricing.cost.TieredSeatBasedDimensionCostItemPriceGenerator.in"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "dimensionKeys",
                  "kind": "required",
                  "type": "array",
                  "description": "Keys associated with dimension values.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "id",
                  "kind": "required",
                  "type": "string",
                  "description": "Id associated with the price.",
                  "example": ""
                },
                {
                  "name": "priceTiers",
                  "kind": "required",
                  "type": "array",
                  "description": "Price for each tier.",
                  "modelRef": "#/components/schemas/payment.pricing.price.generators.TieredPriceGroupInfo.in",
                  "customType": "payment.pricing.price.generators.TieredPriceGroupInfo.in[]",
                  "schema": [
                    {
                      "name": "dimensionValues",
                      "kind": "optional",
                      "type": "array",
                      "example": "",
                      "itemType": "string",
                      "customType": "string[]",
                      "itemExample": "",
                      "itemDefault": ""
                    },
                    {
                      "name": "priceTiers",
                      "kind": "optional",
                      "type": "array",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.in",
                      "customType": "payment.pricing.price.PriceTier.in[]",
                      "schema": [
                        {
                          "name": "startAfterUnit",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        },
                        {
                          "name": "batchSize",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        },
                        {
                          "name": "pricePerBatch",
                          "kind": "optional",
                          "type": "number",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "leafNodeType",
                      "kind": "required",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "meterApiName",
                  "kind": "required",
                  "type": "string",
                  "description": "Meter API name id associated with the price.",
                  "example": ""
                },
                {
                  "name": "groupDimensions",
                  "kind": "optional",
                  "type": "array",
                  "description": "Dimensions to group the invoice by.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "costItemPriceName",
                  "kind": "optional",
                  "type": "string",
                  "description": "Name of the price machine. Useful for displaying to users.",
                  "example": ""
                },
                {
                  "name": "scalar",
                  "kind": "optional",
                  "type": "number",
                  "description": "Optional scalar for scaling usage",
                  "example": ""
                },
                {
                  "name": "startDateInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "The date when the cost item takes effective.",
                  "example": 0
                },
                {
                  "name": "expirationDateInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "The date when the cost item expires.",
                  "example": 0
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "description": "Type of template, automatically populated.",
                  "example": "",
                  "default": "cost_item_usage_based_dimension"
                },
                {
                  "name": "useAverageReducer",
                  "kind": "optional",
                  "type": "string",
                  "description": "Usage granularity if using average.",
                  "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.in",
                  "customType": "payment.pricing.price.UsageGranularity.in",
                  "schema": []
                }
              ],
              "modelRef": "#/components/schemas/payment.pricing.cost.UsageBasedDimensionCostItemPriceGenerator.in",
              "customType": "payment.pricing.cost.UsageBasedDimensionCostItemPriceGenerator.in"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "id",
                  "kind": "required",
                  "type": "string",
                  "description": "Id associated with the price.",
                  "example": ""
                },
                {
                  "name": "leafNodeType",
                  "kind": "required",
                  "type": "string",
                  "description": "Leaf node the price is using.",
                  "example": ""
                },
                {
                  "name": "priceTiers",
                  "kind": "required",
                  "type": "array",
                  "description": "Price for each tier.",
                  "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.in",
                  "customType": "payment.pricing.price.PriceTier.in[]",
                  "schema": [
                    {
                      "name": "startAfterUnit",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "batchSize",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "pricePerBatch",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "meterApiName",
                  "kind": "required",
                  "type": "string",
                  "description": "Meter API name associated with the price.",
                  "example": ""
                },
                {
                  "name": "groupDimensions",
                  "kind": "optional",
                  "type": "array",
                  "description": "Dimensions to group the invoice by.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "costItemPriceName",
                  "kind": "optional",
                  "type": "string",
                  "description": "Name of the price machine. Useful for displaying to users.",
                  "example": ""
                },
                {
                  "name": "scalar",
                  "kind": "optional",
                  "type": "number",
                  "description": "Optional scalar for scaling usage",
                  "example": ""
                },
                {
                  "name": "startDateInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "The date when the cost item takes effective.",
                  "example": 0
                },
                {
                  "name": "expirationDateInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "The date when the cost item expires.",
                  "example": 0
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "description": "Type of template, automatically populated.",
                  "example": "",
                  "default": "cost_item_usage_based_no_dimension"
                },
                {
                  "name": "useAverageReducer",
                  "kind": "optional",
                  "type": "string",
                  "description": "Usage granularity if using average.",
                  "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.in",
                  "customType": "payment.pricing.price.UsageGranularity.in",
                  "schema": []
                }
              ],
              "modelRef": "#/components/schemas/payment.pricing.cost.UsageBasedNoDimensionCostItemPriceGenerator.in",
              "customType": "payment.pricing.cost.UsageBasedNoDimensionCostItemPriceGenerator.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.pricing.cost.CostItemPriceGenerator.out",
            "schema": [],
            "modelRef": "#/components/schemas/payment.pricing.cost.CostItemPriceGenerator.out",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "distinctDimensions",
                    "kind": "required",
                    "type": "array",
                    "description": "Dimensions to evaluate uniqueness.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Id associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "leafNodeType",
                    "kind": "required",
                    "type": "string",
                    "description": "Leaf node the price is using.",
                    "example": ""
                  },
                  {
                    "name": "priceTiers",
                    "kind": "required",
                    "type": "array",
                    "description": "Price for each tier.",
                    "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.out",
                    "customType": "payment.pricing.price.PriceTier.out[]",
                    "schema": [
                      {
                        "name": "startAfterUnit",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "batchSize",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "pricePerBatch",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "meterApiName",
                    "kind": "required",
                    "type": "string",
                    "description": "Meter Api name associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "usageGranularity",
                    "kind": "required",
                    "type": "string",
                    "description": "Time-span to evaluate.",
                    "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.out",
                    "customType": "payment.pricing.price.UsageGranularity.out",
                    "schema": []
                  },
                  {
                    "name": "groupDimensions",
                    "kind": "optional",
                    "type": "array",
                    "description": "Dimensions to group the invoice by.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "costItemPriceName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of the price machine. Useful for displaying to users.",
                    "example": ""
                  },
                  {
                    "name": "scalar",
                    "kind": "optional",
                    "type": "number",
                    "description": "Optional scalar for scaling usage",
                    "example": ""
                  },
                  {
                    "name": "startDateInSeconds",
                    "kind": "required",
                    "type": "integer<int64>",
                    "description": "The date when the cost item takes effective.",
                    "example": 0
                  },
                  {
                    "name": "expirationDateInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "The date when the cost item expires.",
                    "example": 0
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of template, automatically populated.",
                    "example": "",
                    "default": "cost_item_tiered_seat_based"
                  }
                ],
                "modelRef": "#/components/schemas/payment.pricing.cost.TieredSeatBasedCostItemPriceGenerator.out",
                "customType": "payment.pricing.cost.TieredSeatBasedCostItemPriceGenerator.out"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "dimensionKeys",
                    "kind": "required",
                    "type": "array",
                    "description": "Keys associated with dimension values.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "distinctDimensions",
                    "kind": "required",
                    "type": "array",
                    "description": "Dimensions to evaluate uniqueness.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Id associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "priceTiers",
                    "kind": "required",
                    "type": "array",
                    "description": "Price for each tier.",
                    "modelRef": "#/components/schemas/payment.pricing.price.generators.TieredPriceGroupInfo.out",
                    "customType": "payment.pricing.price.generators.TieredPriceGroupInfo.out[]",
                    "schema": [
                      {
                        "name": "dimensionValues",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "priceTiers",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.out",
                        "customType": "payment.pricing.price.PriceTier.out[]",
                        "schema": [
                          {
                            "name": "startAfterUnit",
                            "kind": "optional",
                            "type": "integer<int64>",
                            "example": 0
                          },
                          {
                            "name": "batchSize",
                            "kind": "optional",
                            "type": "integer<int64>",
                            "example": 0
                          },
                          {
                            "name": "pricePerBatch",
                            "kind": "optional",
                            "type": "number",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "leafNodeType",
                        "kind": "required",
                        "type": "string",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "meterApiName",
                    "kind": "required",
                    "type": "string",
                    "description": "Meter Api name associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "usageGranularity",
                    "kind": "required",
                    "type": "string",
                    "description": "Time-span to evaluate.",
                    "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.out",
                    "customType": "payment.pricing.price.UsageGranularity.out",
                    "schema": []
                  },
                  {
                    "name": "groupDimensions",
                    "kind": "optional",
                    "type": "array",
                    "description": "Dimensions to group the invoice by.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "costItemPriceName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of the price machine. Useful for displaying to users.",
                    "example": ""
                  },
                  {
                    "name": "scalar",
                    "kind": "optional",
                    "type": "number",
                    "description": "Optional scalar for scaling usage",
                    "example": ""
                  },
                  {
                    "name": "startDateInSeconds",
                    "kind": "required",
                    "type": "integer<int64>",
                    "description": "The date when the cost item takes effective.",
                    "example": 0
                  },
                  {
                    "name": "expirationDateInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "The date when the cost item expires.",
                    "example": 0
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of template, automatically populated.",
                    "example": "",
                    "default": "cost_item_tiered_seat_based_dimension"
                  }
                ],
                "modelRef": "#/components/schemas/payment.pricing.cost.TieredSeatBasedDimensionCostItemPriceGenerator.out",
                "customType": "payment.pricing.cost.TieredSeatBasedDimensionCostItemPriceGenerator.out"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "dimensionKeys",
                    "kind": "required",
                    "type": "array",
                    "description": "Keys associated with dimension values.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Id associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "priceTiers",
                    "kind": "required",
                    "type": "array",
                    "description": "Price for each tier.",
                    "modelRef": "#/components/schemas/payment.pricing.price.generators.TieredPriceGroupInfo.out",
                    "customType": "payment.pricing.price.generators.TieredPriceGroupInfo.out[]",
                    "schema": [
                      {
                        "name": "dimensionValues",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "priceTiers",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.out",
                        "customType": "payment.pricing.price.PriceTier.out[]",
                        "schema": [
                          {
                            "name": "startAfterUnit",
                            "kind": "optional",
                            "type": "integer<int64>",
                            "example": 0
                          },
                          {
                            "name": "batchSize",
                            "kind": "optional",
                            "type": "integer<int64>",
                            "example": 0
                          },
                          {
                            "name": "pricePerBatch",
                            "kind": "optional",
                            "type": "number",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "leafNodeType",
                        "kind": "required",
                        "type": "string",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "meterApiName",
                    "kind": "required",
                    "type": "string",
                    "description": "Meter API name id associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "groupDimensions",
                    "kind": "optional",
                    "type": "array",
                    "description": "Dimensions to group the invoice by.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "costItemPriceName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of the price machine. Useful for displaying to users.",
                    "example": ""
                  },
                  {
                    "name": "scalar",
                    "kind": "optional",
                    "type": "number",
                    "description": "Optional scalar for scaling usage",
                    "example": ""
                  },
                  {
                    "name": "startDateInSeconds",
                    "kind": "required",
                    "type": "integer<int64>",
                    "description": "The date when the cost item takes effective.",
                    "example": 0
                  },
                  {
                    "name": "expirationDateInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "The date when the cost item expires.",
                    "example": 0
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of template, automatically populated.",
                    "example": "",
                    "default": "cost_item_usage_based_dimension"
                  },
                  {
                    "name": "useAverageReducer",
                    "kind": "optional",
                    "type": "string",
                    "description": "Usage granularity if using average.",
                    "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.out",
                    "customType": "payment.pricing.price.UsageGranularity.out",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/payment.pricing.cost.UsageBasedDimensionCostItemPriceGenerator.out",
                "customType": "payment.pricing.cost.UsageBasedDimensionCostItemPriceGenerator.out"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Id associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "leafNodeType",
                    "kind": "required",
                    "type": "string",
                    "description": "Leaf node the price is using.",
                    "example": ""
                  },
                  {
                    "name": "priceTiers",
                    "kind": "required",
                    "type": "array",
                    "description": "Price for each tier.",
                    "modelRef": "#/components/schemas/payment.pricing.price.PriceTier.out",
                    "customType": "payment.pricing.price.PriceTier.out[]",
                    "schema": [
                      {
                        "name": "startAfterUnit",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "batchSize",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "pricePerBatch",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "meterApiName",
                    "kind": "required",
                    "type": "string",
                    "description": "Meter API name associated with the price.",
                    "example": ""
                  },
                  {
                    "name": "groupDimensions",
                    "kind": "optional",
                    "type": "array",
                    "description": "Dimensions to group the invoice by.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "costItemPriceName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of the price machine. Useful for displaying to users.",
                    "example": ""
                  },
                  {
                    "name": "scalar",
                    "kind": "optional",
                    "type": "number",
                    "description": "Optional scalar for scaling usage",
                    "example": ""
                  },
                  {
                    "name": "startDateInSeconds",
                    "kind": "required",
                    "type": "integer<int64>",
                    "description": "The date when the cost item takes effective.",
                    "example": 0
                  },
                  {
                    "name": "expirationDateInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "The date when the cost item expires.",
                    "example": 0
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of template, automatically populated.",
                    "example": "",
                    "default": "cost_item_usage_based_no_dimension"
                  },
                  {
                    "name": "useAverageReducer",
                    "kind": "optional",
                    "type": "string",
                    "description": "Usage granularity if using average.",
                    "modelRef": "#/components/schemas/payment.pricing.price.UsageGranularity.out",
                    "customType": "payment.pricing.price.UsageGranularity.out",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/payment.pricing.cost.UsageBasedNoDimensionCostItemPriceGenerator.out",
                "customType": "payment.pricing.cost.UsageBasedNoDimensionCostItemPriceGenerator.out"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "L63371kmxEcNju0qtaepy",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"distinctDimensions\": [],\n     \"id\": \"\",\n     \"leafNodeType\": \"\",\n     \"priceTiers\": [\n     {}\n     ],\n     \"meterApiName\": \"\",\n     \"usageGranularity\": \"\",\n     \"startDateInSeconds\": 0,\n     \"type\": \"cost_item_tiered_seat_based\"\n     }'"
        },
        {
          "id": "nKVTfYVq-9hzuinjQmKI5",
          "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   \"distinctDimensions\": [],\n   \"id\": \"\",\n   \"leafNodeType\": \"\",\n   \"priceTiers\": [\n      {}\n   ],\n   \"meterApiName\": \"\",\n   \"usageGranularity\": \"\",\n   \"startDateInSeconds\": 0,\n   \"type\": \"cost_item_tiered_seat_based\"\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/cost-item-price/template\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ciqBgxi4QdWcaxWlZON4w",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/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   \"distinctDimensions\": [],\n   \"id\": \"\",\n   \"leafNodeType\": \"\",\n   \"priceTiers\": [\n      {}\n   ],\n   \"meterApiName\": \"\",\n   \"usageGranularity\": \"\",\n   \"startDateInSeconds\": 0,\n   \"type\": \"cost_item_tiered_seat_based\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "29m2uqNvamhEAXxtcD3gv",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template\"\n\npayload = json.dumps({\n   \"distinctDimensions\": [],\n   \"id\": \"\",\n   \"leafNodeType\": \"\",\n   \"priceTiers\": [\n      {}\n   ],\n   \"meterApiName\": \"\",\n   \"usageGranularity\": \"\",\n   \"startDateInSeconds\": 0,\n   \"type\": \"cost_item_tiered_seat_based\"\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": "L63371kmxEcNju0qtaepy"
    },
    "results": {
      "languages": [
        {
          "id": "iQOWsTmYbnvtfDTpGtWZx",
          "language": "200",
          "code": "// Successful request\n{}"
        }
      ],
      "selectedLanguageId": "iQOWsTmYbnvtfDTpGtWZx"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}