---
title: Get pricing plan details
slug: reference/get-pricing-plan-details
docTags: 
createdAt: 2024-09-30T17:03:00.667Z
---

{
  "id": "Ht8-wHQ4qFeLMAFismfzE",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/customer-portal/pricing-plan/details",
    "servers": [
      {
        "url": "https://app.amberflo.io/customer-portal/pricing-plan/details"
      }
    ],
    "name": "Get pricing plan details",
    "description": "This endpoint returns the static pricing plan details and the list of current promotions of the customer.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "productItemId",
          "type": "string",
          "description": "Show only information related to this Product Item."
        },
        {
          "kind": "optional",
          "name": "latest",
          "type": "boolean",
          "description": "<p>Select the latest (possibly future) plan. Defaults to false, which selects the current plan.</p>"
        },
        {
          "kind": "optional",
          "name": "productId",
          "type": "string",
          "description": "Product ID as defined in account pricing. Change from default only if you have multiple products.",
          "default": "1"
        },
        {
          "kind": "required",
          "name": "sessionToken",
          "type": "string",
          "description": "<p>A required session token used to authenticate API calls made on behalf of a customer. This token is obtained from the <code>Create a session</code> endpoint and must be included with every request to authorize access.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "api_key",
          "name": "x-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "pricing-plan-details-response",
            "schema": [
              {
                "name": "productPlan",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "billingPeriod",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "interval",
                        "kind": "optional",
                        "type": "string",
                        "description": "DAY, MONTH, YEAR",
                        "example": ""
                      },
                      {
                        "name": "intervalsCount",
                        "kind": "optional",
                        "type": "integer",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "fees",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "cost",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "discountable",
                        "kind": "optional",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "isOneTimeFee",
                        "kind": "optional",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "prepayable",
                        "kind": "optional",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "isProrated",
                        "kind": "optional",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "prorateToDay",
                        "kind": "optional",
                        "type": "boolean",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "isDefault",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "lastUpdateTimeInMillis",
                    "kind": "optional",
                    "type": "integer",
                    "example": 0
                  },
                  {
                    "name": "lockingStatus",
                    "kind": "optional",
                    "type": "string",
                    "description": "OPEN, CLOSE_TO_DELETIONS, CLOSE_TO_CHANGES, DEPRECATED",
                    "example": ""
                  },
                  {
                    "name": "planLevelFreeTier",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "intVal",
                        "kind": "optional",
                        "type": "integer",
                        "example": 0
                      },
                      {
                        "name": "scale",
                        "kind": "optional",
                        "type": "integer",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "productId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "productItems",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "defaultItemPriceId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "lastUpdateTimeInMillis",
                        "kind": "optional",
                        "type": "integer",
                        "example": 0
                      },
                      {
                        "name": "lockingStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": "OPEN, CLOSE_TO_DELETIONS, CLOSE_TO_CHANGES, DEPRECATED",
                        "example": ""
                      },
                      {
                        "name": "productItemId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "productItemPrice",
                        "kind": "optional",
                        "type": "object",
                        "example": "",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          },
                          {
                            "name": "lastUpdateTimeInMillis",
                            "kind": "optional",
                            "type": "integer",
                            "example": 0
                          },
                          {
                            "name": "lockingStatus",
                            "kind": "optional",
                            "type": "string",
                            "description": "OPEN, CLOSE_TO_DELETIONS, CLOSE_TO_CHANGES, DEPRECATED",
                            "example": ""
                          },
                          {
                            "name": "price",
                            "kind": "optional",
                            "type": "object",
                            "example": "",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": ""
                              }
                            ]
                          },
                          {
                            "name": "productItemId",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          },
                          {
                            "name": "productItemPriceName",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "productPlanName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "successorPlanId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "transitionStrategy",
                    "kind": "optional",
                    "type": "string",
                    "description": "END_OF_BILLING_CYCLE, INCLUDE_NEW_PLAN_ITEM_RATES",
                    "example": ""
                  }
                ]
              },
              {
                "name": "promotions",
                "kind": "optional",
                "type": "array",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "appliedTimeInSeconds",
                    "kind": "optional",
                    "type": "integer",
                    "example": 0
                  },
                  {
                    "name": "productId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "promotion",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "targetProductId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "targetProductItemId",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "lastUpdateTimeInMillis",
                        "kind": "optional",
                        "type": "integer",
                        "example": 0
                      },
                      {
                        "name": "lockingStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": "OPEN, CLOSE_TO_DELETIONS, CLOSE_TO_CHANGES, DEPRECATED",
                        "example": ""
                      },
                      {
                        "name": "promotionName",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/pricing-plan-details-response",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "4yHOwncG_3v2heQ6F-6im",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://app.amberflo.io/customer-portal/pricing-plan/details?productId=1&sessionToken=string' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "fdpQKFqtqVZeEv2wUl65C",
          "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/customer-portal/pricing-plan/details?productId=1&sessionToken=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "fdexlrK0gYPPCfBnpWb2p",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/customer-portal/pricing-plan/details?productId=1&sessionToken=string\")\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": "V_W0IkLenQEzYblkbdM4V",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/customer-portal/pricing-plan/details?productId=1&sessionToken=string\"\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": "4yHOwncG_3v2heQ6F-6im"
    },
    "results": {
      "languages": [
        {
          "id": "t3ufmf-tYh5CSA08CrAzS",
          "language": "200",
          "code": "// Successful response\n{\n  \"productPlan\": {\n    \"billingPeriod\": {\n      \"interval\": \"\",\n      \"intervalsCount\": 0\n    },\n    \"description\": \"\",\n    \"fees\": [\n      {\n        \"cost\": 0,\n        \"description\": \"\",\n        \"discountable\": false,\n        \"id\": \"\",\n        \"isOneTimeFee\": false,\n        \"name\": \"\",\n        \"prepayable\": false,\n        \"isProrated\": false,\n        \"prorateToDay\": false\n      }\n    ],\n    \"id\": \"\",\n    \"isDefault\": false,\n    \"lastUpdateTimeInMillis\": 0,\n    \"lockingStatus\": \"\",\n    \"planLevelFreeTier\": {\n      \"intVal\": 0,\n      \"scale\": 0\n    },\n    \"productId\": \"\",\n    \"productItems\": [\n      {\n        \"defaultItemPriceId\": \"\",\n        \"lastUpdateTimeInMillis\": 0,\n        \"lockingStatus\": \"\",\n        \"productItemId\": \"\",\n        \"productItemPrice\": {\n          \"id\": \"\",\n          \"lastUpdateTimeInMillis\": 0,\n          \"lockingStatus\": \"\",\n          \"price\": {\n            \"type\": \"\"\n          },\n          \"productItemId\": \"\",\n          \"productItemPriceName\": \"\"\n        }\n      }\n    ],\n    \"productPlanName\": \"\",\n    \"successorPlanId\": \"\",\n    \"transitionStrategy\": \"\"\n  },\n  \"promotions\": [\n    {\n      \"appliedTimeInSeconds\": 0,\n      \"productId\": \"\",\n      \"promotion\": {\n        \"targetProductId\": \"\",\n        \"targetProductItemId\": \"\",\n        \"description\": \"\",\n        \"id\": \"\",\n        \"lastUpdateTimeInMillis\": 0,\n        \"lockingStatus\": \"\",\n        \"promotionName\": \"\",\n        \"type\": \"\"\n      }\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "t3ufmf-tYh5CSA08CrAzS"
    }
  },
  "children": [
    {
      "id": "J35J63eLlijPV53oau8DU",
      "type": "paragraph",
      "children": [
        {
          "text": "This endpoint returns the static pricing plan details and the list of current promotions of the customer.",
          "id": "lqsh6TaRA2DPBI_iVb17I"
        }
      ]
    }
  ]
}