---
updatedAt: 2026-05-20T09:37:17.000Z
agentTools:
  projectIndex: https://dev.gotom.io/llms.txt
---

# Update the flight

Update the flight. All the properties are optional, only the supplied properties are changed.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "4.4.12",
    "title": "Campaign API"
  },
  "x-explorer-enabled": false,
  "paths": {
    "/app-api/campaign/{campaignExternalId}/flight/{flightExternalId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ParamCampaignExternalId"
        },
        {
          "$ref": "#/components/parameters/ParamFlightExternalId"
        }
      ],
      "post": {
        "tags": [
          "CampaignFlight"
        ],
        "summary": "Update the flight",
        "description": "Update the flight. All the properties are optional, only the supplied properties are changed.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlightUpdate"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Flight has been updated"
          },
          "400": {
            "description": "Returns a list of errors in the input data. For this call the following violation codes can be expected\n * `5658b9ca-ce50-4a98-a0da-97d9361845e3` - An invalid ID field has been given (for example the `platformId`\n   in the customer object could not be found), here you have to refer to the `propertyPath` value to\n   find out which property caused the error\n * `e3a1d7f7-4fcf-4b7d-8d87-38a60126462f` - The combination of `platformId`, `channelId` and `advertisingId` does not exist\n * `409d70bf-376e-4a21-a8d0-f75a4a6a7abc` - There is no price entry found for the combination of `platformId`, `channelId`, `advertisingId`, `tarifId`, `extraPriceLevelId` and `priceTypeId` does not exist\n * `24a9375a-0b22-4676-9a29-9c9e7f2c195f` - The adServerId provided in the KeyValueSet is invalid\n"
          },
          "404": {
            "description": "The campaign does not exist"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerErrorDefault"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FlightUpdate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Flight"
          },
          {
            "type": "object",
            "properties": {
              "adServerPushChanges": {
                "type": "object",
                "properties": {
                  "adServerId": {
                    "type": "string"
                  },
                  "types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "runtime",
                        "units",
                        "other",
                        "placements"
                      ]
                    }
                  },
                  "remarks": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ]
      },
      "Flight": {
        "description": "A goTom Flight",
        "type": "object",
        "properties": {
          "runtime": {
            "type": "object",
            "description": "Start and Enddate of the flight",
            "properties": {
              "start": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/DateTimeComponents"
                  }
                ]
              },
              "end": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/DateTimeComponents"
                  }
                ]
              }
            }
          },
          "tarifId": {
            "description": "Corresponds with the field \"Tarif\"",
            "type": "integer"
          },
          "mediaId": {
            "description": "Corresponds with the field \"Medium\"",
            "type": "integer"
          },
          "extraPriceLevelId": {
            "description": "Corresponds with the field \"Extra Preis Ebene\"",
            "type": "integer"
          },
          "platformId": {
            "description": "Corresponds with the field \"Platform\"",
            "type": "integer"
          },
          "channelId": {
            "description": "Corresponds with the field \"Channel\"",
            "type": "integer"
          },
          "advertisingId": {
            "description": "Corresponds with the field \"Werbemittel\"",
            "type": "integer"
          },
          "priceTypeId": {
            "description": "Corresponds with the field \"Preistyp\"",
            "type": "integer"
          },
          "flightPositionTypeName": {
            "description": "The `flightPositionTypeName`, which can be retrieved via the primary key endpoint.\nNote that even when this value is set to `null`, the application may use a default value, as shown in the primary key endpoint.\n\nIf no value is set, the read response will include the default `flightPositionTypeName`.\nTherefore, setting this field to `null` causes the flight to fall back to the default value.\n",
            "type": "string",
            "nullable": true
          },
          "units": {
            "description": "Corresponds with the field \"Anzahl Einheiten\"",
            "type": "integer"
          },
          "bruttoPriceUnit": {
            "description": "Corresponds with the field \"Finaler Bruttopreis Einheit\". \nCan be a number (ie 15.20), or the string \"loadFromRate\" (will autoload the price from the rate sheet). \nCan be omitted when updating a flight (existing bruttoPriceUnit will stay the same)\n",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "advertisingStatus": {
            "description": "Corresponds with the field \"WM Status\"",
            "type": "string",
            "enum": [
              "open",
              "received",
              "integrated"
            ]
          },
          "note": {
            "description": "Corresponds with the field \"Bemerkungen\"",
            "type": "string"
          },
          "noteInternal": {
            "description": "Corresponds with the field \"Interne Bemerkungen\"",
            "type": "string"
          },
          "noteBilling": {
            "description": "Corresponds with the field \"Faktura Bemerkungen\"",
            "type": "string"
          },
          "adServerId": {
            "description": "Corresponds with the field \"AdServer\"",
            "type": "string"
          },
          "keyValueSets": {
            "description": "Corresponds with the field \"Targeting Configuration -> Key / Values\"",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValueSet"
            }
          },
          "geoTargetingByZip": {
            "description": "Corresponds with the field \"Targeting Configuration -> Geo Targeting -> PLZ\"",
            "type": "object",
            "properties": {
              "countryId": {
                "type": "string",
                "enum": [
                  "US",
                  "CA",
                  "DE",
                  "FR",
                  "GB",
                  "IN"
                ]
              },
              "zipCodes": {
                "description": "Comma separated list of zip codes",
                "type": "string"
              }
            }
          },
          "flightTags": {
            "description": "Tags of the flight. Corresponds with the \"Flight Tags\" Field in the UI of the \"Umsatzarten\" / \"Revenue Types\" campaign view When creating/updating only the array with IDs are expected, send null or an empty array to clear the tags on update.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "keyValueSetsXandr": {
            "description": "Xandr key-value targeting result set. Used for both read and write operations.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValueResultXandr"
            }
          }
        }
      },
      "DateTimeComponents": {
        "description": "Represents date and time (timezone is implicitly always the \"system timezone\" of goTom)",
        "required": [
          "date"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "description": "Time without seconds in the format HH:MM",
            "type": "string",
            "example": "12:34",
            "pattern": "^\\d{2}:\\d{2}$"
          }
        }
      },
      "KeyValueResultXandr": {
        "description": "Corresponds with the field \"Targeting Configuration -> Key /values\". Use this part only for Xandr flights. The values are only active if the adServerId on the flight matches this adServerId.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "adServerId",
          "keyValueSets"
        ],
        "properties": {
          "adServerId": {
            "description": "Ad server identifier for Xandr e.g. the goTom xandr Strategy identifier. The values are only active if the adServerId on the flight matches this adServerId.",
            "type": "string",
            "example": "xandr1"
          },
          "keyValueSets": {
            "description": "Array of key-value set groups",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/KeyValueSetXandr"
            }
          },
          "outerOp": {
            "description": "Outer logical operator combining key-value set groups. So e.g. outerOp = AND means (set1Value1 OR set1Value2) AND (set2Value2 OR set2Value2) AND... different example is e.g. outerOp = OR means innerOp AND e.g. (set1Value1 AND set1Value2) OR (set2Value2 AND set2Value2) OR...",
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ],
            "default": "AND"
          },
          "innerOp": {
            "description": "Inner logical operator combining keys within a set (inverse of outerOp).",
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ],
            "default": "OR"
          }
        }
      },
      "KeyValueSetXandr": {
        "description": "A set of Xandr key-value definitions",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "set"
        ],
        "properties": {
          "set": {
            "description": "Array of key-value definitions (string or numeric)",
            "type": "array",
            "minItems": 1,
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/KeyValueXandr"
                },
                {
                  "$ref": "#/components/schemas/KeyValueXandrNumeric"
                }
              ]
            }
          }
        }
      },
      "KeyValueXandr": {
        "description": "Xandr string key-value definition",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "values"
        ],
        "properties": {
          "id": {
            "description": "Key identifier",
            "type": "string",
            "example": "39746"
          },
          "name": {
            "description": "Key name",
            "type": "string",
            "example": "Foobar"
          },
          "displayName": {
            "description": "Display name for the key",
            "type": "string",
            "example": "Barfoo"
          },
          "values": {
            "description": "Array of key-value pairs",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/KeyValueValueXandr"
            }
          },
          "comparisonOperator": {
            "description": "Comparison operator. '0' = equals, '1' = not equals",
            "type": "string",
            "enum": [
              "0",
              "1"
            ],
            "default": "0"
          },
          "not": {
            "description": "Negate the key-value match",
            "type": "boolean",
            "default": false
          }
        }
      },
      "KeyValueXandrNumeric": {
        "description": "Xandr numeric key-value definition",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "description": "Key identifier",
            "type": "string",
            "example": "2571139747"
          },
          "name": {
            "description": "Key name",
            "type": "string",
            "example": "Foobaz"
          },
          "displayName": {
            "description": "Display name for the key",
            "type": "string",
            "example": "Bazfoo"
          },
          "numericValue": {
            "description": "Numeric value for the key",
            "type": "string",
            "example": "6"
          },
          "comparisonOperator": {
            "description": "Comparison operator for numeric values.\n * '2' = bigger or equals\n * '3' = smaller or equals\n * '4' = exists\n * '6' = bigger\n * '7' = smaller\n",
            "type": "string",
            "enum": [
              "2",
              "3",
              "4",
              "6",
              "7"
            ],
            "default": "2"
          },
          "not": {
            "description": "Negate the key-value match",
            "type": "boolean",
            "default": false
          }
        }
      },
      "KeyValueValueXandr": {
        "description": "Individual Xandr key-value entry",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "description": "Value identifier",
            "type": "string",
            "example": "48228166"
          },
          "name": {
            "description": "Value name",
            "type": "string",
            "example": "baz"
          },
          "displayName": {
            "description": "Display name for the value",
            "type": "string",
            "example": ""
          }
        }
      },
      "InternalServerErrorResponse": {
        "properties": {
          "message": {
            "type": "string",
            "example": "Internal Server Error"
          }
        }
      },
      "KeyValueSet": {
        "description": "Corresponds with the field \"Targeting Configuration -> Key /values\". Only available with Google Ad Manager",
        "properties": {
          "adServerId": {
            "type": "string"
          },
          "keyValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValue"
            }
          }
        }
      },
      "KeyValue": {
        "properties": {
          "id": {
            "description": "AdServer Id of KeyValue or \"audiencesegment\" for an Audience Segment",
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "comparisonOperator": {
            "description": "0 = equal, 1 = unequal",
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValueValue"
            }
          }
        }
      },
      "KeyValueValue": {
        "properties": {
          "id": {
            "description": "AdServer Id of KeyValue/Audience Segment Value or \"custom_{value}\" for freetext values. For example the freetext value \"15\" has to be \"custom_15\"",
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      }
    },
    "parameters": {
      "ParamCampaignExternalId": {
        "in": "path",
        "name": "campaignExternalId",
        "schema": {
          "type": "string"
        },
        "required": true,
        "example": "example-campaign",
        "description": "External ID of a campaign. See: [Good and Bad External IDs](/docs/good-and-bad-external-ids)"
      },
      "ParamFlightExternalId": {
        "in": "path",
        "name": "flightExternalId",
        "example": "example-flight",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "External ID of a flight. See: [Good and Bad External IDs](/docs/good-and-bad-external-ids)"
      }
    },
    "responses": {
      "InternalServerErrorDefault": {
        "description": "If your request broke our code. Send us your request-document to reproduce the error and we'll fix it.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InternalServerErrorResponse"
            }
          }
        }
      }
    }
  }
}
```