---
title: List complete history of customer product plans
slug: reference/list-complete-history-of-customer-product-plans
docTags: 
createdAt: 2025-03-18T18:28:02.918Z
---

{
  "id": "Bl0J0erEwkDoF9B7jf7RS",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/list",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/list"
      }
    ],
    "name": "List complete history of customer product plans",
    "description": "<p>Retrieves the complete history of all product plans assigned to a customer, including past, current, and future plans.\nThis endpoint provides a comprehensive view of the customer's pricing plan evolution over time.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Review complete customer pricing plan history for auditing</li>\n<li>Track pricing plan changes and effective dates</li>\n<li>Support customer service inquiries about plan transitions</li>\n<li>Analyze customer plan usage patterns over time</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "CustomerId",
          "type": "string",
          "example": "customer_12345",
          "description": "Unique identifier for the customer whose complete product plan history should be retrieved.\nThis parameter is required to identify which customer's plan history to access.\n"
        },
        {
          "kind": "optional",
          "name": "ProductId",
          "type": "string",
          "example": "product_abc123",
          "description": "<p>Unique identifier for the specific product to filter plan history.\nIf not provided, defaults to the account's default product ID.\nUsed to view plan history for a specific product or service.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Returns complete array of customer product plans ordered chronologically with pricing configuration and assignment details",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Assignment of a specific product plan to a customer for a defined time period, establishing pricing rules for billing.",
            "customType": "payment.pricing.customer.CustomerProductPlan.in[]",
            "schema": [
              {
                "name": "productId",
                "kind": "optional",
                "type": "string",
                "description": "Identifier of the product for which this plan assignment applies.",
                "example": ""
              },
              {
                "name": "productPlanId",
                "kind": "optional",
                "type": "string",
                "description": "Unique identifier of the specific pricing plan assigned to the customer.",
                "example": ""
              },
              {
                "name": "customerId",
                "kind": "optional",
                "type": "string",
                "description": "Unique identifier of the customer who has this product plan assignment.",
                "example": ""
              },
              {
                "name": "startTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Unix timestamp when this product plan assignment becomes active, must be at least one hour before end time.",
                "example": 0
              },
              {
                "name": "endTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Optional unix timestamp when this product plan assignment expires, allowing plan transitions over time.",
                "example": 0
              },
              {
                "name": "relationId",
                "kind": "optional",
                "type": "string",
                "description": "Unique base64-encoded identifier for customer-product plan relationship, computed automatically for external system integration.",
                "example": ""
              },
              {
                "name": "createdTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Unix timestamp when this product plan assignment was originally created, automatically set during creation.",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.customer.CustomerProductPlan.in",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid customer ID or malformed request parameters",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Authentication required or invalid API key provided",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Insufficient permissions to access customer pricing history",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Customer not found or no pricing plan history available",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while retrieving customer pricing history",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Q8R0emHtoMzVDVYQM1d9c",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/list?CustomerId=customer_12345' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "x9DtV2BRR7JJLkjFp36Gw",
          "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/payments/pricing/amberflo/customer-pricing/list?CustomerId=customer_12345\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "y89mvZlmbfCXobr4jtnXS",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/list?CustomerId=customer_12345\")\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": "9F4aZF2vWPua0tBbWesrf",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/list?CustomerId=customer_12345\"\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": "Q8R0emHtoMzVDVYQM1d9c"
    },
    "results": {
      "languages": [
        {
          "id": "-KP5i2fAvfx_fKj1LEuST",
          "language": "200",
          "code": "// Returns complete array of customer product plans ordered chronologically with pricing configuration and assignment details\n[\n  {\n    \"productId\": \"\",\n    \"productPlanId\": \"\",\n    \"customerId\": \"\",\n    \"startTimeInSeconds\": \"\",\n    \"endTimeInSeconds\": \"\",\n    \"relationId\": \"\",\n    \"createdTimeInSeconds\": \"\"\n  }\n]"
        },
        {
          "id": "_O75sWKjHSA_EEMFwYB0L",
          "language": "400",
          "code": "// Invalid customer ID or malformed request parameters\n"
        },
        {
          "id": "-BZ-d63vSW2i5qS-n9jgX",
          "language": "401",
          "code": "// Authentication required or invalid API key provided\n"
        },
        {
          "id": "xORBb_6VR6O7NI7rZrs00",
          "language": "403",
          "code": "// Insufficient permissions to access customer pricing history\n"
        },
        {
          "id": "jiAUW4E8jLVBOvBuAK671",
          "language": "404",
          "code": "// Customer not found or no pricing plan history available\n"
        },
        {
          "id": "UfFhk-SED0lRZXI6wD0wY",
          "language": "500",
          "code": "// Internal server error occurred while retrieving customer pricing history\n"
        }
      ],
      "selectedLanguageId": "-KP5i2fAvfx_fKj1LEuST"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}