---
title: Relax prepaid conditions.
slug: amberflo-api/relax-prepaid-conditions
docTags: 
createdAt: 2024-11-07T15:10:16.978Z
---

{
  "id": "1sj7CEj4qWK5WElSivEYq",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/relax",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/relax"
      }
    ],
    "name": "Relax prepaid conditions.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "payment.billing.prepaid_to_product.PrepaidConditionRelaxationRequest.in",
          "schema": [
            {
              "name": "customerId",
              "kind": "required",
              "type": "string",
              "description": "Customer id.",
              "example": ""
            },
            {
              "name": "prepaidUri",
              "kind": "required",
              "type": "string",
              "description": "Prepaid card uri to relax.",
              "example": ""
            },
            {
              "name": "conditionUpdates",
              "kind": "required",
              "type": "array",
              "description": "Prepaid conditions to be updated. Key: existing condition, Value: updated condition.",
              "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidConditionTransition.in",
              "customType": "payment.billing.prepaid_to_product.PrepaidConditionTransition.in[]",
              "schema": [
                {
                  "name": "originalCondition",
                  "kind": "required",
                  "type": "object",
                  "description": "Original prepaid condition to be replaced.",
                  "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCondition.in",
                  "customType": "payment.billing.prepaid_to_product.PrepaidCondition.in",
                  "schema": [],
                  "complexType": "oneOf",
                  "complexItems": [
                    {
                      "name": "payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "DimensionValueMapPrepaidCondition"
                        },
                        {
                          "name": "dimensionMapValue",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, string>",
                          "schema": []
                        }
                      ]
                    },
                    {
                      "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "ProductItemDimensionPrepaidCondition"
                        },
                        {
                          "name": "productItemId",
                          "kind": "optional",
                          "type": "string",
                          "description": "The product item associated with the prepaid.",
                          "example": ""
                        },
                        {
                          "name": "dimensions",
                          "kind": "optional",
                          "type": "map",
                          "description": "The dimensions associated with the prepaid.",
                          "example": "",
                          "customType": "map<string, string>",
                          "schema": []
                        }
                      ]
                    },
                    {
                      "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "ProductItemPrepaidCondition"
                        },
                        {
                          "name": "productItemId",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "replacementCondition",
                  "kind": "optional",
                  "type": "object",
                  "description": "Prepaid condition to be replaced with.",
                  "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCondition.in",
                  "customType": "payment.billing.prepaid_to_product.PrepaidCondition.in",
                  "schema": [],
                  "complexType": "oneOf",
                  "complexItems": [
                    {
                      "name": "payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "DimensionValueMapPrepaidCondition"
                        },
                        {
                          "name": "dimensionMapValue",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, string>",
                          "schema": []
                        }
                      ]
                    },
                    {
                      "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "ProductItemDimensionPrepaidCondition"
                        },
                        {
                          "name": "productItemId",
                          "kind": "optional",
                          "type": "string",
                          "description": "The product item associated with the prepaid.",
                          "example": ""
                        },
                        {
                          "name": "dimensions",
                          "kind": "optional",
                          "type": "map",
                          "description": "The dimensions associated with the prepaid.",
                          "example": "",
                          "customType": "map<string, string>",
                          "schema": []
                        }
                      ]
                    },
                    {
                      "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "ProductItemPrepaidCondition"
                        },
                        {
                          "name": "productItemId",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidConditionRelaxationRequest.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "payment.billing.prepaid_to_product.PrepaidCondition.out[]",
            "schema": [],
            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCondition.out",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "DimensionValueMapPrepaidCondition"
                  },
                  {
                    "name": "dimensionMapValue",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.out",
                "customType": "payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.out"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "ProductItemDimensionPrepaidCondition"
                  },
                  {
                    "name": "productItemId",
                    "kind": "optional",
                    "type": "string",
                    "description": "The product item associated with the prepaid.",
                    "example": ""
                  },
                  {
                    "name": "dimensions",
                    "kind": "optional",
                    "type": "map",
                    "description": "The dimensions associated with the prepaid.",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.out",
                "customType": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.out"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "ProductItemPrepaidCondition"
                  },
                  {
                    "name": "productItemId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ],
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.out",
                "customType": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.out"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "e-IiJl-3mw5MJROUlXwDt",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/relax \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"customerId\": \"\",\n     \"prepaidUri\": \"\",\n     \"conditionUpdates\": [\n     {\n     \"originalCondition\": {\n     \"type\": \"DimensionValueMapPrepaidCondition\"\n     },\n     \"replacementCondition\": {\n     \"type\": \"DimensionValueMapPrepaidCondition\"\n     }\n     }\n     ]\n     }'"
        },
        {
          "id": "Ph8EgKUChoLtEbda4AYdO",
          "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   \"customerId\": \"\",\n   \"prepaidUri\": \"\",\n   \"conditionUpdates\": [\n      {\n         \"originalCondition\": {\n            \"type\": \"DimensionValueMapPrepaidCondition\"\n         },\n         \"replacementCondition\": {\n            \"type\": \"DimensionValueMapPrepaidCondition\"\n         }\n      }\n   ]\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/customer-prepaid/relax\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "u0UtQ0hcTPM_yMRL61OQY",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/relax\")\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   \"customerId\": \"\",\n   \"prepaidUri\": \"\",\n   \"conditionUpdates\": [\n      {\n         \"originalCondition\": {\n            \"type\": \"DimensionValueMapPrepaidCondition\"\n         },\n         \"replacementCondition\": {\n            \"type\": \"DimensionValueMapPrepaidCondition\"\n         }\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "guMbpxF41PYrFYUlBY24x",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/relax\"\n\npayload = json.dumps({\n   \"customerId\": \"\",\n   \"prepaidUri\": \"\",\n   \"conditionUpdates\": [\n      {\n         \"originalCondition\": {\n            \"type\": \"DimensionValueMapPrepaidCondition\"\n         },\n         \"replacementCondition\": {\n            \"type\": \"DimensionValueMapPrepaidCondition\"\n         }\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "e-IiJl-3mw5MJROUlXwDt"
    },
    "results": {
      "languages": [
        {
          "id": "JWpNsLnHD39y4YVYTFt7f",
          "language": "200",
          "code": "// Successful request\n[\n  \"\"\n]"
        }
      ],
      "selectedLanguageId": "JWpNsLnHD39y4YVYTFt7f"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}