REST Resource: datafeeds

Resource: Datafeed

Datafeed configuration data.

JSON representation
{
  "id": string,
  "name": string,
  "contentType": string,
  "attributeLanguage": string,
  "kind": string,
  "fileName": string,
  "fetchSchedule": {
    object (DatafeedFetchSchedule)
  },
  "format": {
    object (DatafeedFormat)
  },
  "targets": [
    {
      object (DatafeedTarget)
    }
  ]
}
Fields
id

string (int64 format)

Required for update. The ID of the data feed.

name

string

Required for insert. A descriptive name of the data feed.

contentType

string

Required. The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported.

Acceptable values are:

  • "local products"
  • "product inventory"
  • "products"

attributeLanguage

string

The two-letter ISO 639-1 language in which the attributes are defined in the data feed.

kind

string

Identifies what kind of resource this is. Value: the fixed string "content#datafeed"

fileName

string

Required. The filename of the feed. All feeds must have a unique file name.

fetchSchedule

object (DatafeedFetchSchedule)

Fetch schedule for the feed file.

format

object (DatafeedFormat)

Format of the feed file.

targets[]

object (DatafeedTarget)

The targets this feed should apply to (country, language, destinations).

DatafeedFetchSchedule

The required fields vary based on the frequency of fetching. For a monthly fetch schedule, dayOfMonth and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.

JSON representation
{
  "dayOfMonth": integer,
  "weekday": string,
  "hour": integer,
  "timeZone": string,
  "fetchUrl": string,
  "username": string,
  "password": string,
  "minuteOfHour": integer,
  "paused": boolean
}
Fields
dayOfMonth

integer (uint32 format)

The day of the month the feed file should be fetched (1-31).

weekday

string

The day of the week the feed file should be fetched.

Acceptable values are:

  • "monday"
  • "tuesday"
  • "wednesday"
  • "thursday"
  • "friday"
  • "saturday"
  • "sunday"

hour

integer (uint32 format)

The hour of the day the feed file should be fetched (0-23).

timeZone

string

Time zone used for schedule. UTC by default. For example, "America/Los_Angeles".

fetchUrl

string

The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.

username

string

An optional user name for fetchUrl.

password

string

An optional password for fetchUrl.

minuteOfHour

integer (uint32 format)

The minute of the hour the feed file should be fetched (0-59). Read-only.

paused

boolean

Whether the scheduled fetch is paused or not.

DatafeedFormat

JSON representation
{
  "fileEncoding": string,
  "columnDelimiter": string,
  "quotingMode": string
}
Fields
fileEncoding

string

Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected.

Acceptable values are:

  • "latin-1"
  • "utf-16be"
  • "utf-16le"
  • "utf-8"
  • "windows-1252"

columnDelimiter

string

Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds.

Acceptable values are:

  • "pipe"
  • "tab"
  • "tilde"

quotingMode

string

Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds.

Acceptable values are:

  • "normal character"
  • "value quoting"

DatafeedTarget

JSON representation
{
  "country": string,
  "feedLabel": string,
  "targetCountries": [
    string
  ],
  "language": string,
  "includedDestinations": [
    string
  ],
  "excludedDestinations": [
    string
  ]
}
Fields
country

string

Deprecated. Use feedLabel instead.

The country where the items in the feed will be included in the search index, represented as a CLDR territory code.

feedLabel

string

Feed label for the DatafeedTarget. Either country or feedLabel is required. If both feedLabel and country is specified, the values must match. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).

targetCountries[]

string

The countries where the items may be displayed. Represented as a CLDR territory code. Will be ignored for "product inventory" feeds.

language

string

The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targets[].country.

includedDestinations[]

string

The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in excludedDestinations.

excludedDestinations[]

string

The list of destinations to exclude for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted.

Methods

custombatch

Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.

delete

Deletes a datafeed configuration from your Merchant Center account.

fetchnow

Invokes a fetch for the datafeed in your Merchant Center account.

get

Retrieves a datafeed configuration from your Merchant Center account.

insert

Registers a datafeed configuration with your Merchant Center account.

list

Lists the configurations for datafeeds in your Merchant Center account.

update

Updates a datafeed configuration of your Merchant Center account.