---
title: Update the sales objectives
slug: amberflo-api/update-the-sales-objectives
docTags: 
createdAt: 2024-11-07T15:10:16.968Z
---

{
  "id": "t_cBEOrpqcPelnOWLrk8S",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/bizops/goals",
    "servers": [
      {
        "url": "https://app.amberflo.io/bizops/goals"
      }
    ],
    "name": "Update the sales objectives",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "com.amberflo.bizops.core.definition.GameDefinition.in",
          "schema": [
            {
              "name": "key",
              "kind": "optional",
              "type": "object",
              "description": "The game definition key",
              "modelRef": "#/components/schemas/com.amberflo.bizops.core.GameKey.in",
              "customType": "com.amberflo.bizops.core.GameKey.in",
              "schema": [
                {
                  "name": "accountId",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "customerId",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "gameType",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                }
              ]
            },
            {
              "name": "levels",
              "kind": "optional",
              "type": "array",
              "description": "Game level keys",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "lifecycleStages",
              "kind": "optional",
              "type": "array",
              "description": "Life cycle stage",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "levelDetailsMap",
              "kind": "optional",
              "type": "map",
              "description": "Game level metadata",
              "example": "",
              "customType": "map<string, com.amberflo.bizops.core.GameLevel.in>",
              "schema": []
            },
            {
              "name": "startingLevel",
              "kind": "optional",
              "type": "string",
              "description": "The starting level",
              "example": ""
            },
            {
              "name": "wonLifeCycle",
              "kind": "optional",
              "type": "string",
              "description": "The state we move the game when it has been completed successfully",
              "example": ""
            },
            {
              "name": "lostLifeCycle",
              "kind": "optional",
              "type": "string",
              "description": "The state we move the game when a level has been lost",
              "example": ""
            },
            {
              "name": "levelDefinitionsMap",
              "kind": "optional",
              "type": "map",
              "description": "Sales goals at each game level",
              "example": "",
              "customType": "map<string, com.amberflo.bizops.core.definition.LevelDefinition.in>",
              "schema": []
            },
            {
              "name": "revision",
              "kind": "optional",
              "type": "integer<int64>",
              "description": "Schema revision version",
              "example": 0
            },
            {
              "name": "modifiedUserId",
              "kind": "optional",
              "type": "string",
              "description": "User who modified the sales goals",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/com.amberflo.bizops.core.definition.GameDefinition.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.definition.GameDefinition.out",
            "schema": [
              {
                "name": "key",
                "kind": "optional",
                "type": "object",
                "description": "The game definition key",
                "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": "levels",
                "kind": "optional",
                "type": "array",
                "description": "Game level keys",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "lifecycleStages",
                "kind": "optional",
                "type": "array",
                "description": "Life cycle stage",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "levelDetailsMap",
                "kind": "optional",
                "type": "map",
                "description": "Game level metadata",
                "example": "",
                "customType": "map<string, com.amberflo.bizops.core.GameLevel.out>",
                "schema": []
              },
              {
                "name": "startingLevel",
                "kind": "optional",
                "type": "string",
                "description": "The starting level",
                "example": ""
              },
              {
                "name": "wonLifeCycle",
                "kind": "optional",
                "type": "string",
                "description": "The state we move the game when it has been completed successfully",
                "example": ""
              },
              {
                "name": "lostLifeCycle",
                "kind": "optional",
                "type": "string",
                "description": "The state we move the game when a level has been lost",
                "example": ""
              },
              {
                "name": "levelDefinitionsMap",
                "kind": "optional",
                "type": "map",
                "description": "Sales goals at each game level",
                "example": "",
                "customType": "map<string, com.amberflo.bizops.core.definition.LevelDefinition.out>",
                "schema": []
              },
              {
                "name": "revision",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Schema revision version",
                "example": 0
              },
              {
                "name": "modifiedUserId",
                "kind": "optional",
                "type": "string",
                "description": "User who modified the sales goals",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/com.amberflo.bizops.core.definition.GameDefinition.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "xEWIKsEciJnuyeXaZDtyq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/bizops/goals \\\n     --header 'accept: application/json'"
        },
        {
          "id": "tmG4_Jb8KeoO_43uU4IIw",
          "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/goals\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "1oq7XDrGdQX6nVw7gg8ul",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/bizops/goals\")\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": "UhYRhQWFDTMpashx8NNL2",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/bizops/goals\"\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": "xEWIKsEciJnuyeXaZDtyq"
    },
    "results": {
      "languages": [
        {
          "id": "nQNMoR_eplKteE_mRgVfX",
          "language": "200",
          "code": "// Successful request\n{\n  \"key\": {\n    \"accountId\": \"\",\n    \"customerId\": \"\",\n    \"gameType\": \"\"\n  },\n  \"levels\": [\n    \"\"\n  ],\n  \"lifecycleStages\": [\n    \"\"\n  ],\n  \"levelDetailsMap\": \"\",\n  \"startingLevel\": \"\",\n  \"wonLifeCycle\": \"\",\n  \"lostLifeCycle\": \"\",\n  \"levelDefinitionsMap\": \"\",\n  \"revision\": \"\",\n  \"modifiedUserId\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "nQNMoR_eplKteE_mRgVfX"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}