{
  "batchPath": "batch",
  "parameters": {
    "quotaUser": {
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query"
    },
    "$.xgafv": {
      "enum": [
        "1",
        "2"
      ],
      "type": "string",
      "location": "query",
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "default": "true",
      "location": "query"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string",
      "location": "query"
    },
    "key": {
      "location": "query",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "type": "string"
    },
    "callback": {
      "location": "query",
      "type": "string",
      "description": "JSONP"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "uploadType": {
      "location": "query",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string"
    },
    "alt": {
      "description": "Data format for response.",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query",
      "default": "json",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string",
      "location": "query"
    }
  },
  "title": "Merchant API",
  "id": "merchantapi:datasources_v1",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "baseUrl": "https://merchantapi.googleapis.com/",
  "version_module": true,
  "kind": "discovery#restDescription",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/content": {
          "description": "Manage your product listings and accounts for Google Shopping"
        }
      }
    }
  },
  "name": "merchantapi",
  "protocol": "rest",
  "schemas": {
    "FetchDataSourceRequest": {
      "type": "object",
      "description": "Request message for the FetchDataSource method.",
      "id": "FetchDataSourceRequest",
      "properties": {}
    },
    "ProductReviewDataSource": {
      "id": "ProductReviewDataSource",
      "properties": {},
      "type": "object",
      "description": "The product review data source."
    },
    "ProductChange": {
      "description": "The change that happened to the product including old value, new value, country code as the region code and reporting context.",
      "type": "object",
      "id": "ProductChange",
      "properties": {
        "oldValue": {
          "type": "string",
          "description": "The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)"
        },
        "newValue": {
          "type": "string",
          "description": "The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)"
        },
        "regionCode": {
          "type": "string",
          "description": "Countries that have the change (if applicable). Represented in the ISO 3166 format."
        },
        "reportingContext": {
          "description": "Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)",
          "enumDescriptions": [
            "Not specified.",
            "[Shopping ads](https://support.google.com/merchants/answer/6149970).",
            "Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and Demand Gen ads](https://support.google.com/merchants/answer/13389785).",
            "[Demand Gen ads](https://support.google.com/merchants/answer/13389785).",
            "[Demand Gen ads on Discover surface](https://support.google.com/merchants/answer/13389785).",
            "[Video ads](https://support.google.com/google-ads/answer/6340491).",
            "[Display ads](https://support.google.com/merchants/answer/6069387).",
            "[Local inventory ads](https://support.google.com/merchants/answer/3271956).",
            "[Vehicle inventory ads](https://support.google.com/merchants/answer/11544533).",
            "[Free product listings](https://support.google.com/merchants/answer/9199328).",
            "[Free product listings on UCP checkout](https://developers.google.com/merchant/ucp).",
            "[Free local product listings](https://support.google.com/merchants/answer/9825611).",
            "[Free local vehicle listings](https://support.google.com/merchants/answer/11544533).",
            "[Youtube Affiliate](https://support.google.com/youtube/answer/13376398).",
            "[YouTube Shopping](https://support.google.com/merchants/answer/13478370).",
            "[Cloud retail](https://cloud.google.com/solutions/retail).",
            "[Local cloud retail](https://cloud.google.com/solutions/retail).",
            "[Product Reviews](https://support.google.com/merchants/answer/14620732).",
            "[Merchant Reviews](https://developers.google.com/merchant-review-feeds).",
            "YouTube Checkout ."
          ],
          "enumDeprecated": [
            false,
            false,
            true,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false
          ],
          "type": "string",
          "enum": [
            "REPORTING_CONTEXT_ENUM_UNSPECIFIED",
            "SHOPPING_ADS",
            "DISCOVERY_ADS",
            "DEMAND_GEN_ADS",
            "DEMAND_GEN_ADS_DISCOVER_SURFACE",
            "VIDEO_ADS",
            "DISPLAY_ADS",
            "LOCAL_INVENTORY_ADS",
            "VEHICLE_INVENTORY_ADS",
            "FREE_LISTINGS",
            "FREE_LISTINGS_UCP_CHECKOUT",
            "FREE_LOCAL_LISTINGS",
            "FREE_LOCAL_VEHICLE_LISTINGS",
            "YOUTUBE_AFFILIATE",
            "YOUTUBE_SHOPPING",
            "CLOUD_RETAIL",
            "LOCAL_CLOUD_RETAIL",
            "PRODUCT_REVIEWS",
            "MERCHANT_REVIEWS",
            "YOUTUBE_CHECKOUT"
          ]
        }
      }
    },
    "DefaultRule": {
      "type": "object",
      "description": "Default rule management of the data source.",
      "id": "DefaultRule",
      "properties": {
        "takeFromDataSources": {
          "description": "Required. The list of data sources linked in the [default rule](https://support.google.com/merchants/answer/7450276). This list is ordered by the default rule priority of joining the data. It might include none or multiple references to `self` and supplemental data sources. The list must not be empty. To link the data source to the default rule, you need to add a new reference to this list (in sequential order). To unlink the data source from the default rule, you need to remove the given reference from this list. Changing the order of this list will result in changing the priority of data sources in the default rule. For example, providing the following list: [`1001`, `self`] will take attribute values from supplemental data source `1001`, and fallback to `self` if the attribute is not set in `1001`. Warning: The update (patch) and create call replaces the entire default rule setup. It doesn't work as an addition or append. If `self` is missing from the list of `take_from_data_sources`, the API will ignore attributes from the primary data source itself.",
          "type": "array",
          "items": {
            "$ref": "DataSourceReference"
          }
        }
      }
    },
    "FileInput": {
      "description": "The data specific for file data sources. This field is empty for other data source inputs.",
      "type": "object",
      "id": "FileInput",
      "properties": {
        "fileName": {
          "description": "Optional. The file name of the data source. Required for `UPLOAD` file input type.",
          "type": "string"
        },
        "fileInputType": {
          "enum": [
            "FILE_INPUT_TYPE_UNSPECIFIED",
            "UPLOAD",
            "FETCH",
            "GOOGLE_SHEETS"
          ],
          "readOnly": true,
          "type": "string",
          "description": "Output only. The type of file input.",
          "enumDescriptions": [
            "File input type unspecified.",
            "The file is uploaded through SFTP, Google Cloud Storage or manually in the Merchant Center.",
            "The file is fetched from the configured fetch_uri.",
            "The file is fetched from Google Sheets specified in the fetch_uri. However, you can't set up `GOOGLE_SHEETS` as a data source through the API. To add `GOOGLE_SHEETS` as a data source through the Merchant Center, see [Add products to Merchant Center](https://support.google.com/merchants/answer/12158053)."
          ]
        },
        "fetchSettings": {
          "description": "Optional. Fetch details to deliver the data source. It contains settings for `FETCH` and `GOOGLE_SHEETS` file input types. The required fields vary based on the frequency of fetching.",
          "$ref": "FetchSettings"
        }
      }
    },
    "Issue": {
      "type": "object",
      "description": "An error occurring in the data source, like \"invalid price\".",
      "id": "Issue",
      "properties": {
        "count": {
          "type": "string",
          "description": "Output only. The number of occurrences of the error in the file upload.",
          "readOnly": true,
          "format": "int64"
        },
        "severity": {
          "readOnly": true,
          "type": "string",
          "enum": [
            "SEVERITY_UNSPECIFIED",
            "WARNING",
            "ERROR"
          ],
          "description": "Output only. The severity of the issue.",
          "enumDescriptions": [
            "Severity unspecified.",
            "The issue is the warning.",
            "The issue is an error."
          ]
        },
        "title": {
          "description": "Output only. The title of the issue, for example, \"Item too big\".",
          "readOnly": true,
          "type": "string"
        },
        "description": {
          "description": "Output only. The error description, for example, \"Your data source contains items which have too many attributes, or are too big. These items will be dropped\".",
          "readOnly": true,
          "type": "string"
        },
        "code": {
          "description": "Output only. The code of the error, for example, \"validation/invalid_value\". Returns \"?\" if the code is unknown.",
          "readOnly": true,
          "type": "string"
        },
        "documentationUri": {
          "description": "Output only. Link to the documentation explaining the issue in more details, if available.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "Destination": {
      "description": "Destinations also known as [Marketing methods](https://support.google.com/merchants/answer/15130232) selections.",
      "type": "object",
      "id": "Destination",
      "properties": {
        "destination": {
          "type": "string",
          "description": "[Marketing methods](https://support.google.com/merchants/answer/15130232) (also known as destination) selections.",
          "enumDescriptions": [
            "Not specified.",
            "[Shopping ads](https://support.google.com/google-ads/answer/2454022).",
            "[Display ads](https://support.google.com/merchants/answer/6069387).",
            "[Local inventory ads](https://support.google.com/merchants/answer/3057972).",
            "[Free listings](https://support.google.com/merchants/answer/9199328).",
            "[Free local product listings](https://support.google.com/merchants/answer/9825611).",
            "[YouTube Shopping](https://support.google.com/merchants/answer/12362804).",
            "Youtube shopping checkout.",
            "[Youtube Affiliate](https://support.google.com/youtube/answer/13376398).",
            "[Free vehicle listings](https://support.google.com/merchants/answer/11189169).",
            "[Vehicle ads](https://support.google.com/merchants/answer/11189169).",
            "[Cloud retail](https://cloud.google.com/solutions/retail).",
            "[Local cloud retail](https://cloud.google.com/solutions/retail)."
          ],
          "enum": [
            "DESTINATION_ENUM_UNSPECIFIED",
            "SHOPPING_ADS",
            "DISPLAY_ADS",
            "LOCAL_INVENTORY_ADS",
            "FREE_LISTINGS",
            "FREE_LOCAL_LISTINGS",
            "YOUTUBE_SHOPPING",
            "YOUTUBE_SHOPPING_CHECKOUT",
            "YOUTUBE_AFFILIATE",
            "FREE_VEHICLE_LISTINGS",
            "VEHICLE_ADS",
            "CLOUD_RETAIL",
            "LOCAL_CLOUD_RETAIL"
          ]
        },
        "state": {
          "type": "string",
          "description": "The state of the destination.",
          "enumDescriptions": [
            "Not specified.",
            "Indicates that the destination is enabled.",
            "Indicates that the destination is disabled."
          ],
          "enum": [
            "STATE_UNSPECIFIED",
            "ENABLED",
            "DISABLED"
          ]
        }
      }
    },
    "PrimaryProductDataSource": {
      "type": "object",
      "description": "The primary data source for local and online products.",
      "id": "PrimaryProductDataSource",
      "properties": {
        "destinations": {
          "type": "array",
          "items": {
            "$ref": "Destination"
          },
          "description": "Optional. A list of destinations describing where products of the data source can be shown. When retrieving the data source, the list contains all the destinations that can be used for the data source, including the ones that are disabled for the data source but enabled for the account. Only destinations that are enabled on the account, for example through program participation, can be enabled on the data source. If unset, during creation, the destinations will be inherited based on the account level program participation. If set, during creation or update, the data source will be set only for the specified destinations. Updating this field requires at least one destination."
        },
        "countries": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. The countries where the items may be displayed. Represented as a [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)."
        },
        "legacyLocal": {
          "type": "boolean",
          "description": "Optional. Immutable. Determines whether the products of this data source are **only** targeting local destinations. Legacy local products are prefixed with `local~` in the product resource ID. For example, `accounts/123/products/local~en~US~sku123`."
        },
        "defaultRule": {
          "description": "Optional. Default rule management of the data source. If set, the linked data sources will be replaced. Warning: The update (patch) and create call replaces the entire default rule setup. It doesn't work as an addition or append. If `self` is missing from the list of `take_from_data_sources`, the API will ignore attributes from the primary data source itself.",
          "$ref": "DefaultRule"
        },
        "feedLabel": {
          "description": "Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). For more information about feed label, see [Create a primary data source for products](https://developers.google.com/merchant/api/guides/data-sources/api-sources#create-primary-data-source). `feedLabel` and `contentLanguage` must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.",
          "type": "string"
        },
        "contentLanguage": {
          "type": "string",
          "description": "Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source. `feedLabel` and `contentLanguage` must be either both set or unset. The fields can only be unset for data sources without file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction."
        }
      }
    },
    "FetchSettings": {
      "type": "object",
      "description": "Fetch details to deliver the data source.",
      "id": "FetchSettings",
      "properties": {
        "dayOfMonth": {
          "description": "Optional. The day of the month when the data source file should be fetched (1-31). This field can only be set for monthly frequency.",
          "format": "int32",
          "type": "integer"
        },
        "dayOfWeek": {
          "type": "string",
          "description": "Optional. The day of the week when the data source file should be fetched. This field can only be set for weekly frequency.",
          "enumDescriptions": [
            "The day of the week is unspecified.",
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday",
            "Saturday",
            "Sunday"
          ],
          "enum": [
            "DAY_OF_WEEK_UNSPECIFIED",
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
          ]
        },
        "enabled": {
          "type": "boolean",
          "description": "Optional. Enables or pauses the fetch schedule."
        },
        "fetchUri": {
          "type": "string",
          "description": "Optional. The URL where the data source file can be fetched. Google Merchant Center supports automatic scheduled uploads using the HTTP, HTTPS or SFTP protocols, so the value will need to be a valid link using one of those three protocols. Immutable for Google Sheets files."
        },
        "timeOfDay": {
          "description": "Optional. The hour of the day when the data source file should be fetched. Minutes and seconds are not supported and will be ignored.",
          "$ref": "TimeOfDay"
        },
        "username": {
          "type": "string",
          "description": "Optional. An optional user name for fetch_uri. Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117)."
        },
        "password": {
          "type": "string",
          "description": "Optional. An optional password for fetch_uri. Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117)."
        },
        "frequency": {
          "enum": [
            "FREQUENCY_UNSPECIFIED",
            "FREQUENCY_DAILY",
            "FREQUENCY_WEEKLY",
            "FREQUENCY_MONTHLY"
          ],
          "type": "string",
          "description": "Required. The frequency describing fetch schedule.",
          "enumDescriptions": [
            "Frequency unspecified.",
            "The fetch happens every day.",
            "The fetch happens every week.",
            "The fetch happens every month."
          ]
        },
        "timeZone": {
          "type": "string",
          "description": "Optional. [Time zone](https://cldr.unicode.org) used for schedule. UTC by default. For example, \"America/Los_Angeles\"."
        }
      }
    },
    "ListDataSourcesResponse": {
      "id": "ListDataSourcesResponse",
      "properties": {
        "dataSources": {
          "type": "array",
          "items": {
            "$ref": "DataSource"
          },
          "description": "The data sources from the specified account."
        },
        "nextPageToken": {
          "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Response message for the ListDataSources method."
    },
    "ProductStatusChangeMessage": {
      "id": "ProductStatusChangeMessage",
      "properties": {
        "eventTime": {
          "type": "string",
          "description": "The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.",
          "format": "google-datetime"
        },
        "account": {
          "description": "The target account that owns the entity that changed. Format : `accounts/{merchant_id}`",
          "type": "string"
        },
        "attribute": {
          "enum": [
            "ATTRIBUTE_UNSPECIFIED",
            "STATUS"
          ],
          "description": "The attribute in the resource that changed, in this case it will be always `Status`.",
          "enumDescriptions": [
            "Unspecified attribute",
            "Status of the changed entity"
          ],
          "type": "string"
        },
        "changes": {
          "description": "A message to describe the change that happened to the product",
          "type": "array",
          "items": {
            "$ref": "ProductChange"
          }
        },
        "managingAccount": {
          "description": "The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : `accounts/{service_provider_id}`",
          "type": "string"
        },
        "resource": {
          "type": "string",
          "description": "The product name. Format: `accounts/{account}/products/{product}`"
        },
        "expirationTime": {
          "description": "Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.",
          "format": "google-datetime",
          "type": "string"
        },
        "resourceType": {
          "enum": [
            "RESOURCE_UNSPECIFIED",
            "PRODUCT",
            "ACCOUNT_SERVICE"
          ],
          "description": "The resource that changed, in this case it will always be `Product`.",
          "enumDescriptions": [
            "Unspecified resource",
            "Resource type : product",
            "Account service"
          ],
          "type": "string"
        },
        "resourceId": {
          "type": "string",
          "description": "The product id."
        }
      },
      "description": "The message that the merchant will receive to notify about product status change event",
      "type": "object"
    },
    "DataSource": {
      "description": "The [data source](/merchant/api/guides/data-sources/overview) for the Merchant Center account.",
      "type": "object",
      "id": "DataSource",
      "properties": {
        "displayName": {
          "description": "Required. The displayed data source name in the Merchant Center UI.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Required. Identifier. The name of the data source. Format: `accounts/{account}/dataSources/{datasource}`"
        },
        "promotionDataSource": {
          "description": "The [promotion](https://support.google.com/merchants/answer/2906014) data source.",
          "$ref": "PromotionDataSource"
        },
        "fileInput": {
          "description": "Optional. The field is used only when data is managed through a file.",
          "$ref": "FileInput"
        },
        "primaryProductDataSource": {
          "description": "The [primary data source](https://support.google.com/merchants/answer/7439058) for local and online products.",
          "$ref": "PrimaryProductDataSource"
        },
        "dataSourceId": {
          "type": "string",
          "description": "Output only. The data source id.",
          "readOnly": true,
          "format": "int64"
        },
        "merchantReviewDataSource": {
          "description": "The [merchant review](https://support.google.com/merchants/answer/7045996) data source.",
          "$ref": "MerchantReviewDataSource"
        },
        "regionalInventoryDataSource": {
          "description": "The [regional inventory](https://support.google.com/merchants/answer/7439058) data source.",
          "$ref": "RegionalInventoryDataSource"
        },
        "input": {
          "description": "Output only. Determines the type of input to the data source. Based on the input some settings might not work. Only generic data sources can be created through the API.",
          "enumDescriptions": [
            "Input unspecified.",
            "Represents data sources for which the data is primarily provided through the API.",
            "Represents data sources for which the data is primarily provided through file input. Data can still be provided through the API.",
            "The data source for products added directly in Merchant Center. This type of data source can not be created or updated through this API, only by Merchant Center UI. This type of data source is read only.",
            "This is also known as [Automated feeds](https://support.google.com/merchants/answer/12158480) used to automatically build your product data. This type of data source can be enabled or disabled through the Accounts sub-API."
          ],
          "type": "string",
          "readOnly": true,
          "enum": [
            "INPUT_UNSPECIFIED",
            "API",
            "FILE",
            "UI",
            "AUTOFEED"
          ]
        },
        "productReviewDataSource": {
          "description": "The [product review](https://support.google.com/merchants/answer/7045996) data source.",
          "$ref": "ProductReviewDataSource"
        },
        "localInventoryDataSource": {
          "description": "The [local inventory](https://support.google.com/merchants/answer/7023001) data source.",
          "$ref": "LocalInventoryDataSource"
        },
        "supplementalProductDataSource": {
          "description": "The [supplemental data source](https://support.google.com/merchants/answer/7439058) for local and online products.",
          "$ref": "SupplementalProductDataSource"
        }
      }
    },
    "TimeOfDay": {
      "id": "TimeOfDay",
      "properties": {
        "hours": {
          "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.",
          "format": "int32",
          "type": "integer"
        },
        "nanos": {
          "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.",
          "format": "int32",
          "type": "integer"
        },
        "minutes": {
          "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.",
          "format": "int32",
          "type": "integer"
        },
        "seconds": {
          "type": "integer",
          "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.",
          "format": "int32"
        }
      },
      "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.",
      "type": "object"
    },
    "DataSourceReference": {
      "description": "Data source reference can be used to manage related data sources within the data source service.",
      "type": "object",
      "id": "DataSourceReference",
      "properties": {
        "primaryDataSourceName": {
          "type": "string",
          "description": "Optional. The name of the primary data source. Format: `accounts/{account}/dataSources/{datasource}`"
        },
        "self": {
          "description": "Self should be used to reference the primary data source itself.",
          "type": "boolean"
        },
        "supplementalDataSourceName": {
          "type": "string",
          "description": "Optional. The name of the supplemental data source. Format: `accounts/{account}/dataSources/{datasource}`"
        }
      }
    },
    "LocalInventoryDataSource": {
      "description": "The local inventory data source type is only available for file inputs and can't be used to create API local inventory data sources.",
      "type": "object",
      "id": "LocalInventoryDataSource",
      "properties": {
        "feedLabel": {
          "type": "string",
          "description": "Required. Immutable. The feed label of the offers to which the local inventory is provided. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-)."
        },
        "contentLanguage": {
          "type": "string",
          "description": "Required. Immutable. The two-letter ISO 639-1 language of the items to which the local inventory is provided."
        }
      }
    },
    "Empty": {
      "id": "Empty",
      "properties": {},
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "type": "object"
    },
    "RegionalInventoryDataSource": {
      "id": "RegionalInventoryDataSource",
      "properties": {
        "feedLabel": {
          "type": "string",
          "description": "Required. Immutable. The feed label of the offers to which the regional inventory is provided. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-)."
        },
        "contentLanguage": {
          "type": "string",
          "description": "Required. Immutable. The two-letter ISO 639-1 language of the items to which the regional inventory is provided."
        }
      },
      "type": "object"
    },
    "PromotionDataSource": {
      "id": "PromotionDataSource",
      "properties": {
        "contentLanguage": {
          "type": "string",
          "description": "Required. Immutable. The two-letter ISO 639-1 language of the items in the data source."
        },
        "targetCountry": {
          "description": "Required. Immutable. The target country used as part of the unique identifier. Represented as a [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). Promotions are only available in selected [countries](https://support.google.com/merchants/answer/4588460).",
          "type": "string"
        }
      },
      "type": "object",
      "description": "The promotion data source."
    },
    "SupplementalProductDataSource": {
      "description": "The [supplemental data source](https://developers.google.com/merchant/api/guides/data-sources/api-sources#link-supplemental-data-source) for local and online products. After creation,you should make sure to link the supplemental product data source into one or more primary product data sources.",
      "type": "object",
      "id": "SupplementalProductDataSource",
      "properties": {
        "referencingPrimaryDataSources": {
          "description": "Output only. The (unordered and deduplicated) list of all primary data sources linked to this data source in either default or custom rules. Supplemental data source cannot be deleted before all links are removed.",
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "DataSourceReference"
          }
        },
        "contentLanguage": {
          "type": "string",
          "description": "Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source. `feedLabel` and `contentLanguage` must be either both set or unset. The fields can only be unset for data sources without file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept produts without that restriction."
        },
        "feedLabel": {
          "description": "Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). `feedLabel` and `contentLanguage` must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. The fields must be unset for data sources without file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept produts without that restriction.",
          "type": "string"
        }
      }
    },
    "MerchantReviewDataSource": {
      "id": "MerchantReviewDataSource",
      "properties": {},
      "type": "object",
      "description": "The merchant review data source."
    },
    "FileUpload": {
      "description": "The file upload of a specific data source, that is, the result of the retrieval of the data source at a certain timestamp computed asynchronously when the data source processing is finished. Only applicable to file data sources.",
      "type": "object",
      "id": "FileUpload",
      "properties": {
        "uploadTime": {
          "type": "string",
          "description": "Output only. The date at which the file of the data source was uploaded.",
          "readOnly": true,
          "format": "google-datetime"
        },
        "name": {
          "type": "string",
          "description": "Identifier. The name of the data source file upload. Format: `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}`"
        },
        "dataSourceId": {
          "type": "string",
          "description": "Output only. The data source id.",
          "readOnly": true,
          "format": "int64"
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "Issue"
          },
          "description": "Output only. The list of issues occurring in the data source.",
          "readOnly": true
        },
        "processingState": {
          "description": "Output only. The processing state of the data source.",
          "enumDescriptions": [
            "Processing state unspecified.",
            "The data source could not be processed or all the items had errors.",
            "The data source is being processed.",
            "The data source was processed successfully, though some items might have had errors."
          ],
          "readOnly": true,
          "type": "string",
          "enum": [
            "PROCESSING_STATE_UNSPECIFIED",
            "FAILED",
            "IN_PROGRESS",
            "SUCCEEDED"
          ]
        },
        "itemsUpdated": {
          "type": "string",
          "description": "Output only. The number of items in the data source that were updated.",
          "readOnly": true,
          "format": "int64"
        },
        "itemsCreated": {
          "type": "string",
          "description": "Output only. The number of items in the data source that were created.",
          "readOnly": true,
          "format": "int64"
        },
        "itemsTotal": {
          "description": "Output only. The number of items in the data source that were processed.",
          "readOnly": true,
          "format": "int64",
          "type": "string"
        }
      }
    }
  },
  "ownerName": "Google",
  "fullyEncodeReservedExpansion": true,
  "documentationLink": "https://developers.google.com/merchant/api",
  "ownerDomain": "google.com",
  "servicePath": "",
  "resources": {
    "accounts": {
      "resources": {
        "dataSources": {
          "methods": {
            "create": {
              "id": "merchantapi.accounts.dataSources.create",
              "parameterOrder": [
                "parent"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "flatPath": "datasources/v1/accounts/{accountsId}/dataSources",
              "response": {
                "$ref": "DataSource"
              },
              "request": {
                "$ref": "DataSource"
              },
              "description": "Creates the new data source configuration for the given account. This method always creates a new data source.",
              "path": "datasources/v1/{+parent}/dataSources",
              "httpMethod": "POST",
              "parameters": {
                "parent": {
                  "description": "Required. The account where this data source will be created. Format: `accounts/{account}`",
                  "location": "path",
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+$"
                }
              }
            },
            "get": {
              "description": "Retrieves the data source configuration for the given account.",
              "response": {
                "$ref": "DataSource"
              },
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+/dataSources/[^/]+$",
                  "description": "Required. The name of the data source to retrieve. Format: `accounts/{account}/dataSources/{datasource}`",
                  "location": "path"
                }
              },
              "path": "datasources/v1/{+name}",
              "flatPath": "datasources/v1/accounts/{accountsId}/dataSources/{dataSourcesId}",
              "id": "merchantapi.accounts.dataSources.get",
              "parameterOrder": [
                "name"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ]
            },
            "fetch": {
              "flatPath": "datasources/v1/accounts/{accountsId}/dataSources/{dataSourcesId}:fetch",
              "id": "merchantapi.accounts.dataSources.fetch",
              "parameterOrder": [
                "name"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "response": {
                "$ref": "Empty"
              },
              "request": {
                "$ref": "FetchDataSourceRequest"
              },
              "description": "Performs the data fetch immediately (even outside fetch schedule) on a data source from your Merchant Center Account. If you need to call this method more than once per day, you should use the Products service to update your product data instead. This method only works on data sources with a file input set.",
              "path": "datasources/v1/{+name}:fetch",
              "httpMethod": "POST",
              "parameters": {
                "name": {
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+/dataSources/[^/]+$",
                  "description": "Required. The name of the data source resource to fetch. Format: `accounts/{account}/dataSources/{datasource}`",
                  "location": "path"
                }
              }
            },
            "list": {
              "id": "merchantapi.accounts.dataSources.list",
              "parameterOrder": [
                "parent"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "flatPath": "datasources/v1/accounts/{accountsId}/dataSources",
              "httpMethod": "GET",
              "parameters": {
                "parent": {
                  "pattern": "^accounts/[^/]+$",
                  "required": true,
                  "type": "string",
                  "location": "path",
                  "description": "Required. The account to list data sources for. Format: `accounts/{account}`"
                },
                "pageSize": {
                  "location": "query",
                  "description": "Optional. The maximum number of data sources to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of data sources will be returned.",
                  "format": "int32",
                  "type": "integer"
                },
                "pageToken": {
                  "description": "Optional. A page token, received from a previous `ListDataSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDataSources` must match the call that provided the page token.",
                  "type": "string",
                  "location": "query"
                }
              },
              "path": "datasources/v1/{+parent}/dataSources",
              "description": "Lists the configurations for data sources for the given account.",
              "response": {
                "$ref": "ListDataSourcesResponse"
              }
            },
            "patch": {
              "response": {
                "$ref": "DataSource"
              },
              "request": {
                "$ref": "DataSource"
              },
              "description": "Updates the existing data source configuration. The fields that are set in the update mask but not provided in the resource will be deleted.",
              "path": "datasources/v1/{+name}",
              "httpMethod": "PATCH",
              "parameters": {
                "updateMask": {
                  "type": "string",
                  "description": "Required. The list of data source fields to be updated. Fields specified in the update mask without a value specified in the body will be deleted from the data source. Providing special \"*\" value for full data source replacement is not supported. For example, If you insert `updateMask=displayName` in the request, it will only update the `displayName` leaving all other fields untouched.",
                  "format": "google-fieldmask",
                  "location": "query"
                },
                "name": {
                  "location": "path",
                  "description": "Required. Identifier. The name of the data source. Format: `accounts/{account}/dataSources/{datasource}`",
                  "pattern": "^accounts/[^/]+/dataSources/[^/]+$",
                  "required": true,
                  "type": "string"
                }
              },
              "id": "merchantapi.accounts.dataSources.patch",
              "parameterOrder": [
                "name"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "flatPath": "datasources/v1/accounts/{accountsId}/dataSources/{dataSourcesId}"
            },
            "delete": {
              "flatPath": "datasources/v1/accounts/{accountsId}/dataSources/{dataSourcesId}",
              "id": "merchantapi.accounts.dataSources.delete",
              "parameterOrder": [
                "name"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "description": "Deletes a data source from your Merchant Center account.",
              "response": {
                "$ref": "Empty"
              },
              "httpMethod": "DELETE",
              "parameters": {
                "name": {
                  "location": "path",
                  "description": "Required. The name of the data source to delete. Format: `accounts/{account}/dataSources/{datasource}`",
                  "pattern": "^accounts/[^/]+/dataSources/[^/]+$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "datasources/v1/{+name}"
            }
          },
          "resources": {
            "fileUploads": {
              "methods": {
                "get": {
                  "flatPath": "datasources/v1/accounts/{accountsId}/dataSources/{dataSourcesId}/fileUploads/{fileUploadsId}",
                  "id": "merchantapi.accounts.dataSources.fileUploads.get",
                  "parameterOrder": [
                    "name"
                  ],
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "response": {
                    "$ref": "FileUpload"
                  },
                  "description": "Gets the latest data source file upload. Only the `latest` alias is accepted for a file upload.",
                  "path": "datasources/v1/{+name}",
                  "httpMethod": "GET",
                  "parameters": {
                    "name": {
                      "description": "Required. The name of the data source file upload to retrieve. Format: `accounts/{account}/dataSources/{datasource}/fileUploads/latest`",
                      "location": "path",
                      "required": true,
                      "type": "string",
                      "pattern": "^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+$"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "revision": "20260617",
  "canonicalName": "Merchant",
  "basePath": "",
  "description": "Programmatically manage your Merchant Center Accounts.",
  "rootUrl": "https://merchantapi.googleapis.com/",
  "mtlsRootUrl": "https://merchantapi.mtls.googleapis.com/",
  "version": "datasources_v1",
  "discoveryVersion": "v1"
}
