---
title: Delete a cost item price generator
slug: amberflo-api/delete-a-cost-item-price-generator
docTags: 
createdAt: 2024-11-07T15:10:16.974Z
---

{
  "id": "sGl8lRS_vUgkV1B7IDMN_",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "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": "Delete a cost item price generator",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "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": "J_AM5z6xrNYUfkp31LyTA",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template \\\n     --header 'accept: application/json'"
        },
        {
          "id": "wBbGvk9coF7hVbORTGCcQ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\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": "8K280eKUUjHOU0qRD4TCa",
          "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::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "1LHTkq4onoUi5o1d1hnpe",
          "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 = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "J_AM5z6xrNYUfkp31LyTA"
    },
    "results": {
      "languages": [
        {
          "id": "ebuSV2farCzSA3RaFdwNk",
          "language": "200",
          "code": "// Successful request\n{}"
        }
      ],
      "selectedLanguageId": "ebuSV2farCzSA3RaFdwNk"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}