---
title: /payments/pricing/amberflo/account-pricing/product-item-rewards-rule
slug: amberflo-api/hxoO-paymentspricingamberfloaccount-pricingproduct-item-rewards-rule
docTags: 
createdAt: 2024-11-07T15:10:16.976Z
---

{
  "id": "OAN8iALF4_e4W5sLETA9_",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/product-item-rewards-rule",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/product-item-rewards-rule"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "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": "payment.pricing.rewards.ProductItemRewardsRule.out",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "productItemId",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "rewardRule",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/payment.pricing.rewards.RewardRule.out",
                "customType": "payment.pricing.rewards.RewardRule.out",
                "schema": [],
                "complexType": "oneOf",
                "complexItems": [
                  {
                    "name": "payment.pricing.rewards.ConstantRatioRewardsRule.out",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.rewards.ConstantRatioRewardsRule.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "example": "",
                        "default": "ConstantRatio"
                      },
                      {
                        "name": "usagePerBatch",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "rewardsBatchSize",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "rewardsLimit",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/payment.pricing.rewards.RewardsLimit.out",
                        "customType": "payment.pricing.rewards.RewardsLimit.out",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.pricing.rewards.RewardsLimitSequence.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.rewards.RewardsLimitSequence.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "RewardsLimitSequence"
                              },
                              {
                                "name": "rules",
                                "kind": "optional",
                                "type": "array",
                                "description": "",
                                "modelRef": "#/components/schemas/payment.pricing.rewards.SimpleRewardsLimit.out",
                                "customType": "payment.pricing.rewards.SimpleRewardsLimit.out[]",
                                "schema": [
                                  {
                                    "name": "type",
                                    "kind": "optional",
                                    "type": "string",
                                    "example": "",
                                    "default": "SimpleRewardsLimit"
                                  },
                                  {
                                    "name": "maxRewards",
                                    "kind": "optional",
                                    "type": "number",
                                    "example": ""
                                  },
                                  {
                                    "name": "rewardsPeriod",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "",
                                    "modelRef": "#/components/schemas/payment.pricing.rewards.RewardsPeriod.out",
                                    "customType": "payment.pricing.rewards.RewardsPeriod.out",
                                    "schema": [
                                      {
                                        "name": "",
                                        "description": "",
                                        "customType": "Max depth limit reached"
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "name": "payment.pricing.rewards.SimpleRewardsLimit.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.pricing.rewards.SimpleRewardsLimit.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "SimpleRewardsLimit"
                              },
                              {
                                "name": "maxRewards",
                                "kind": "optional",
                                "type": "number",
                                "example": ""
                              },
                              {
                                "name": "rewardsPeriod",
                                "kind": "optional",
                                "type": "string",
                                "description": "",
                                "modelRef": "#/components/schemas/payment.pricing.rewards.RewardsPeriod.out",
                                "customType": "payment.pricing.rewards.RewardsPeriod.out",
                                "schema": [
                                  {
                                    "name": "",
                                    "description": "",
                                    "customType": "Max depth limit reached"
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "expiredAfter",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/payment.pricing.BillingPeriod.out",
                "customType": "payment.pricing.BillingPeriod.out",
                "schema": [
                  {
                    "name": "interval",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.pricing.BillingPeriodInterval.out",
                    "customType": "payment.pricing.BillingPeriodInterval.out",
                    "schema": []
                  },
                  {
                    "name": "intervalsCount",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "example": 0
                  }
                ]
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "isDefault",
                "kind": "optional",
                "type": "boolean",
                "example": ""
              },
              {
                "name": "lockingStatus",
                "kind": "optional",
                "type": "string",
                "description": "",
                "modelRef": "#/components/schemas/com.amberflo.service.common.LockingStatus.out",
                "customType": "com.amberflo.service.common.LockingStatus.out",
                "schema": []
              },
              {
                "name": "lastUpdateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.rewards.ProductItemRewardsRule.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "9TBxfK7kvc_RNRHG--gwD",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/product-item-rewards-rule \\\n     --header 'accept: application/json'"
        },
        {
          "id": "v2BPLv7BmDgCblpnaigek",
          "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/account-pricing/product-item-rewards-rule\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "H01Qn12GjmB9nF2PonYzY",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/product-item-rewards-rule\")\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": "9JDFQZuY8dtBzg_tvoO0o",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/product-item-rewards-rule\"\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": "9TBxfK7kvc_RNRHG--gwD"
    },
    "results": {
      "languages": [
        {
          "id": "HBg7yyyv7PJ-JsyHZEejA",
          "language": "200",
          "code": "// Successful request\n{\n  \"id\": \"\",\n  \"productItemId\": \"\",\n  \"rewardRule\": {},\n  \"expiredAfter\": {\n    \"interval\": \"\",\n    \"intervalsCount\": \"\"\n  },\n  \"name\": \"\",\n  \"description\": \"\",\n  \"isDefault\": false,\n  \"lockingStatus\": \"\",\n  \"lastUpdateTimeInMillis\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "HBg7yyyv7PJ-JsyHZEejA"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}