Formats
Stay organized with collections
Save and categorize content based on your preferences.
This section describes the data formats used for the feed file.
NonEmptyString
An element or attribute of type NonEmptyString contains character data of type
xs:string with the additional restriction
that the character data must have at least one non-whitespace character.
Id
An element or attribute of type Id contains character data of type xs:string
with the additional restrictions that the character data must be shorter than 256 characters and must not contain any whitespace characters.
NOTE: We allow CharMatcher.javaLetterOrDigit() and "-._" so anything other that that will fail the feed.
CollectionMethodType
An element of type CollectionMethodType must be of type
xs:string with the additional restriction
that it can only be one of following values: “unsolicited”, “point_of_sale” or “after_fulfillment”.
CountryCode
An element of type CountryCode must be of type
xs:string with the additional restriction
that it must be a valid country code in ISO 3166-1 alpha-2 format.
DateTimeWithTimeZone
The value must be of type xs:dateTime in the format specified by the
W3C profile of ISO 8601. A time zone designator
is required after the time. The time zone designator may be "Z" to indicate UTC or it may have
the format "+hh:mm" or "-hh:mm" to indicate an offset from UTC.
Examples
2016-04-03T18:37:32Z
2016-05-30T09:30:10-06:00
RatingRange
Description
Elements of type RatingRange must contain a single rating. This rating should not be aggregated
from multiple ratings. Do not use "0" or any other value to specify "no rating". If no rating is
available, then the particular rating element should not appear in the feed.
The rating should be in xs:decimal format
and is a required field.
Attributes
Elements of type RatingRange have the following two attributes.
Name |
Format |
Occurrences |
Description |
min
|
xs:nonNegativeInteger
|
Required (1)
|
The minimum possible number for the rating. This should be the worst possible rating and
should not be a value for "no rating". If your ratings scale starts from 1, please do not
enter 0 for this attribute.
|
max
|
xs:nonNegativeInteger
|
Required (1)
|
The maximum possible number for the rating. This should be the best possible rating.
|
Example
<overall min="1" max="10">9</overall>
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-11 UTC.
[null,null,["Last updated 2023-10-11 UTC."],[[["\u003cp\u003eThis document outlines the various data formats required for the feed file, including strings, IDs, enumerations, country codes, date/time, and ratings.\u003c/p\u003e\n"],["\u003cp\u003eNonEmptyString, Id, CollectionMethodType, CountryCode, and DateTimeWithTimeZone elements have specific format and content restrictions detailed in this section.\u003c/p\u003e\n"],["\u003cp\u003eDateTimeWithTimeZone values must follow the W3C profile of ISO 8601, requiring a time zone designator.\u003c/p\u003e\n"],["\u003cp\u003eRatingRange elements should represent a single rating within a specified range, using decimal format and avoiding "0" for "no rating".\u003c/p\u003e\n"],["\u003cp\u003eRatingRange elements include 'min' and 'max' attributes to indicate the rating scale's boundaries.\u003c/p\u003e\n"]]],["The feed file utilizes specific data formats: `NonEmptyString` requires at least one non-whitespace character. `Id` must be under 256 characters and contain no whitespace, allowing letters, digits, and \"-._\". `CollectionMethodType` accepts \"unsolicited,\" \"point_of_sale,\" or \"after_fulfillment\". `CountryCode` must follow ISO 3166-1 alpha-2. `DateTimeWithTimeZone` adheres to the W3C ISO 8601 profile, needing a time zone designator. `RatingRange` requires an `xs:decimal` rating, with `min` and `max` attributes defining the scale.\n"],null,["# Formats\n\nThis section describes the data formats used for the feed file.\n\nNonEmptyString\n--------------\n\nAn element or attribute of type NonEmptyString contains character data of type\n[xs:string](https://www.w3.org/TR/xmlschema-2/#string) with the additional restriction\nthat the character data must have at least one non-whitespace character.\n\nId\n---\n\nAn element or attribute of type Id contains character data of type [xs:string](https://www.w3.org/TR/xmlschema-2/#string)\nwith the additional restrictions that the character data must be shorter than 256 characters and must not contain any whitespace characters.\n\nNOTE: We allow [CharMatcher.javaLetterOrDigit()](https://guava.dev/releases/21.0/api/docs/com/google/common/base/CharMatcher.html#javaLetterOrDigit--) and \"-._\" so anything other that that will fail the feed.\n\nCollectionMethodType\n--------------------\n\nAn element of type CollectionMethodType must be of type\n[xs:string](https://www.w3.org/TR/xmlschema-2/#string) with the additional restriction\nthat it can only be one of following values: \"unsolicited\", \"point_of_sale\" or \"after_fulfillment\".\n\nCountryCode\n-----------\n\nAn element of type CountryCode must be of type\n[xs:string](https://www.w3.org/TR/xmlschema-2/#string) with the additional restriction\nthat it must be a valid country code in [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n\nDateTimeWithTimeZone\n--------------------\n\nThe value must be of type [xs:dateTime](https://www.w3.org/TR/xmlschema-2/#dateTime) in the format specified by the\n[W3C profile of ISO 8601](https://www.w3.org/TR/NOTE-datetime). A time zone designator\nis required after the time. The time zone designator may be \"Z\" to indicate UTC or it may have\nthe format \"+hh:mm\" or \"-hh:mm\" to indicate an offset from UTC.\n\n### Examples\n\n```cbm-basic-v2\n2016-04-03T18:37:32Z\n2016-05-30T09:30:10-06:00\n```\n\nRatingRange\n-----------\n\n### Description\n\nElements of type RatingRange must contain a single rating. This rating should not be aggregated\nfrom multiple ratings. Do not use \"0\" or any other value to specify \"no rating\". If no rating is\navailable, then the particular rating element should not appear in the feed.\n\nThe rating should be in [xs:decimal](https://www.w3.org/TR/xmlschema-2/#decimal) format\nand is a required field.\n\n### Attributes\n\nElements of type RatingRange have the following two attributes.\n\n| Name | Format | Occurrences | Description |\n|-------|-------------------------------------------------------------------------------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `min` | [xs:nonNegativeInteger](http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger) | Required (1) | The minimum possible number for the rating. This should be the worst possible rating and should not be a value for \"no rating\". If your ratings scale starts from 1, please do not enter 0 for this attribute. |\n| `max` | [xs:nonNegativeInteger](http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger) | Required (1) | The maximum possible number for the rating. This should be the best possible rating. |\n\n### Example\n\n```text\n\u003coverall min=\"1\" max=\"10\"\u003e9\u003c/overall\u003e\n```"]]