---
title: List all applied promotions on customer pricing plan
slug: reference/list-all-applied-promotions-on-customer-pricing-plan
docTags: 
createdAt: 2025-03-18T18:28:02.918Z
---

{
  "id": "bk8-ojNKbFDd4nfihroH3",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-promotions/list",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-promotions/list"
      }
    ],
    "name": "List all applied promotions on customer pricing plan",
    "description": "<p>Retrieves all promotions currently applied to a customer's pricing plan including discount details,\nconditions, and remaining promotional value or usage.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>View all active promotional discounts for a customer</li>\n<li>Check remaining promotional credits or usage allowances</li>\n<li>Audit promotional campaigns applied to customer accounts</li>\n<li>Support customer service inquiries about applied discounts</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 applied promotions should be retrieved.\nThis parameter is required to identify which customer's promotional offers to access.\n"
        },
        {
          "kind": "optional",
          "name": "ProductId",
          "type": "string",
          "example": "product_abc123",
          "description": "<p>Unique identifier for the specific product to filter applied promotions.\nIf not provided, defaults to the account's default product ID.\nUsed to view promotions applied to 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 array of all promotions applied to the customer pricing plan with discount details and remaining value",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Customer promotion application record tracking when specific promotions were added, used, and removed from customer pricing plans.",
            "customType": "payment.pricing.customer.CustomerAppliedPromotion.out[]",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "The id of the specific instance in time where a promotion (with promotion Id) was applied to a customer (same promotion might be applied multiple times for the same customer).",
                "example": ""
              },
              {
                "name": "productId",
                "kind": "optional",
                "type": "string",
                "description": "Unique product id.",
                "example": ""
              },
              {
                "name": "customerId",
                "kind": "optional",
                "type": "string",
                "description": "Unique customer id.",
                "example": ""
              },
              {
                "name": "promotionId",
                "kind": "optional",
                "type": "string",
                "description": "Unique promotion id to define an applied promotion.",
                "example": ""
              },
              {
                "name": "appliedTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Deprecated. When a promotion is in use in a customer pricing plan.",
                "example": 0
              },
              {
                "name": "addedTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "When a promotion has been added to a pricing plan.",
                "example": 0
              },
              {
                "name": "removedTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "When a promotion has been removed from a customer pricing plan.",
                "example": 0
              },
              {
                "name": "relationId",
                "kind": "optional",
                "type": "string",
                "description": "The unique ID of the relationship between the customer and promotion.",
                "example": ""
              },
              {
                "name": "appliedTimeRange",
                "kind": "optional",
                "type": "object",
                "description": "When something is applied and removed with hourly granularity.",
                "modelRef": "#/components/schemas/payment.common.TimeRange.in",
                "customType": "payment.common.TimeRange.in",
                "schema": [
                  {
                    "name": "startTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp marking the beginning of the time range in seconds",
                    "example": 0
                  },
                  {
                    "name": "endTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp marking the end of time range or null for open-ended ranges",
                    "example": 0
                  }
                ]
              },
              {
                "name": "priority",
                "kind": "optional",
                "type": "number",
                "description": "How we rank promotions of the same type against each other.",
                "example": ""
              },
              {
                "name": "removalContext",
                "kind": "optional",
                "type": "map",
                "description": "Identifying metadata around who and why a promotion was removed.",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "commitmentId",
                "kind": "optional",
                "type": "string",
                "description": "Optional field, populated by internal processes.",
                "example": ""
              },
              {
                "name": "entityProductInvoices",
                "kind": "optional",
                "type": "array",
                "description": "List of invoices that this customer applied promotion was used on.",
                "modelRef": "#/components/schemas/payment.billing.detailed.EntityProductInvoice.in",
                "customType": "payment.billing.detailed.EntityProductInvoice.in[]",
                "schema": [
                  {
                    "name": "invoiceUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "URI string identifier referencing the specific product invoice associated with this entity payment.",
                    "example": ""
                  },
                  {
                    "name": "createdTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp indicating when this entity payment record was created in the system.",
                    "example": 0
                  },
                  {
                    "name": "amount",
                    "kind": "optional",
                    "type": "number",
                    "description": "Monetary amount used to pay for the product invoice by this entity type.",
                    "example": ""
                  },
                  {
                    "name": "invoiceAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "Total invoice amount value for reference tracking in entity payment processing systems.",
                    "example": ""
                  }
                ]
              },
              {
                "name": "amountLeftInCycle",
                "kind": "optional",
                "type": "number",
                "description": "Amount of promotion left in cycle.",
                "example": ""
              },
              {
                "name": "totalAmountLeft",
                "kind": "optional",
                "type": "number",
                "description": "Amount of promotion left in total.",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.customer.CustomerAppliedPromotion.out",
            "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 promotional information",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Customer not found or no applied promotions available",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while retrieving customer promotions",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "cyPrz0YZys4W6Fd7H0dsI",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://app.amberflo.io/payments/pricing/amberflo/customer-promotions/list?CustomerId=customer_12345' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "FeFYCwioU4DwhEhdm0Nwc",
          "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-promotions/list?CustomerId=customer_12345\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "5Zf1zqReYevG9D88ZK__-",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-promotions/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": "fJFCVzotRpjhXeCMO4ndo",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-promotions/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": "cyPrz0YZys4W6Fd7H0dsI"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Returns array of all promotions applied to the customer pricing plan with discount details and remaining value\n[\n  {\n    \"id\": \"\",\n    \"productId\": \"\",\n    \"customerId\": \"\",\n    \"promotionId\": \"\",\n    \"appliedTimeInSeconds\": \"\",\n    \"addedTimeInSeconds\": \"\",\n    \"removedTimeInSeconds\": \"\",\n    \"relationId\": \"\",\n    \"appliedTimeRange\": {\n      \"startTimeInSeconds\": \"\",\n      \"endTimeInSeconds\": \"\"\n    },\n    \"priority\": 0,\n    \"removalContext\": \"\",\n    \"commitmentId\": \"\",\n    \"entityProductInvoices\": [\n      {\n        \"invoiceUri\": \"\",\n        \"createdTimeInSeconds\": \"\",\n        \"amount\": 0,\n        \"invoiceAmount\": 0\n      }\n    ],\n    \"amountLeftInCycle\": 0,\n    \"totalAmountLeft\": 0\n  }\n]"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid customer ID or malformed request parameters\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authentication required or invalid API key provided\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Insufficient permissions to access customer promotional information\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Customer not found or no applied promotions available\n"
        },
        {
          "id": "response-5-500",
          "language": "500",
          "code": "// Internal server error occurred while retrieving customer promotions\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}