---
title: Create manual percentage-based allocation policy
slug: reference/create-manual-percentage-based-allocation-policy
docTags: 
createdAt: 2025-07-03T16:20:35.017Z
---

{
  "id": "vLnGHFkAXt9h1cYBmHTkq",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/business-unit/focus-allocation/manual",
    "servers": [
      {
        "url": "https://app.amberflo.io/business-unit/focus-allocation/manual"
      }
    ],
    "name": "Create manual percentage-based allocation policy",
    "description": "<p>Creates a new manual FOCUS allocation policy that distributes cloud costs to business units using fixed percentage rules.\nManual policies override automatic allocation and provide direct control over cost assignment for specific provider services.</p>\n<p>Required request body fields:</p>\n<ul>\n<li><code>provider</code>: Cloud provider for the policy (AWS, AZURE, GOOGLE_CLOUD)</li>\n<li><code>service</code>: Specific cloud service name for cost allocation scope</li>\n<li><code>policy</code>: Distribution rule containing business unit allocation percentages</li>\n<li><code>startTimeInSeconds</code>: Policy activation time in Unix timestamp seconds</li>\n</ul>\n<p>Optional request body fields:</p>\n<ul>\n<li><code>endTimeInSeconds</code>: Policy expiration time for time-bounded allocations</li>\n</ul>\n<p><strong>Important considerations:</strong></p>\n<ul>\n<li>Allocation percentages in policy must sum to 100.0 for complete cost distribution</li>\n<li>Policy takes precedence over automatic rules for the specified provider and service</li>\n<li>Business unit IDs in allocations must exist in the account's business unit registry</li>\n<li>Time periods cannot overlap with existing policies for same provider/service combination</li>\n</ul>\n<p>Returns created policy with system-generated timestamps and complete configuration.\nUse this endpoint to establish fixed cost distribution rules that bypass automatic allocation logic.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Input model for creating manual FOCUS allocation policies that distribute cloud costs to business units using fixed percentage rules overriding automatic allocation.",
          "customType": "business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.in",
          "schema": [
            {
              "name": "provider",
              "kind": "required",
              "type": "string",
              "description": "Cloud provider for cost allocation policy. Supported values include AWS, AZURE, GOOGLE_CLOUD for targeted service cost distribution.",
              "modelRef": "#/components/schemas/focus.common.FocusProvider.in",
              "customType": "focus.common.FocusProvider.in",
              "schema": []
            },
            {
              "name": "service",
              "kind": "required",
              "type": "string",
              "description": "Specific cloud service name for cost allocation scope. Defines service boundaries for manual percentage-based cost distribution rules.",
              "example": ""
            },
            {
              "name": "policy",
              "kind": "required",
              "type": "object",
              "description": "Distribution rule containing business unit allocation percentages. Defines how costs are divided among business units using fixed ratios.",
              "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.rules.SimpleDistributionRule.in",
              "customType": "business_unit.focus_allocation.manual.rules.SimpleDistributionRule.in",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Rule type identifier for simple distribution logic. Always set to 'simple_distribution' for percentage-based cost allocation rules.",
                  "example": "",
                  "default": "simple_distribution"
                },
                {
                  "name": "allocations",
                  "kind": "required",
                  "type": "map",
                  "description": "Map of business unit IDs to allocation percentages. Keys are business unit identifiers, values are decimal percentages totaling 100.0.",
                  "example": "",
                  "customType": "map<string, number>",
                  "schema": []
                }
              ]
            },
            {
              "name": "startTimeInSeconds",
              "kind": "required",
              "type": "integer<int64>",
              "description": "Policy activation timestamp in Unix seconds format. Defines when manual allocation rule begins applying to cloud service costs.",
              "example": 0
            },
            {
              "name": "endTimeInSeconds",
              "kind": "optional",
              "type": "integer<int64>",
              "description": "Policy expiration timestamp in Unix seconds format. Optional end time for time-bounded manual allocation rule application periods.",
              "example": 0
            }
          ],
          "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.in",
          "isExpanded": true
        }
      ],
      "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": "Complete manual FOCUS allocation policy configuration with system metadata for distributing cloud costs using fixed percentage rules that override automatic allocation.",
            "customType": "business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.out",
            "schema": [
              {
                "name": "provider",
                "kind": "required",
                "type": "string",
                "description": "Cloud provider for cost allocation policy. Supported values include AWS, AZURE, GOOGLE_CLOUD for targeted service cost distribution.",
                "modelRef": "#/components/schemas/focus.common.FocusProvider.out",
                "customType": "focus.common.FocusProvider.out",
                "schema": []
              },
              {
                "name": "service",
                "kind": "required",
                "type": "string",
                "description": "Specific cloud service name for cost allocation scope. Defines service boundaries for manual percentage-based cost distribution rules.",
                "example": ""
              },
              {
                "name": "policy",
                "kind": "required",
                "type": "object",
                "description": "Distribution rule containing business unit allocation percentages. Defines how costs are divided among business units using fixed ratios.",
                "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.rules.SimpleDistributionRule.out",
                "customType": "business_unit.focus_allocation.manual.rules.SimpleDistributionRule.out",
                "schema": [
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string",
                    "description": "Rule type identifier for simple distribution logic. Always set to 'simple_distribution' for percentage-based cost allocation rules.",
                    "example": "",
                    "default": "simple_distribution"
                  },
                  {
                    "name": "allocations",
                    "kind": "required",
                    "type": "map",
                    "description": "Map of business unit IDs to allocation percentages. Keys are business unit identifiers, values are decimal percentages totaling 100.0.",
                    "example": "",
                    "customType": "map<string, number>",
                    "schema": []
                  }
                ]
              },
              {
                "name": "startTimeInSeconds",
                "kind": "required",
                "type": "integer<int64>",
                "description": "Policy activation timestamp in Unix seconds format. Defines when manual allocation rule begins applying to cloud service costs.",
                "example": 0
              },
              {
                "name": "endTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Policy expiration timestamp in Unix seconds format. Optional end time for time-bounded manual allocation rule application periods.",
                "example": 0
              },
              {
                "name": "createTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Policy creation timestamp in Unix milliseconds format. Tracks when manual allocation policy was first established in system.",
                "example": 0
              },
              {
                "name": "updateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Policy modification timestamp in Unix milliseconds format. Tracks when manual allocation policy configuration was last changed.",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "FDpnMgY_wY0Zc22AzMZtK",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/business-unit/focus-allocation/manual \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"provider\": \"\",\n     \"service\": \"\",\n     \"policy\": {\n     \"type\": \"simple_distribution\",\n     \"allocations\": \"\"\n     },\n     \"startTimeInSeconds\": 0\n     }'"
        },
        {
          "id": "WonyxfFPvdcYX0SHOLzxu",
          "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   \"provider\": \"\",\n   \"service\": \"\",\n   \"policy\": {\n      \"type\": \"simple_distribution\",\n      \"allocations\": \"\"\n   },\n   \"startTimeInSeconds\": 0\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/business-unit/focus-allocation/manual\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "IbMufutEejtEYsIgMkzJI",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/business-unit/focus-allocation/manual\")\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   \"provider\": \"\",\n   \"service\": \"\",\n   \"policy\": {\n      \"type\": \"simple_distribution\",\n      \"allocations\": \"\"\n   },\n   \"startTimeInSeconds\": 0\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "geP-CJG5KoPGU2l-QpmzX",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/business-unit/focus-allocation/manual\"\n\npayload = json.dumps({\n   \"provider\": \"\",\n   \"service\": \"\",\n   \"policy\": {\n      \"type\": \"simple_distribution\",\n      \"allocations\": \"\"\n   },\n   \"startTimeInSeconds\": 0\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": "FDpnMgY_wY0Zc22AzMZtK"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"provider\": \"\",\n  \"service\": \"\",\n  \"policy\": {\n    \"type\": \"\",\n    \"allocations\": \"\"\n  },\n  \"startTimeInSeconds\": \"\",\n  \"endTimeInSeconds\": \"\",\n  \"createTimeInMillis\": \"\",\n  \"updateTimeInMillis\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": "",
      "id": "JMhQ8ELs0kKAeuMdSuslx"
    }
  ]
}