---
title: Delete a single spending limit
slug: amberflo-api/delete-a-single-spending-limit
docTags: 
createdAt: 2024-11-07T15:10:16.977Z
---

{
  "id": "KSqmVihNmG4EV-b_2MDSZ",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits"
      }
    ],
    "name": "Delete a single spending limit",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "customerId",
          "type": "string",
          "description": "The ID of the customer for the spending limit"
        },
        {
          "kind": "required",
          "name": "id",
          "type": "string",
          "description": "The unique ID of the customer spending limit"
        }
      ],
      "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.customer.spending_limit.CustomerSpendingLimit.out",
            "schema": [
              {
                "name": "accountId",
                "kind": "optional",
                "type": "string",
                "description": "Internal managed. The ID of the account this customer belongs to",
                "example": ""
              },
              {
                "name": "customerId",
                "kind": "required",
                "type": "string",
                "description": "The ID of the customer for the spending limit",
                "example": ""
              },
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "The unique ID of the spending limit",
                "example": ""
              },
              {
                "name": "label",
                "kind": "optional",
                "type": "string",
                "description": "Label for the spending limit",
                "example": ""
              },
              {
                "name": "effectiveTimeRange",
                "kind": "required",
                "type": "object",
                "description": "The effective time range for the spending limit",
                "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": "trueUpInput",
                "kind": "required",
                "type": "object",
                "description": "The true up configuration for the spending limit",
                "modelRef": "#/components/schemas/payment.pricing.commitments.generators.TrueUpInput.out",
                "customType": "payment.pricing.commitments.generators.TrueUpInput.out",
                "schema": [
                  {
                    "name": "minimumPayment",
                    "kind": "required",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "interval",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.commitments.generators.TrueUpInterval.out",
                    "customType": "payment.pricing.commitments.generators.TrueUpInterval.out",
                    "schema": []
                  },
                  {
                    "name": "startCycle",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "example": 0
                  },
                  {
                    "name": "endCycle",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "example": 0
                  },
                  {
                    "name": "productItemIds",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "usePriceAfterDiscounts",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  }
                ]
              },
              {
                "name": "createdTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Internal managed. The time when the spending limit was created",
                "example": 0
              },
              {
                "name": "updatedTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Internal managed. The time when the spending limit was updated last time",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.customer.spending_limit.CustomerSpendingLimit.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "Rgf-YMASl2UXuzVQZ6sS_",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url 'https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits?customerId=string&id=string' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "BtkAsp2L0-QHK7ausE5Yq",
          "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/customer-pricing/spending-limits?customerId=string&id=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "96syqSK6N498mEmbE7A0t",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits?customerId=string&id=string\")\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": "e_1oX9wDjbDJoD3nwWPeD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits?customerId=string&id=string\"\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": "Rgf-YMASl2UXuzVQZ6sS_"
    },
    "results": {
      "languages": [
        {
          "id": "61EEi8tvZa8Itpvpr67_7",
          "language": "200",
          "code": "// Successful request\n{\n  \"accountId\": \"\",\n  \"customerId\": \"\",\n  \"id\": \"\",\n  \"label\": \"\",\n  \"effectiveTimeRange\": {\n    \"startTimeInSeconds\": \"\",\n    \"endTimeInSeconds\": \"\"\n  },\n  \"trueUpInput\": {\n    \"minimumPayment\": 0,\n    \"interval\": \"\",\n    \"startCycle\": \"\",\n    \"endCycle\": \"\",\n    \"productItemIds\": [\n      \"\"\n    ],\n    \"usePriceAfterDiscounts\": false\n  },\n  \"createdTimeInSeconds\": \"\",\n  \"updatedTimeInSeconds\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "61EEi8tvZa8Itpvpr67_7"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}