---
title: /bizops/extend-duration
slug: amberflo-api/bizopsextend-duration
docTags: 
createdAt: 2024-11-07T15:10:16.968Z
---

{
  "id": "Ci5Ig9Ow3wORaU81U_EkK",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/bizops/extend-duration",
    "servers": [
      {
        "url": "https://app.amberflo.io/bizops/extend-duration"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "com.amberflo.bizops.core.state.GameExtensionRequest.in",
          "schema": [
            {
              "name": "customerId",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "gameName",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "extensionReason",
              "kind": "optional",
              "type": "string",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/com.amberflo.bizops.core.state.GameExtensionRequest.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": "",
            "customType": "com.amberflo.bizops.core.state.GameState.out",
            "schema": [
              {
                "name": "definitionRevision",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "key",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/com.amberflo.bizops.core.GameKey.out",
                "customType": "com.amberflo.bizops.core.GameKey.out",
                "schema": [
                  {
                    "name": "accountId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "customerId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "gameType",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ]
              },
              {
                "name": "currentLevel",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/com.amberflo.bizops.core.state.LevelState.out",
                "customType": "com.amberflo.bizops.core.state.LevelState.out",
                "schema": [
                  {
                    "name": "level",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "gameScore",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, com.amberflo.bizops.core.state.Action.out>",
                    "schema": []
                  },
                  {
                    "name": "levelDuration",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/common.TimeRange.out",
                    "customType": "common.TimeRange.out",
                    "schema": [
                      {
                        "name": "startTimeInSeconds",
                        "kind": "required",
                        "type": "integer<int64>",
                        "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                        "example": 0
                      },
                      {
                        "name": "endTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "extensions",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "customerId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "timeProgressionTotalScore",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, number>",
                    "schema": []
                  },
                  {
                    "name": "rawTotalScore",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, number>",
                    "schema": []
                  },
                  {
                    "name": "rawBucketedScore",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, com.amberflo.bizops.core.state.ScoreProgress.out>",
                    "schema": []
                  },
                  {
                    "name": "timeProgressionBucketedScore",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, com.amberflo.bizops.core.state.ScoreProgress.out>",
                    "schema": []
                  },
                  {
                    "name": "milestonesTimeInSecondsMap",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, integer>",
                    "schema": []
                  },
                  {
                    "name": "gameCustomerId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "activityMap",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, com.amberflo.bizops.core.state.Activity.out>",
                    "schema": []
                  },
                  {
                    "name": "scores",
                    "kind": "optional",
                    "type": "map",
                    "example": "",
                    "customType": "map<string, com.amberflo.bizops.core.score.state.BaseScore.out>",
                    "schema": []
                  }
                ]
              },
              {
                "name": "previousLevels",
                "kind": "optional",
                "type": "map",
                "example": "",
                "customType": "map<string, com.amberflo.bizops.core.state.LevelState.out>",
                "schema": []
              },
              {
                "name": "metadata",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/com.amberflo.bizops.core.state.Metadata.out",
                "customType": "com.amberflo.bizops.core.state.Metadata.out",
                "schema": [
                  {
                    "name": "customerName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "customerEmail",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "lifecycleStage",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "gameCustomerId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "lastUpdatedTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "dealSize",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "signupTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "salesType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/com.amberflo.bizops.core.state.SalesType.out",
                    "customType": "com.amberflo.bizops.core.state.SalesType.out",
                    "schema": []
                  },
                  {
                    "name": "latestActivityTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "engagementScore",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "gameName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "gameDuration",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/common.TimeRange.out",
                    "customType": "common.TimeRange.out",
                    "schema": [
                      {
                        "name": "startTimeInSeconds",
                        "kind": "required",
                        "type": "integer<int64>",
                        "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                        "example": 0
                      },
                      {
                        "name": "endTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "accountManagerId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "notes",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "lostMetadata",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/com.amberflo.bizops.core.state.LostMetadata.out",
                    "customType": "com.amberflo.bizops.core.state.LostMetadata.out",
                    "schema": [
                      {
                        "name": "reasonLost",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "modelRef": "#/components/schemas/com.amberflo.bizops.core.state.ReasonLost.out",
                        "customType": "com.amberflo.bizops.core.state.ReasonLost.out",
                        "schema": []
                      },
                      {
                        "name": "competitors",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "missingFeatures",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "lostNotes",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/com.amberflo.bizops.core.state.GameState.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "KNVZVvYLKAlsh6kyRlL7w",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/bizops/extend-duration \\\n     --header 'accept: application/json'"
        },
        {
          "id": "1SsziPYM8VQsk7YSpyHsx",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/bizops/extend-duration\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "xXVi5MlkbzWAYhvWbkp2a",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/bizops/extend-duration\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "4tavOgKRalPQrHqZaRe9l",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/bizops/extend-duration\"\n\npayload = {}\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": "KNVZVvYLKAlsh6kyRlL7w"
    },
    "results": {
      "languages": [
        {
          "id": "6Ndgk44GM5HDrIt9c_Yw_",
          "language": "200",
          "code": "// Successful request\n{\n  \"definitionRevision\": \"\",\n  \"key\": {\n    \"accountId\": \"\",\n    \"customerId\": \"\",\n    \"gameType\": \"\"\n  },\n  \"currentLevel\": {\n    \"level\": \"\",\n    \"gameScore\": \"\",\n    \"levelDuration\": {\n      \"startTimeInSeconds\": \"\",\n      \"endTimeInSeconds\": \"\"\n    },\n    \"extensions\": \"\",\n    \"customerId\": \"\",\n    \"timeProgressionTotalScore\": \"\",\n    \"rawTotalScore\": \"\",\n    \"rawBucketedScore\": \"\",\n    \"timeProgressionBucketedScore\": \"\",\n    \"milestonesTimeInSecondsMap\": \"\",\n    \"gameCustomerId\": \"\",\n    \"activityMap\": \"\",\n    \"scores\": \"\"\n  },\n  \"previousLevels\": \"\",\n  \"metadata\": {\n    \"customerName\": \"\",\n    \"customerEmail\": \"\",\n    \"lifecycleStage\": \"\",\n    \"gameCustomerId\": \"\",\n    \"lastUpdatedTimeInSeconds\": \"\",\n    \"dealSize\": 0,\n    \"signupTimeInSeconds\": \"\",\n    \"salesType\": \"\",\n    \"latestActivityTimeInSeconds\": \"\",\n    \"engagementScore\": 0,\n    \"gameName\": \"\",\n    \"gameDuration\": {\n      \"startTimeInSeconds\": \"\",\n      \"endTimeInSeconds\": \"\"\n    },\n    \"accountManagerId\": \"\",\n    \"notes\": [\n      \"\"\n    ],\n    \"lostMetadata\": {\n      \"reasonLost\": \"\",\n      \"competitors\": [\n        \"\"\n      ],\n      \"missingFeatures\": [\n        \"\"\n      ],\n      \"lostNotes\": [\n        \"\"\n      ]\n    }\n  }\n}"
        }
      ],
      "selectedLanguageId": "6Ndgk44GM5HDrIt9c_Yw_"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}