---
title: /credits/top-up/options/{customerId}
slug: amberflo-api/creditstop-upoptionscustomerid
docTags: 
createdAt: 2024-11-07T15:10:16.980Z
---

{
  "id": "_xBegFmhHKpJOBbjzh_iY",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/credits/top-up/options/{customerId}",
    "servers": [
      {
        "url": "https://app.amberflo.io/credits/top-up/options/{customerId}"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "customerId",
          "type": "string",
          "description": ""
        }
      ],
      "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": "com.amberflo.real_time_credits.TopupOptions.out",
            "schema": [
              {
                "name": "customerId",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "autoTopup",
                "kind": "optional",
                "type": "boolean",
                "example": ""
              },
              {
                "name": "targetBalance",
                "kind": "optional",
                "type": "number",
                "example": ""
              },
              {
                "name": "topupAmount",
                "kind": "optional",
                "type": "number",
                "example": ""
              },
              {
                "name": "thresholdBalance",
                "kind": "optional",
                "type": "number",
                "example": ""
              },
              {
                "name": "maxTopupPerBillingPeriod",
                "kind": "optional",
                "type": "number",
                "example": ""
              },
              {
                "name": "createTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Create time in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds)",
                "example": 0
              },
              {
                "name": "updateTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Update time in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds)",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/com.amberflo.real_time_credits.TopupOptions.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "Kx1YFAyWFgpuy9-BOslv0",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://app.amberflo.io/credits/top-up/options/{customerId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "8bBqDOIJxYKw4g_HErpyw",
          "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: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/credits/top-up/options/{customerId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4rYsPGc9sgu-i9U4vjNqS",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/credits/top-up/options/{customerId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "r1NpDfhHnrlJPkIY_MBPp",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/credits/top-up/options/{customerId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Kx1YFAyWFgpuy9-BOslv0"
    },
    "results": {
      "languages": [
        {
          "id": "l08jSxJPyQPRv_FXpfwzD",
          "language": "200",
          "code": "// Successful request\n{\n  \"customerId\": \"\",\n  \"autoTopup\": false,\n  \"targetBalance\": 0,\n  \"topupAmount\": 0,\n  \"thresholdBalance\": 0,\n  \"maxTopupPerBillingPeriod\": 0,\n  \"createTimeInSeconds\": \"\",\n  \"updateTimeInSeconds\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "l08jSxJPyQPRv_FXpfwzD"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}