---
title: Create product item absolute partner discount
slug: reference/create-product-item-absolute-partner-discount
docTags: 
createdAt: 2025-03-18T18:28:02.919Z
---

{
  "id": "RSkpo88DJGmw2ssJyeBzI",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/product_item_absolute_partner_discount",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/product_item_absolute_partner_discount"
      }
    ],
    "name": "Create product item absolute partner discount",
    "description": "<p>Creates a fixed-amount discount promotion for partner channel customers that applies to specific product items.</p>\n<p>This provides fixed dollar amount discounts on individual product items for customers sourced through partners,\nenabling granular partner incentives at the item level rather than product-wide.</p>\n<p>Use this for specialized partner programs where you want fixed-amount discounts on specific services,\nfeatures, or usage components for partner-sourced customers.</p>\n<p><strong>Business Use Cases:</strong></p>\n<ul>\n<li>API-specific reseller programs</li>\n<li>Storage or compute service partner discounts</li>\n<li>Premium feature partner enablement</li>\n<li>Geographic or industry-specific partner incentives</li>\n<li>Technical certification-based service discounts</li>\n</ul>\n<p><strong>Advanced Partner Management:</strong></p>\n<ul>\n<li>Service-level partner expertise recognition</li>\n<li>Competitive positioning for specific product items</li>\n<li>Partner training and certification incentives</li>\n<li>Technical specialization rewards</li>\n<li>Market segment-specific partner programs</li>\n</ul>\n<p><strong>Targeted Applications:</strong></p>\n<ul>\n<li>Infrastructure service partner programs</li>\n<li>Application marketplace integrations</li>\n<li>Specialized consulting partner incentives</li>\n<li>Technology stack-specific discounts</li>\n<li>Vertical market partner enablement</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Product item absolute partner discount configuration with item-specific targeting and partner program details",
          "customType": "payment.pricing.promotions.pre_created.ProductItemAbsolutePartnerDiscount.in",
          "schema": [
            {
              "name": "id",
              "kind": "required",
              "type": "string",
              "description": "Unique identifier for the partner discount within the account scope.",
              "example": ""
            },
            {
              "name": "type",
              "kind": "optional",
              "type": "string",
              "description": "Fixed promotion type identifier for product item absolute partner discounts.",
              "example": "",
              "default": "product_item_absolute_partner_discount"
            },
            {
              "name": "promotionName",
              "kind": "required",
              "type": "string",
              "description": "Human-readable name for partner discount display and management purposes.",
              "example": ""
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "Optional detailed description explaining partner discount purpose and terms.",
              "example": ""
            },
            {
              "name": "lockingStatus",
              "kind": "optional",
              "type": "string",
              "description": "Modification permissions controlling partner discount lifecycle and editing capabilities.",
              "modelRef": "#/components/schemas/common.LockingStatus.in",
              "customType": "common.LockingStatus.in",
              "schema": []
            },
            {
              "name": "dimensionConstraintMap",
              "kind": "optional",
              "type": "map",
              "description": "Optional dimension filters restricting discount to specific usage characteristics with regex support.",
              "example": "",
              "customType": "map<string, string>",
              "schema": []
            },
            {
              "name": "customerTags",
              "kind": "optional",
              "type": "map",
              "description": "Required customer tag criteria identifying customers eligible for partner discounts.",
              "example": "",
              "customType": "map<string, string>",
              "schema": []
            },
            {
              "name": "isHidden",
              "kind": "optional",
              "type": "boolean",
              "description": "Controls partner discount visibility in customer interfaces and billing communications.",
              "example": ""
            },
            {
              "name": "discount",
              "kind": "optional",
              "type": "number",
              "description": "Fixed monetary amount deducted from product item charges in account currency.",
              "example": ""
            },
            {
              "name": "totalMaxDiscount",
              "kind": "optional",
              "type": "number",
              "description": "Optional maximum total discount amount across all billing periods.",
              "example": ""
            },
            {
              "name": "targetProductItemId",
              "kind": "optional",
              "type": "string",
              "description": "Identifier of the specific product item receiving partner discount benefits.",
              "example": ""
            },
            {
              "name": "isRegEx",
              "kind": "optional",
              "type": "boolean",
              "description": "Enables regular expression matching for dimension constraint values in discount targeting.",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.promotions.pre_created.ProductItemAbsolutePartnerDiscount.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Product item absolute partner discount successfully created",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Response format for successfully created or updated product item-level partner discount promotions. Returns the complete item-specific promotion configuration including system timestamps and administrative metadata for tracking granular partner program effectiveness and specialized service incentives.",
            "customType": "payment.pricing.promotions.pre_created.ProductItemAbsolutePartnerDiscount.out",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier for the product item partner discount promotion instance within your account pricing configuration.",
                "example": ""
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "description": "Fixed promotion type identifier confirming this is an item-level absolute partner discount promotion targeting specific billable components.",
                "example": "",
                "default": "product_item_absolute_partner_discount"
              },
              {
                "name": "promotionName",
                "kind": "required",
                "type": "string",
                "description": "Human-readable display name for the item-level partner discount promotion shown in billing interfaces and reports.",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Optional detailed explanation of the partner discount promotion's purpose and targeted item-level business context for internal reference.",
                "example": ""
              },
              {
                "name": "lockingStatus",
                "kind": "optional",
                "type": "string",
                "description": "Current administrative lock state indicating whether the item-level partner discount promotion can be modified or deleted.",
                "modelRef": "#/components/schemas/common.LockingStatus.in",
                "customType": "common.LockingStatus.in",
                "schema": []
              },
              {
                "name": "lastUpdateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Unix timestamp in milliseconds when the item-level partner discount promotion was last modified or created.",
                "example": 0
              },
              {
                "name": "dimensionConstraintMap",
                "kind": "optional",
                "type": "map",
                "description": "Active dimension filters restricting when the item discount applies based on usage characteristics, geographic regions, or metadata attributes.",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "customerTags",
                "kind": "optional",
                "type": "map",
                "description": "Key-value pairs identifying customers eligible for item-level partner discounts based on their channel source or technical certification status.",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "isHidden",
                "kind": "optional",
                "type": "boolean",
                "description": "Visibility setting controlling whether the item-level partner discount promotion appears in customer-facing billing statements and invoice line items.",
                "example": ""
              },
              {
                "name": "discount",
                "kind": "optional",
                "type": "number",
                "description": "Fixed monetary amount that will be deducted from individual product item charges when partner discount targeting conditions are met.",
                "example": ""
              },
              {
                "name": "totalMaxDiscount",
                "kind": "optional",
                "type": "number",
                "description": "Maximum cumulative discount amount applicable across multiple billing cycles for this specific product item and partner customer relationship.",
                "example": ""
              },
              {
                "name": "targetProductItemId",
                "kind": "optional",
                "type": "string",
                "description": "Specific product item identifier that this partner discount promotion applies to within your account's billable component structure.",
                "example": ""
              },
              {
                "name": "isRegEx",
                "kind": "optional",
                "type": "boolean",
                "description": "Whether to use regular expression pattern matching for dimension constraint values, enabling flexible filtering rules for item targeting.",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.promotions.pre_created.ProductItemAbsolutePartnerDiscount.out",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request - invalid item targeting or partner program configuration",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Product item not found or not available for partner programs",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "409",
        "description": "Conflict - partner discount conflicts with existing item-level partner agreements",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "GvWMLfSYbrhA0_z3bKrsd",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/product_item_absolute_partner_discount \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"id\": \"\",\n     \"type\": \"product_item_absolute_partner_discount\",\n     \"promotionName\": \"\"\n     }'"
        },
        {
          "id": "xiahwDC__HJMRAf7Yq71o",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"id\": \"\",\n   \"type\": \"product_item_absolute_partner_discount\",\n   \"promotionName\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/product_item_absolute_partner_discount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "dHb7hRQfQHIjyOTiC8SD6",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/product_item_absolute_partner_discount\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"id\": \"\",\n   \"type\": \"product_item_absolute_partner_discount\",\n   \"promotionName\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "tmwZFI68ol9d7JcfDlMjQ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/promotions/product_item_absolute_partner_discount\"\n\npayload = json.dumps({\n   \"id\": \"\",\n   \"type\": \"product_item_absolute_partner_discount\",\n   \"promotionName\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "GvWMLfSYbrhA0_z3bKrsd"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Product item absolute partner discount successfully created\n{\n  \"id\": \"\",\n  \"type\": \"\",\n  \"promotionName\": \"\",\n  \"description\": \"\",\n  \"lockingStatus\": \"\",\n  \"lastUpdateTimeInMillis\": \"\",\n  \"dimensionConstraintMap\": \"\",\n  \"customerTags\": \"\",\n  \"isHidden\": false,\n  \"discount\": 0,\n  \"totalMaxDiscount\": 0,\n  \"targetProductItemId\": \"\",\n  \"isRegEx\": false\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad request - invalid item targeting or partner program configuration\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Product item not found or not available for partner programs\n"
        },
        {
          "id": "response-3-409",
          "language": "409",
          "code": "// Conflict - partner discount conflicts with existing item-level partner agreements\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}