{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mobilitydata/json-schema/mobilitydata-update-request-gtfs-feed-schema.json",
  "title": "UpdateRequestGtfsFeed",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/operationsapi.yaml#/components/schemas/UpdateRequestGtfsFeed",
  "x-operation": true,
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier used as a key for the feeds table.",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/FeedStatus"
    },
    "external_ids": {
      "$ref": "#/$defs/ExternalIds"
    },
    "provider": {
      "description": "A commonly used name for the transit provider included in the feed.",
      "type": "string"
    },
    "feed_name": {
      "description": "An optional description of the data feed, e.g to specify if the data feed is an aggregate of multiple providers, or which network is represented by the feed.\n",
      "type": "string"
    },
    "note": {
      "description": "A note to clarify complex use cases for consumers.",
      "type": "string"
    },
    "feed_contact_email": {
      "description": "Use to contact the feed producer.",
      "type": "string"
    },
    "source_info": {
      "$ref": "#/$defs/SourceInfo"
    },
    "redirects": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Redirect"
      }
    },
    "operational_status": {
      "type": "string",
      "enum": [
        "wip",
        "published",
        "unpublished"
      ],
      "description": "Current operational status of the feed. Omit this field to leave the stored value unchanged; send a value to set it explicitly. Mirrors the `operational_status` returned by the feed GET endpoints, so a response can be sent straight back as an update with no change detected.\n"
    },
    "official": {
      "type": "boolean",
      "description": "Whether this is an official feed."
    },
    "seasonal": {
      "type": "boolean",
      "description": "Whether the feed is seasonal, i.e. it only provides service during recurring periods of the year (for example a summer-only or winter-only service). Omit this field to leave the stored value unchanged; send true or false to set it explicitly.\n"
    },
    "propagate_license": {
      "type": "boolean",
      "default": false,
      "description": "When true, after the feed is updated, propagate its license_id to all other feeds sharing the same normalized license_url where license_id is currently unset.\n"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "$defs": {
    "ExternalId": {
      "type": "object",
      "properties": {
        "external_id": {
          "description": "The ID that can be used to find the feed data in an external or legacy database.\n<ul>\n  <li><b>JBDA</b>: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda-<organisation_id>-<feed_id>.</li>\n  <li><b>TDG</b>: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-<resource_id>.</li>\n  <li><b>NTD</b>: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-<ntd_id>.</li>\n  <li><b>TransitFeeds</b>: Automatically imported from old TransitFeeds website. Pattern is tfs-<feed_id>.</li>\n  <li><b>Transit.land</b>: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-<feed_id>.</li>\n</ul>\n",
          "type": "string"
        },
        "source": {
          "description": "The source of the external ID, e.g. the name of the database where the external ID can be used.",
          "type": "string"
        }
      }
    },
    "ExternalIds": {
      "type": "array",
      "description": "The ID that can be use to find the feed data in an external or legacy database.\n<ul>\n  <li><b>JBDA</b>: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda-<organisation_id>-<feed_id>.</li>\n  <li><b>TDG</b>: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-<resource_id>.</li>\n  <li><b>NTD</b>: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-<ntd_id>.</li>\n  <li><b>TransitFeeds</b>: Automatically imported from old TransitFeeds website. Pattern is tfs-<feed_id>.</li>\n  <li><b>Transit.land</b>: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-<feed_id>.</li>\n</ul>\n",
      "items": {
        "$ref": "#/$defs/ExternalId"
      }
    },
    "FeedStatus": {
      "x-operation": true,
      "description": "Describes status of the Feed. Should be one of\n  * `active` Feed should be used in public trip planners.\n  * `deprecated` Feed is explicitly deprecated and should not be used in public trip planners.\n  * `inactive` Feed hasn't been recently updated and should be used at risk of providing outdated information.\n  * `development` Feed is being used for development purposes and should not be used in public trip planners.\n  * `future` Feed is not yet active but will be in the future.\n",
      "type": "string",
      "enum": [
        "active",
        "deprecated",
        "inactive",
        "development",
        "future"
      ]
    },
    "Redirect": {
      "type": "object",
      "properties": {
        "target_id": {
          "description": "The feed ID that should be used in replacement of the current one.",
          "type": "string"
        },
        "comment": {
          "description": "A comment explaining the redirect.",
          "type": "string"
        }
      }
    },
    "SourceInfo": {
      "type": "object",
      "properties": {
        "producer_url": {
          "description": "URL where the producer is providing the dataset. Refer to the authentication information to know how to access this URL.\n",
          "type": "string",
          "format": "url"
        },
        "is_producer_url_unstable": {
          "description": "Indicates whether the `producer_url` is known to be unstable, i.e. it changes over time. This may be because the URL contains a date/time, or because the transit provider has communicated that it is not permanent (e.g. it is updated monthly).\n  * true - The producer URL is unstable and changes over time.\n  * false - The producer URL is stable and unchanging over time.\n  * null (default) - There is not enough information to determine the stability of the producer URL.\n",
          "type": [
            "boolean",
            "null"
          ]
        },
        "authentication_type": {
          "description": "Defines the type of authentication required to access the `producer_url`. Valid values for this field are:\n  * 0 or (empty) - No authentication required.\n  * 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information.\n  * 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request.\nWhen not provided, the authentication type is assumed to be 0.\n",
          "type": "integer",
          "enum": [
            0,
            1,
            2
          ]
        },
        "authentication_info_url": {
          "description": "Contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created.  This field is required for `authentication_type=1` and `authentication_type=2`.\n",
          "type": "string",
          "format": "url"
        },
        "api_key_parameter_name": {
          "type": "string",
          "description": "Defines the name of the parameter to pass in the URL to provide the API key. This field is required for `authentication_type=1` and `authentication_type=2`.\n"
        },
        "license_url": {
          "description": "A URL where to find the license for the feed.",
          "type": "string",
          "format": "url"
        },
        "license_id": {
          "description": "Id of the feed license that can be used to query the license endpoint.",
          "type": "string"
        },
        "license_is_spdx": {
          "description": "true if the license is SPDX. false if not.",
          "type": "boolean"
        },
        "license_notes": {
          "description": "Notes concerning the relation between the feed and the license.",
          "type": "string"
        },
        "license_tags": {
          "description": "List of taxonomy tags associated with the feed's license.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}